| Index: src/crankshaft/x87/lithium-codegen-x87.cc
|
| diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc
|
| index 99469ed116874461870722c3f35e9e8822f26106..441af4d66469b2514740ceeaecb3b2ffc0e7440f 100644
|
| --- a/src/crankshaft/x87/lithium-codegen-x87.cc
|
| +++ b/src/crankshaft/x87/lithium-codegen-x87.cc
|
| @@ -4610,13 +4610,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.
|
| - __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| + // Reset the context register.
|
| + if (!reg.is(esi)) {
|
| + __ Move(esi, Immediate(0));
|
| + }
|
| __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber);
|
| RecordSafepointWithRegisters(
|
| instr->pointer_map(), 0, Safepoint::kNoLazyDeopt);
|
| @@ -4671,12 +4668,10 @@ void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) {
|
| __ Move(reg, Immediate(0));
|
|
|
| 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.
|
| - __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| + // Reset the context register.
|
| + if (!reg.is(esi)) {
|
| + __ Move(esi, Immediate(0));
|
| + }
|
| __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber);
|
| RecordSafepointWithRegisters(
|
| instr->pointer_map(), 0, Safepoint::kNoLazyDeopt);
|
|
|