# HG changeset patch # User Lukas Stadler # Date 1282014059 25200 # Node ID 1ea65e9d943cf12537fefd93ad187f9e5b3ff310 # Parent 760213a60e8be6d9d485f68399b0654e106a73df updated prologue/epilogue code diff -r 760213a60e8b -r 1ea65e9d943c c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Mon Aug 16 18:59:36 2010 -0700 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Mon Aug 16 20:00:59 2010 -0700 @@ -121,6 +121,7 @@ asm.restart(CiKind.Void); XirOperand sp = asm.createRegister("stack pointer", CiKind.Word, registerConfig.getStackPointerRegister()); XirOperand temp = asm.createRegister("temp (rax)", CiKind.Int, AMD64.rax); + XirOperand frame_pointer = asm.createRegister("frame pointer", CiKind.Word, AMD64.rbp); asm.align(config.codeEntryAlignment); asm.mark(MARK_UNVERIFIED_ENTRY); @@ -133,8 +134,7 @@ asm.align(config.codeEntryAlignment); } asm.mark(MARK_VERIFIED_ENTRY); - // stack banging - asm.pstore(CiKind.Word, sp, asm.i(-config.stackShadowPages * config.vmPageSize), temp, true); + asm.push(frame_pointer); asm.pushFrame(); return asm.finishTemplate(staticMethod ? "static prologue" : "prologue"); @@ -142,7 +142,9 @@ private XirTemplate buildEpilogue() { asm.restart(CiKind.Void); + XirOperand frame_pointer = asm.createRegister("frame pointer", CiKind.Word, AMD64.rbp); asm.popFrame(); + asm.pop(frame_pointer); // TODO safepoint check return asm.finishTemplate("epilogue"); }