diff src/cpu/x86/vm/sharedRuntime_x86_32.cpp @ 13451:02f27ecb4f3a

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Wed, 18 Dec 2013 00:00:24 +0100
parents b9a918201d47 fca8f4799229
children f6c04e69cf75
line wrap: on
line diff
--- a/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Tue Dec 17 22:37:03 2013 +0100
+++ b/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Wed Dec 18 00:00:24 2013 +0100
@@ -3001,6 +3001,10 @@
 
   // sp should be pointing at the return address to the caller (3)
 
+  // Pick up the initial fp we should save
+  // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
+  __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
+
   // Stack bang to make sure there's enough room for these interpreter frames.
   if (UseStackBanging) {
     __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
@@ -3020,9 +3024,6 @@
   __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()));
   __ movl(counter, rbx);
 
-  // Pick up the initial fp we should save
-  __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
-
   // Now adjust the caller's stack to make up for the extra locals
   // but record the original sp so that we can save it in the skeletal interpreter
   // frame and the stack walking of interpreter_sender will get the unextended sp
@@ -3220,6 +3221,10 @@
 
   // sp should be pointing at the return address to the caller (3)
 
+  // Pick up the initial fp we should save
+  // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
+  __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
+
   // Stack bang to make sure there's enough room for these interpreter frames.
   if (UseStackBanging) {
     __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
@@ -3240,9 +3245,6 @@
   __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()));
   __ movl(counter, rbx);
 
-  // Pick up the initial fp we should save
-  __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
-
   // Now adjust the caller's stack to make up for the extra locals
   // but record the original sp so that we can save it in the skeletal interpreter
   // frame and the stack walking of interpreter_sender will get the unextended sp