changeset 7664:831754f092fb

Merge
author robm
date Tue, 27 Oct 2015 03:51:05 +0000
parents d9c0a206ca59 faef2a237329
children 6fff3d627d0a
files
diffstat 3 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/x86/vm/macroAssembler_x86.cpp	Mon Oct 26 13:20:50 2015 -0700
+++ b/src/cpu/x86/vm/macroAssembler_x86.cpp	Tue Oct 27 03:51:05 2015 +0000
@@ -6143,7 +6143,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);
+      }
     }
   }
 
--- a/src/cpu/x86/vm/x86_32.ad	Mon Oct 26 13:20:50 2015 -0700
+++ b/src/cpu/x86/vm/x86_32.ad	Tue Oct 27 03:51:05 2015 +0000
@@ -566,7 +566,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);
+      }
     }
   }
 
--- a/src/cpu/x86/vm/x86_64.ad	Mon Oct 26 13:20:50 2015 -0700
+++ b/src/cpu/x86/vm/x86_64.ad	Tue Oct 27 03:51:05 2015 +0000
@@ -863,7 +863,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);
+      }      
     }
   }