aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Nevill edward.nevill@linaro.org <Edward Nevill edward.nevill@linaro.org>2014-02-15 17:20:01 +0000
committerEdward Nevill edward.nevill@linaro.org <Edward Nevill edward.nevill@linaro.org>2014-02-15 17:20:01 +0000
commit7efd1580c046779c1c91a588148653267eb83309 (patch)
tree6c702ef0d79096fa847894cc8c6502a255bec5c7
parent5af0add5bb6986b9ca11f4586b9410b42993eaba (diff)
Fix infinite loop with +TieredCompilation and -UseOnStackReplacementjdk8_b128_aarch64_rc1
-rw-r--r--src/cpu/aarch64/vm/templateTable_aarch64.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cpu/aarch64/vm/templateTable_aarch64.cpp b/src/cpu/aarch64/vm/templateTable_aarch64.cpp
index f031cd061..d80be3264 100644
--- a/src/cpu/aarch64/vm/templateTable_aarch64.cpp
+++ b/src/cpu/aarch64/vm/templateTable_aarch64.cpp
@@ -1711,8 +1711,8 @@ void TemplateTable::branch(bool is_jsr, bool is_wide)
}
}
}
- __ bind(dispatch);
}
+ __ bind(dispatch);
// Pre-load the next target bytecode into rscratch1
__ load_unsigned_byte(rscratch1, Address(rbcp, 0));
@@ -1732,7 +1732,7 @@ void TemplateTable::branch(bool is_jsr, bool is_wide)
__ b(dispatch);
}
- if (UseOnStackReplacement) {
+ if (TieredCompilation || UseOnStackReplacement) {
// invocation counter overflow
__ bind(backedge_counter_overflow);
__ neg(r2, r2);
@@ -1742,6 +1742,11 @@ void TemplateTable::branch(bool is_jsr, bool is_wide)
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)