changeset 12118:60a8cbf7030e

8167200: AArch64: Broken stack pointer adjustment in interpreter Summary: Always adjust SP unconditionally Reviewed-by: dlong, kbarrett
author aph
date Thu, 06 Oct 2016 09:25:21 +0000
parents d9960bd9fb6d
children a53404b57257
files src/cpu/aarch64/vm/templateTable_aarch64.cpp
diffstat 1 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Tue May 24 08:47:37 2016 -0700
+++ b/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Thu Oct 06 09:25:21 2016 +0000
@@ -3717,19 +3717,15 @@
 
   // allocate one if there's no free slot
   {
-    Label entry, loop, no_adjust;
+    Label entry, loop;
     // 1. compute new pointers            // rsp: old expression stack top
     __ ldr(c_rarg1, monitor_block_bot);   // c_rarg1: old expression stack bottom
-    __ sub(esp, esp, entry_size);           // move expression stack top
+    __ sub(esp, esp, entry_size);         // move expression stack top
     __ sub(c_rarg1, c_rarg1, entry_size); // move expression stack bottom
     __ mov(c_rarg3, esp);                 // set start value for copy loop
     __ str(c_rarg1, monitor_block_bot);   // set new monitor block bottom
 
-    __ cmp(sp, c_rarg3);                  // Check if we need to move sp
-    __ br(Assembler::LO, no_adjust);      // to allow more stack space
-                                          // for our new esp
-    __ sub(sp, sp, 2 * wordSize);
-    __ bind(no_adjust);
+    __ sub(sp, sp, entry_size);           // make room for the monitor
 
     __ b(entry);
     // 2. move expression stack contents