# HG changeset patch # User zmajo # Date 1444930839 0 # Node ID e7d20eb45c7d62004316fd3544392fed584ebb79 # Parent 384728911193df58b155d95e16899a7bd3dabb12# Parent 6d91a3077ecad565a848621b11bfe2c0fc922f17 Merge diff -r 384728911193 -r e7d20eb45c7d hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp --- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Thu Oct 15 18:00:00 2015 +0300 +++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Thu Oct 15 17:40:39 2015 +0000 @@ -6247,7 +6247,9 @@ // Save caller's stack pointer into RBP if the frame pointer is preserved. if (PreserveFramePointer) { movptr(rbp, rsp); - addptr(rbp, framesize + wordSize); + if (framesize > 0) { + addptr(rbp, framesize); + } } } diff -r 384728911193 -r e7d20eb45c7d hotspot/src/cpu/x86/vm/x86_32.ad --- a/hotspot/src/cpu/x86/vm/x86_32.ad Thu Oct 15 18:00:00 2015 +0300 +++ b/hotspot/src/cpu/x86/vm/x86_32.ad Thu Oct 15 17:40:39 2015 +0000 @@ -580,7 +580,11 @@ st->print("MOV [ESP + #%d], EBP\t# Save EBP",framesize); if (PreserveFramePointer) { st->print("\n\t"); - st->print("MOV EBP, [ESP + #%d]\t# Save the caller's SP into EBP", (framesize + wordSize)); + st->print("MOV EBP, ESP\t# Save the caller's SP into EBP"); + if (framesize > 0) { + st->print("\n\t"); + st->print("ADD EBP, #%d", framesize); + } } } diff -r 384728911193 -r e7d20eb45c7d hotspot/src/cpu/x86/vm/x86_64.ad --- a/hotspot/src/cpu/x86/vm/x86_64.ad Thu Oct 15 18:00:00 2015 +0300 +++ b/hotspot/src/cpu/x86/vm/x86_64.ad Thu Oct 15 17:40:39 2015 +0000 @@ -867,7 +867,11 @@ st->print("movq [rsp + #%d], rbp\t# Save rbp",framesize); if (PreserveFramePointer) { st->print("\n\t"); - st->print("movq rbp, [rsp + #%d]\t# Save the caller's SP into rbp", (framesize + wordSize)); + st->print("movq rbp, rsp\t# Save the caller's SP into rbp"); + if (framesize > 0) { + st->print("\n\t"); + st->print("addq rbp, #%d", framesize); + } } }