changeset 6658:18e5cbbe8abf jdk8_b128_aarch64_rc1

Fix infinite loop with +TieredCompilation and -UseOnStackReplacement
author Edward Nevill edward.nevill@linaro.org
date Sat, 15 Feb 2014 17:20:01 +0000
parents a69fcb4e97f6
children 00970b4b596d
files src/cpu/aarch64/vm/templateTable_aarch64.cpp
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Tue Feb 11 15:36:54 2014 +0000
+++ b/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Sat Feb 15 17:20:01 2014 +0000
@@ -1711,8 +1711,8 @@
         }
       }
     }
-    __ bind(dispatch);
   }
+  __ bind(dispatch);
 
   // Pre-load the next target bytecode into rscratch1
   __ load_unsigned_byte(rscratch1, Address(rbcp, 0));
@@ -1732,7 +1732,7 @@
       __ b(dispatch);
     }
 
-    if (UseOnStackReplacement) {
+    if (TieredCompilation || UseOnStackReplacement) {
       // invocation counter overflow
       __ bind(backedge_counter_overflow);
       __ neg(r2, r2);
@@ -1742,6 +1742,11 @@
                  CAST_FROM_FN_PTR(address,
                                   InterpreterRuntime::frequency_counter_overflow),
                  r2);
+      if (!UseOnStackReplacement)
+        __ b(dispatch);
+    }
+
+    if (UseOnStackReplacement) {
       __ load_unsigned_byte(r1, Address(rbcp, 0));  // restore target bytecode
 
       // r0: osr nmethod (osr ok) or NULL (osr not possible)