< prev index next >
src/cpu/ppc/vm/nativeInst_ppc.cpp
Print this page
rev 7507 : 8066964: ppc64: argument and return type profiling, fix problem with popframe
@@ -98,14 +98,11 @@
CodeBuffer cb(addr_call, code_size + 1);
MacroAssembler* a = new MacroAssembler(&cb);
// Patch the call.
- if (ReoptimizeCallSequences &&
- a->is_within_range_of_b(dest, addr_call)) {
- a->bl(dest);
- } else {
+ if (!ReoptimizeCallSequences || !a->is_within_range_of_b(dest, addr_call)) {
address trampoline_stub_addr = get_trampoline();
// We did not find a trampoline stub because the current codeblob
// does not provide this information. The branch will be patched
// later during a final fixup, when all necessary information is
@@ -113,13 +110,16 @@
if (trampoline_stub_addr == 0)
return;
// Patch the constant in the call's trampoline stub.
NativeCallTrampolineStub_at(trampoline_stub_addr)->set_destination(dest);
-
- a->bl(trampoline_stub_addr);
+ dest = trampoline_stub_addr;
}
+
+ OrderAccess::release();
+ a->bl(dest);
+
ICache::ppc64_flush_icache_bytes(addr_call, code_size);
}
address NativeCall::get_trampoline() {
address call_addr = addr_at(0);
< prev index next >