Chromium Code Reviews| 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 1194142be051c8767dffbea3872470a6776ae1da..024e724a7062a4070e1eefbe04785691d6e0a259 100644 |
| --- a/src/crankshaft/ia32/lithium-codegen-ia32.cc |
| +++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc |
| @@ -4264,13 +4264,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); |
| @@ -4320,12 +4317,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); |
| @@ -4414,7 +4409,7 @@ void LCodeGen::EmitNumberUntagD(LNumberUntagD* instr, Register input_reg, |
| } |
| __ bind(&load_smi); |
| - // Smi to XMM conversion. Clobbering a temp is faster than re-tagging the |
| + // Smi to XMM conversion. Clobbering a temp is faster than -tagging the |
|
Jakob Kummerow
2016/07/13 15:56:56
accidental edit?
|
| // input register since we avoid dependencies. |
| __ mov(temp_reg, input_reg); |
| __ SmiUntag(temp_reg); // Untag smi before converting to float. |