| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index 3662d21c04772572c30f9f428cb2e685626c1ee7..c93e2afa9d577fc637da0bd1e28c601855a6095a 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -2271,6 +2271,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()),
|
| @@ -5014,14 +5016,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);
|
| + }
|
| }
|
|
|
|
|
|
|