| Index: src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/crankshaft/ia32/lithium-codegen-ia32.cc b/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| index f1406df88d1a65b849ed13816078efc2485e5cc0..d389b4b88d3c4fca23f83141168d526850c8480e 100644
|
| --- a/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| @@ -4265,13 +4265,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);
|
| @@ -4321,12 +4318,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);
|
|
|