| Index: src/x87/lithium-codegen-x87.cc
|
| diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc
|
| index 00bbe5e72bab8245367fd7619bdd6c09b94b1414..75bf0a9e0d218ea127a8932e16e2fbd4f761b209 100644
|
| --- a/src/x87/lithium-codegen-x87.cc
|
| +++ b/src/x87/lithium-codegen-x87.cc
|
| @@ -2272,6 +2272,8 @@ void LCodeGen::DoArithmeticD(LArithmeticD* instr) {
|
| if (instr->op() != Token::MOD) {
|
| X87PrepareBinaryOp(left, right, result);
|
| }
|
| + // Set the precision control to double-precision.
|
| + __ X87SetFPUCW(0x027F);
|
| switch (instr->op()) {
|
| case Token::ADD:
|
| __ fadd_i(1);
|
| @@ -2306,12 +2308,8 @@ void LCodeGen::DoArithmeticD(LArithmeticD* instr) {
|
| break;
|
| }
|
|
|
| - // Only always explicitly storing to memory to force the round-down for double
|
| - // arithmetic.
|
| - __ lea(esp, Operand(esp, -kDoubleSize));
|
| - __ fstp_d(Operand(esp, 0));
|
| - __ fld_d(Operand(esp, 0));
|
| - __ lea(esp, Operand(esp, kDoubleSize));
|
| + // Restore the default value of control word.
|
| + __ X87SetFPUCW(0x037F);
|
| }
|
|
|
|
|
|
|