Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
20709:28f116adb50c | 20710:c5e86c5cd22e |
---|---|
98 | 98 |
99 CodeBuffer cb(addr_call, code_size + 1); | 99 CodeBuffer cb(addr_call, code_size + 1); |
100 MacroAssembler* a = new MacroAssembler(&cb); | 100 MacroAssembler* a = new MacroAssembler(&cb); |
101 | 101 |
102 // Patch the call. | 102 // Patch the call. |
103 if (ReoptimizeCallSequences && | 103 if (!ReoptimizeCallSequences || !a->is_within_range_of_b(dest, addr_call)) { |
104 a->is_within_range_of_b(dest, addr_call)) { | |
105 a->bl(dest); | |
106 } else { | |
107 address trampoline_stub_addr = get_trampoline(); | 104 address trampoline_stub_addr = get_trampoline(); |
108 | 105 |
109 // We did not find a trampoline stub because the current codeblob | 106 // We did not find a trampoline stub because the current codeblob |
110 // does not provide this information. The branch will be patched | 107 // does not provide this information. The branch will be patched |
111 // later during a final fixup, when all necessary information is | 108 // later during a final fixup, when all necessary information is |
113 if (trampoline_stub_addr == 0) | 110 if (trampoline_stub_addr == 0) |
114 return; | 111 return; |
115 | 112 |
116 // Patch the constant in the call's trampoline stub. | 113 // Patch the constant in the call's trampoline stub. |
117 NativeCallTrampolineStub_at(trampoline_stub_addr)->set_destination(dest); | 114 NativeCallTrampolineStub_at(trampoline_stub_addr)->set_destination(dest); |
118 | 115 dest = trampoline_stub_addr; |
119 a->bl(trampoline_stub_addr); | 116 } |
120 } | 117 |
118 OrderAccess::release(); | |
119 a->bl(dest); | |
120 | |
121 ICache::ppc64_flush_icache_bytes(addr_call, code_size); | 121 ICache::ppc64_flush_icache_bytes(addr_call, code_size); |
122 } | 122 } |
123 | 123 |
124 address NativeCall::get_trampoline() { | 124 address NativeCall::get_trampoline() { |
125 address call_addr = addr_at(0); | 125 address call_addr = addr_at(0); |