| Index: src/crankshaft/arm/lithium-codegen-arm.cc
|
| diff --git a/src/crankshaft/arm/lithium-codegen-arm.cc b/src/crankshaft/arm/lithium-codegen-arm.cc
|
| index 4a3e01ee17ba652892d5147d73059a5086a4c4ec..357402771621f0c3128de9d3de33500fbed8d6ff 100644
|
| --- a/src/crankshaft/arm/lithium-codegen-arm.cc
|
| +++ b/src/crankshaft/arm/lithium-codegen-arm.cc
|
| @@ -4482,13 +4482,10 @@ void LCodeGen::DoDeferredNumberTagIU(LInstruction* instr,
|
|
|
| // Preserve the value of all registers.
|
| PushSafepointRegistersScope scope(this);
|
| -
|
| - // NumberTagI and NumberTagD use the context from the frame, rather than
|
| - // the environment's HContext or HInlinedContext value.
|
| - // They only call Runtime::kAllocateHeapNumber.
|
| - // The corresponding HChange instructions are added in a phase that does
|
| - // not have easy access to the local context.
|
| - __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + // Reset the context register.
|
| + if (!dst.is(cp)) {
|
| + __ mov(cp, Operand::Zero());
|
| + }
|
| __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber);
|
| RecordSafepointWithRegisters(
|
| instr->pointer_map(), 0, Safepoint::kNoLazyDeopt);
|
| @@ -4540,12 +4537,10 @@ void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) {
|
| __ mov(reg, Operand::Zero());
|
|
|
| PushSafepointRegistersScope scope(this);
|
| - // NumberTagI and NumberTagD use the context from the frame, rather than
|
| - // the environment's HContext or HInlinedContext value.
|
| - // They only call Runtime::kAllocateHeapNumber.
|
| - // The corresponding HChange instructions are added in a phase that does
|
| - // not have easy access to the local context.
|
| - __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + // Reset the context register.
|
| + if (!reg.is(cp)) {
|
| + __ mov(cp, Operand::Zero());
|
| + }
|
| __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber);
|
| RecordSafepointWithRegisters(
|
| instr->pointer_map(), 0, Safepoint::kNoLazyDeopt);
|
|
|