# HG changeset patch # User Thomas Wuerthinger # Date 1289302221 -3600 # Node ID c0e244017dad0fb91934cfc844f033f0b9aac286 # Parent 1b7acf75f900862bd38014a46d4d36be25fa62db Corrections of oop map generation. diff -r 1b7acf75f900 -r c0e244017dad c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Thu Nov 04 15:34:50 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Tue Nov 09 12:30:21 2010 +0100 @@ -180,7 +180,6 @@ C1XOptions.UseDeopt = false; C1XOptions.IRChecking = Logger.ENABLED; C1XOptions.GenAssertionCode = Logger.ENABLED; - C1XOptions.DetailedAsserts = Logger.ENABLED; // these options are important - c1x4hotspot will not generate correct code without them C1XOptions.GenSpecialDivChecks = true; diff -r 1b7acf75f900 -r c0e244017dad c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Thu Nov 04 15:34:50 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Tue Nov 09 12:30:21 2010 +0100 @@ -444,8 +444,7 @@ UnresolvedClassPatching patching = new UnresolvedClassPatching(asm, arg, config); patching.emitInline(); - useRegisters(asm, AMD64.rbx, AMD64.rcx, AMD64.rsi); - useRegisters(asm, AMD64.rax); + useRegisters(asm, AMD64.rbx, AMD64.rcx, AMD64.rsi, AMD64.rax); asm.callRuntime(config.unresolvedNewInstanceStub, result); // -- out of line ------------------------------------------------------- @@ -476,8 +475,7 @@ } asm.mov(length, lengthParam); - useRegisters(asm, AMD64.rsi, AMD64.rcx, AMD64.rdi); - useRegisters(asm, AMD64.rax); + useRegisters(asm, AMD64.rsi, AMD64.rcx, AMD64.rdi, AMD64.rax); asm.callRuntime(config.newObjectArrayStub, result); if (is(UNRESOLVED, flags)) { patching.emitOutOfLine(); @@ -500,8 +498,7 @@ asm.mov(hub, hubParam); asm.mov(length, lengthParam); - useRegisters(asm, AMD64.rsi, AMD64.rcx, AMD64.rdi); - useRegisters(asm, AMD64.rax); + useRegisters(asm, AMD64.rsi, AMD64.rcx, AMD64.rdi, AMD64.rax); asm.callRuntime(config.newTypeArrayStub, result); return asm.finishTemplate("newTypeArray"); diff -r 1b7acf75f900 -r c0e244017dad c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java Thu Nov 04 15:34:50 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java Tue Nov 09 12:30:21 2010 +0100 @@ -127,7 +127,6 @@ t.printStackTrace(new PrintWriter(out)); Logger.info("Compilation interrupted:\n" + out.toString()); } - System.gc(); } @Override diff -r 1b7acf75f900 -r c0e244017dad c1x4hotspotsrc/hotspot/hotspot SciMark.launch --- a/c1x4hotspotsrc/hotspot/hotspot SciMark.launch Thu Nov 04 15:34:50 2010 +0100 +++ b/c1x4hotspotsrc/hotspot/hotspot SciMark.launch Tue Nov 09 12:30:21 2010 +0100 @@ -28,17 +28,17 @@ - + - + - + @@ -51,7 +51,7 @@ - + diff -r 1b7acf75f900 -r c0e244017dad src/share/vm/c1x/c1x_CodeInstaller.cpp --- a/src/share/vm/c1x/c1x_CodeInstaller.cpp Thu Nov 04 15:34:50 2010 +0100 +++ b/src/share/vm/c1x/c1x_CodeInstaller.cpp Tue Nov 09 12:30:21 2010 +0100 @@ -27,7 +27,8 @@ // TODO this should be handled in a more robust way - not hard coded... -Register CPU_REGS[] = { rax, rbx, rcx, rdx, rsi, rdi, r8, r9, r11, r12, r13, r14 }; +Register CPU_REGS[] = { rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi, r8, r9, r10, r11, r12, r13, r14, r15 }; +bool OOP_ALLOWED[] = {true, true, true, true, false, false, true, true, true, true, false, true, true, true, true, true}; const static int NUM_CPU_REGS = sizeof(CPU_REGS) / sizeof(Register); XMMRegister XMM_REGS[] = { xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15 }; const static int NUM_XMM_REGS = sizeof(XMM_REGS) / sizeof(XMMRegister); @@ -52,11 +53,12 @@ assert(register_map->length() == (NUM_CPU_REGS + 7) / 8, "unexpected register_map length"); - for (jint i = 0; i < NUM_REGS; i++) { + for (jint i = 0; i < NUM_CPU_REGS; i++) { unsigned char byte = ((unsigned char*) register_map->base(T_BYTE))[i / 8]; bool is_oop = (byte & (1 << (i % 8))) != 0; VMReg reg = get_hotspot_reg(i); if (is_oop) { + assert(OOP_ALLOWED[i], "this register may never be an oop, register map misaligned?"); map->set_oop(reg); } else { map->set_value(reg);