Mercurial > hg > truffle
diff src/cpu/ppc/vm/nativeInst_ppc.cpp @ 20710:c5e86c5cd22e
8066964: ppc64: argument and return type profiling, fix problem with popframe
Reviewed-by: roland, kvn
author | goetz |
---|---|
date | Fri, 12 Dec 2014 08:48:56 +0100 |
parents | 327e7269f90d |
children |
line wrap: on
line diff
--- a/src/cpu/ppc/vm/nativeInst_ppc.cpp Thu Dec 11 18:53:50 2014 -0500 +++ b/src/cpu/ppc/vm/nativeInst_ppc.cpp Fri Dec 12 08:48:56 2014 +0100 @@ -100,10 +100,7 @@ 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 @@ -115,9 +112,12 @@ // Patch the constant in the call's trampoline stub. NativeCallTrampolineStub_at(trampoline_stub_addr)->set_destination(dest); + dest = trampoline_stub_addr; + } - a->bl(trampoline_stub_addr); - } + OrderAccess::release(); + a->bl(dest); + ICache::ppc64_flush_icache_bytes(addr_call, code_size); }