Index: src/ppc/code-stubs-ppc.cc |
diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc |
index c4b8af05cba6c32a3d4fda8a6b590025370010a6..45d168ed5955133e3d86443c0dd287190c294bd4 100644 |
--- a/src/ppc/code-stubs-ppc.cc |
+++ b/src/ppc/code-stubs-ppc.cc |
@@ -1124,22 +1124,11 @@ void CEntryStub::Generate(MacroAssembler* masm) { |
// know where the return address is. The CEntryStub is unmovable, so |
// we can store the address on the stack to be able to find it again and |
// we never have to restore it, because it will not change. |
- // Compute the return address in lr to return to after the jump below. Pc is |
- // already at '+ 8' from the current instruction but return is after three |
- // instructions so add another 4 to pc to get the return address. |
- { |
- Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm); |
- Label here; |
- __ b(&here, SetLK); |
- __ bind(&here); |
- __ mflr(r8); |
- |
- // Constant used below is dependent on size of Call() macro instructions |
- __ addi(r0, r8, Operand(20)); |
- |
- __ StoreP(r0, MemOperand(sp, kStackFrameExtraParamSlot * kPointerSize)); |
- __ Call(target); |
- } |
+ Label after_call; |
+ __ mov_label_addr(r0, &after_call); |
+ __ StoreP(r0, MemOperand(sp, kStackFrameExtraParamSlot * kPointerSize)); |
+ __ Call(target); |
+ __ bind(&after_call); |
#if !ABI_RETURNS_OBJECT_PAIRS_IN_REGS |
// If return value is on the stack, pop it to registers. |