| Index: src/crankshaft/mips/lithium-codegen-mips.cc
|
| diff --git a/src/crankshaft/mips/lithium-codegen-mips.cc b/src/crankshaft/mips/lithium-codegen-mips.cc
|
| index b1c7554a5c5f6853cb1671402c4b3d2313d6d436..b925f357852aa282968acdf2f712716b1518fe97 100644
|
| --- a/src/crankshaft/mips/lithium-codegen-mips.cc
|
| +++ b/src/crankshaft/mips/lithium-codegen-mips.cc
|
| @@ -4422,13 +4422,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.
|
| - __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + // Reset the context register.
|
| + if (!dst.is(cp)) {
|
| + __ mov(cp, zero_reg);
|
| + }
|
| __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber);
|
| RecordSafepointWithRegisters(
|
| instr->pointer_map(), 0, Safepoint::kNoLazyDeopt);
|
| @@ -4481,12 +4478,10 @@ void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) {
|
| __ mov(reg, zero_reg);
|
|
|
| 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.
|
| - __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + // Reset the context register.
|
| + if (!dst.is(cp)) {
|
| + __ mov(cp, zero_reg);
|
| + }
|
| __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber);
|
| RecordSafepointWithRegisters(
|
| instr->pointer_map(), 0, Safepoint::kNoLazyDeopt);
|
|
|