| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index b027b39d2774d2e73cf765539e802d1947fc98e9..d73fdfba8a802d0c5885eb282711d2e0a28b6c15 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -2276,6 +2276,8 @@ void LCodeGen::DoArithmeticD(LArithmeticD* instr) {
|
| __ PrepareCallCFunction(4, eax);
|
| X87Mov(Operand(esp, 1 * kDoubleSize), right);
|
| X87Mov(Operand(esp, 0), left);
|
| + X87Free(right);
|
| + ASSERT(left.is(result));
|
| X87PrepareToWrite(result);
|
| __ CallCFunction(
|
| ExternalReference::double_fp_operation(Token::MOD, isolate()),
|
| @@ -5016,14 +5018,21 @@ void LCodeGen::DoInteger32ToSmi(LInteger32ToSmi* instr) {
|
|
|
|
|
| void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) {
|
| - CpuFeatureScope scope(masm(), SSE2);
|
| LOperand* input = instr->value();
|
| LOperand* output = instr->result();
|
| - LOperand* temp = instr->temp();
|
| + if (CpuFeatures::IsSupported(SSE2)) {
|
| + CpuFeatureScope scope(masm(), SSE2);
|
| + LOperand* temp = instr->temp();
|
|
|
| - __ LoadUint32(ToDoubleRegister(output),
|
| - ToRegister(input),
|
| - ToDoubleRegister(temp));
|
| + __ LoadUint32(ToDoubleRegister(output),
|
| + ToRegister(input),
|
| + ToDoubleRegister(temp));
|
| + } else {
|
| + X87Register res = ToX87Register(output);
|
| + X87PrepareToWrite(res);
|
| + __ LoadUint32NoSSE2(ToRegister(input));
|
| + X87CommitWrite(res);
|
| + }
|
| }
|
|
|
|
|
|
|