Index: src/arm/builtins-arm.cc |
diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc |
index 7ebef530f3ef787d8724d9d1fcfe05607e5d0345..2638033cdee6ca9477f63e528394fe17eec6e1ca 100644 |
--- a/src/arm/builtins-arm.cc |
+++ b/src/arm/builtins-arm.cc |
@@ -1166,6 +1166,8 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { |
__ ldr(r1, FieldMemOperand(r0, Code::kDeoptimizationDataOffset)); |
{ ConstantPoolUnavailableScope constant_pool_unavailable(masm); |
+ __ add(r0, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); // Code start |
+ |
if (FLAG_enable_embedded_constant_pool) { |
__ LoadConstantPoolPointerRegisterFromCodeTargetAddress(r0); |
} |
@@ -1175,10 +1177,8 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { |
__ ldr(r1, FieldMemOperand(r1, FixedArray::OffsetOfElementAt( |
DeoptimizationInputData::kOsrPcOffsetIndex))); |
- // Compute the target address = code_obj + header_size + osr_offset |
- // <entry_addr> = <code_obj> + #header_size + <osr_offset> |
- __ add(r0, r0, Operand::SmiUntag(r1)); |
- __ add(lr, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
+ // Compute the target address = code start + osr_offset |
+ __ add(lr, r0, Operand::SmiUntag(r1)); |
// And "return" to the OSR entry point of the function. |
__ Ret(); |