Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 8adc25c6394de7e84b4025fc570b49b750cd3485..4b0a7b2e4e460e8f72a3cb30f376893c52964e7d 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -257,7 +257,7 @@ bool LCodeGen::GeneratePrologue() { |
BitVector* doubles = chunk()->allocated_double_registers(); |
BitVector::Iterator save_iterator(doubles); |
while (!save_iterator.Done()) { |
- __ movdbl(MemOperand(esp, count * kDoubleSize), |
+ __ movsd(MemOperand(esp, count * kDoubleSize), |
XMMRegister::FromAllocationIndex(save_iterator.Current())); |
save_iterator.Advance(); |
count++; |
@@ -2233,8 +2233,8 @@ void LCodeGen::DoArithmeticD(LArithmeticD* instr) { |
case Token::MOD: { |
// Pass two doubles as arguments on the stack. |
__ PrepareCallCFunction(4, eax); |
- __ movdbl(Operand(esp, 0 * kDoubleSize), left); |
- __ movdbl(Operand(esp, 1 * kDoubleSize), right); |
+ __ movsd(Operand(esp, 0 * kDoubleSize), left); |
+ __ movsd(Operand(esp, 1 * kDoubleSize), right); |
__ CallCFunction( |
ExternalReference::double_fp_operation(Token::MOD, isolate()), |
4); |
@@ -2243,7 +2243,7 @@ void LCodeGen::DoArithmeticD(LArithmeticD* instr) { |
// Store it into the result register. |
__ sub(Operand(esp), Immediate(kDoubleSize)); |
__ fstp_d(Operand(esp, 0)); |
- __ movdbl(result, Operand(esp, 0)); |
+ __ movsd(result, Operand(esp, 0)); |
__ add(Operand(esp), Immediate(kDoubleSize)); |
break; |
} |
@@ -2617,7 +2617,7 @@ void LCodeGen::DoCmpHoleAndBranch(LCmpHoleAndBranch* instr) { |
if (use_sse2) { |
CpuFeatureScope scope(masm(), SSE2); |
XMMRegister input_reg = ToDoubleRegister(instr->object()); |
- __ movdbl(MemOperand(esp, 0), input_reg); |
+ __ movsd(MemOperand(esp, 0), input_reg); |
} else { |
__ fstp_d(MemOperand(esp, 0)); |
} |
@@ -3079,7 +3079,7 @@ void LCodeGen::DoReturn(LReturn* instr) { |
BitVector::Iterator save_iterator(doubles); |
int count = 0; |
while (!save_iterator.Done()) { |
- __ movdbl(XMMRegister::FromAllocationIndex(save_iterator.Current()), |
+ __ movsd(XMMRegister::FromAllocationIndex(save_iterator.Current()), |
MemOperand(esp, count * kDoubleSize)); |
save_iterator.Advance(); |
count++; |
@@ -3247,7 +3247,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
if (CpuFeatures::IsSupported(SSE2)) { |
CpuFeatureScope scope(masm(), SSE2); |
XMMRegister result = ToDoubleRegister(instr->result()); |
- __ movdbl(result, FieldOperand(object, offset)); |
+ __ movsd(result, FieldOperand(object, offset)); |
} else { |
X87Mov(ToX87Register(instr->result()), FieldOperand(object, offset)); |
} |
@@ -3401,7 +3401,7 @@ void LCodeGen::DoLoadKeyedExternalArray(LLoadKeyed* instr) { |
} else if (elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { |
if (CpuFeatures::IsSupported(SSE2)) { |
CpuFeatureScope scope(masm(), SSE2); |
- __ movdbl(ToDoubleRegister(instr->result()), operand); |
+ __ movsd(ToDoubleRegister(instr->result()), operand); |
} else { |
X87Mov(ToX87Register(instr->result()), operand); |
} |
@@ -3472,7 +3472,7 @@ void LCodeGen::DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr) { |
if (CpuFeatures::IsSupported(SSE2)) { |
CpuFeatureScope scope(masm(), SSE2); |
XMMRegister result = ToDoubleRegister(instr->result()); |
- __ movdbl(result, double_load_operand); |
+ __ movsd(result, double_load_operand); |
} else { |
X87Mov(ToX87Register(instr->result()), double_load_operand); |
} |
@@ -3995,7 +3995,7 @@ void LCodeGen::DoMathRound(LMathRound* instr) { |
ExternalReference::address_of_minus_one_half(); |
Label done, round_to_zero, below_one_half, do_not_compensate; |
- __ movdbl(xmm_scratch, Operand::StaticVariable(one_half)); |
+ __ movsd(xmm_scratch, Operand::StaticVariable(one_half)); |
__ ucomisd(xmm_scratch, input_reg); |
__ j(above, &below_one_half); |
@@ -4009,7 +4009,7 @@ void LCodeGen::DoMathRound(LMathRound* instr) { |
__ jmp(&done); |
__ bind(&below_one_half); |
- __ movdbl(xmm_scratch, Operand::StaticVariable(minus_one_half)); |
+ __ movsd(xmm_scratch, Operand::StaticVariable(minus_one_half)); |
__ ucomisd(xmm_scratch, input_reg); |
__ j(below_equal, &round_to_zero); |
@@ -4196,22 +4196,21 @@ void LCodeGen::DoMathLog(LMathLog* instr) { |
__ j(equal, &zero, Label::kNear); |
ExternalReference nan = |
ExternalReference::address_of_canonical_non_hole_nan(); |
- __ movdbl(input_reg, Operand::StaticVariable(nan)); |
+ __ movsd(input_reg, Operand::StaticVariable(nan)); |
__ jmp(&done, Label::kNear); |
__ bind(&zero); |
- __ push(Immediate(0xFFF00000)); |
- __ push(Immediate(0)); |
- __ movdbl(input_reg, Operand(esp, 0)); |
- __ add(Operand(esp), Immediate(kDoubleSize)); |
+ ExternalReference ninf = |
+ ExternalReference::address_of_negative_infinity(); |
+ __ movsd(input_reg, Operand::StaticVariable(ninf)); |
__ jmp(&done, Label::kNear); |
__ bind(&positive); |
__ fldln2(); |
__ sub(Operand(esp), Immediate(kDoubleSize)); |
- __ movdbl(Operand(esp, 0), input_reg); |
+ __ movsd(Operand(esp, 0), input_reg); |
__ fld_d(Operand(esp, 0)); |
__ fyl2x(); |
__ fstp_d(Operand(esp, 0)); |
- __ movdbl(input_reg, Operand(esp, 0)); |
+ __ movsd(input_reg, Operand(esp, 0)); |
__ add(Operand(esp), Immediate(kDoubleSize)); |
__ bind(&done); |
} |
@@ -4482,7 +4481,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
if (CpuFeatures::IsSupported(SSE2)) { |
CpuFeatureScope scope(masm(), SSE2); |
XMMRegister value = ToDoubleRegister(instr->value()); |
- __ movdbl(FieldOperand(object, offset), value); |
+ __ movsd(FieldOperand(object, offset), value); |
} else { |
X87Register value = ToX87Register(instr->value()); |
X87Mov(FieldOperand(object, offset), value); |
@@ -4632,7 +4631,7 @@ void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) { |
} else if (elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { |
if (CpuFeatures::IsSafeForSnapshot(SSE2)) { |
CpuFeatureScope scope(masm(), SSE2); |
- __ movdbl(operand, ToDoubleRegister(instr->value())); |
+ __ movsd(operand, ToDoubleRegister(instr->value())); |
} else { |
X87Mov(operand, ToX87Register(instr->value())); |
} |
@@ -4690,11 +4689,11 @@ void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { |
__ ucomisd(value, value); |
__ j(parity_odd, &have_value); // NaN. |
- __ movdbl(value, Operand::StaticVariable(canonical_nan_reference)); |
+ __ movsd(value, Operand::StaticVariable(canonical_nan_reference)); |
__ bind(&have_value); |
} |
- __ movdbl(double_store_operand, value); |
+ __ movsd(double_store_operand, value); |
} else { |
// Can't use SSE2 in the serializer |
if (instr->hydrogen()->IsConstantHoleStore()) { |
@@ -5160,7 +5159,7 @@ void LCodeGen::DoDeferredNumberTagI(LInstruction* instr, |
__ bind(&done); |
if (CpuFeatures::IsSupported(SSE2)) { |
CpuFeatureScope feature_scope(masm(), SSE2); |
- __ movdbl(FieldOperand(reg, HeapNumber::kValueOffset), xmm_scratch); |
+ __ movsd(FieldOperand(reg, HeapNumber::kValueOffset), xmm_scratch); |
} else { |
__ fstp_d(FieldOperand(reg, HeapNumber::kValueOffset)); |
} |
@@ -5204,7 +5203,7 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) { |
if (use_sse2) { |
CpuFeatureScope scope(masm(), SSE2); |
XMMRegister input_reg = ToDoubleRegister(instr->value()); |
- __ movdbl(FieldOperand(reg, HeapNumber::kValueOffset), input_reg); |
+ __ movsd(FieldOperand(reg, HeapNumber::kValueOffset), input_reg); |
} else { |
__ fstp_d(FieldOperand(reg, HeapNumber::kValueOffset)); |
} |
@@ -5347,7 +5346,7 @@ void LCodeGen::EmitNumberUntagD(Register input_reg, |
} |
// Heap number to XMM conversion. |
- __ movdbl(result_reg, FieldOperand(input_reg, HeapNumber::kValueOffset)); |
+ __ movsd(result_reg, FieldOperand(input_reg, HeapNumber::kValueOffset)); |
if (deoptimize_on_minus_zero) { |
XMMRegister xmm_scratch = double_scratch0(); |
@@ -5369,7 +5368,7 @@ void LCodeGen::EmitNumberUntagD(Register input_reg, |
ExternalReference nan = |
ExternalReference::address_of_canonical_non_hole_nan(); |
- __ movdbl(result_reg, Operand::StaticVariable(nan)); |
+ __ movsd(result_reg, Operand::StaticVariable(nan)); |
__ jmp(&done, Label::kNear); |
} |
} else { |
@@ -5758,7 +5757,7 @@ void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) { |
// Heap number |
__ bind(&heap_number); |
- __ movdbl(xmm_scratch, FieldOperand(input_reg, HeapNumber::kValueOffset)); |
+ __ movsd(xmm_scratch, FieldOperand(input_reg, HeapNumber::kValueOffset)); |
__ ClampDoubleToUint8(xmm_scratch, temp_xmm_reg, input_reg); |
__ jmp(&done, Label::kNear); |