Mercurial > hg > truffle
changeset 1453:d603bdbec024
Enable monitorenter/monitorexit runtime calls.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Fri, 12 Nov 2010 18:34:07 +0100 |
parents | 9b22e3e5df8e |
children | 7cf1952ec5fb |
files | c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java src/share/vm/c1x/c1x_CodeInstaller.cpp |
diffstat | 3 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Fri Nov 12 18:04:27 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Fri Nov 12 18:34:07 2010 +0100 @@ -180,6 +180,7 @@ C1XOptions.NullCheckUniquePc = true; C1XOptions.invokeinterfaceTemplatePos = true; C1XOptions.StackShadowPages = config.stackShadowPages; + C1XOptions.NeedsDebugInformation = false; }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Fri Nov 12 18:04:27 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Fri Nov 12 18:34:07 2010 +0100 @@ -307,11 +307,11 @@ asm.mark(MARK_IMPLICIT_NULL); asm.pload(CiKind.Word, asm.createTemp("temp", CiKind.Word), object, true); } -/* + useRegisters(asm, AMD64.rbx, AMD64.rsi, AMD64.rdx); useRegisters(asm, AMD64.rax); asm.callRuntime(config.monitorEnterStub, null, object, lock); -*/ + return asm.finishTemplate("monitorEnter"); } }; @@ -323,11 +323,11 @@ asm.restart(CiKind.Void); XirParameter object = asm.createInputParameter("object", CiKind.Object); XirParameter lock = asm.createInputParameter("lock", CiKind.Word); -/* + useRegisters(asm, AMD64.rbx, AMD64.rsi, AMD64.rdx); useRegisters(asm, AMD64.rax); asm.callRuntime(config.monitorExitStub, null, object, lock); -*/ + return asm.finishTemplate("monitorExit"); } };
--- a/src/share/vm/c1x/c1x_CodeInstaller.cpp Fri Nov 12 18:04:27 2010 +0100 +++ b/src/share/vm/c1x/c1x_CodeInstaller.cpp Fri Nov 12 18:34:07 2010 +0100 @@ -327,7 +327,6 @@ reexecute = Interpreter::bytecode_should_reexecute(code); } - if (frame != NULL) { jint local_count = CiDebugInfo_Frame::numLocals(frame); jint expression_count = CiDebugInfo_Frame::numStack(frame); @@ -350,8 +349,9 @@ } else { assert(value->is_location(), "invalid monitor location"); LocationValue* loc = (LocationValue*)value; - LocationValue* obj = new LocationValue(Location::new_stk_loc(Location::oop, loc->location().stack_offset() + HeapWordSize)); - monitors->append(new MonitorValue(obj, Location::new_stk_loc(Location::normal, loc->location().stack_offset()))); + int monitor_offset = loc->location().stack_offset(); + LocationValue* obj = new LocationValue(Location::new_stk_loc(Location::oop, monitor_offset + BasicObjectLock::obj_offset_in_bytes())); + monitors->append(new MonitorValue(obj, Location::new_stk_loc(Location::normal, monitor_offset + BasicObjectLock::lock_offset_in_bytes()))); } } DebugToken* locals_token = _debug_recorder->create_scope_values(locals);