merge in lmp-mr1-release history after reset to lmp-mr1-dev
diff --git a/src/version.cc b/src/version.cc index 7584622..a6c529e 100644 --- a/src/version.cc +++ b/src/version.cc
@@ -35,7 +35,7 @@ #define MAJOR_VERSION 3 #define MINOR_VERSION 29 #define BUILD_NUMBER 88 -#define PATCH_LEVEL 15 +#define PATCH_LEVEL 17 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) #define IS_CANDIDATE_VERSION 0
diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc index 00bbe5e..a5bc5ea 100644 --- a/src/x87/lithium-codegen-x87.cc +++ b/src/x87/lithium-codegen-x87.cc
@@ -2272,6 +2272,8 @@ 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 @@ 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); } @@ -4062,8 +4060,8 @@ __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); __ push(temp_result); __ CallRuntimeSaveDoubles(Runtime::kMathSqrtRT); - RecordSafepointWithRegisters( - instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); + RecordSafepointWithRegisters(instr->pointer_map(), 1, + Safepoint::kNoLazyDeopt); __ StoreToSafepointRegisterSlot(temp_result, eax); } X87PrepareToWrite(result_reg); @@ -4277,7 +4275,7 @@ __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); __ push(temp_result); __ CallRuntimeSaveDoubles(Runtime::kMathExpRT); - RecordSafepointWithRegisters(instr->pointer_map(), 0, + RecordSafepointWithRegisters(instr->pointer_map(), 1, Safepoint::kNoLazyDeopt); __ StoreToSafepointRegisterSlot(temp_result, eax); }
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc index 47a46d4..a1fa331 100644 --- a/src/x87/macro-assembler-x87.cc +++ b/src/x87/macro-assembler-x87.cc
@@ -767,6 +767,13 @@ } +void MacroAssembler::X87SetFPUCW(int cw) { + push(Immediate(cw)); + fldcw(MemOperand(esp, 0)); + add(esp, Immediate(kPointerSize)); +} + + void MacroAssembler::AssertNumber(Register object) { if (emit_debug_code()) { Label ok;
diff --git a/src/x87/macro-assembler-x87.h b/src/x87/macro-assembler-x87.h index ed0b7c1..c9e9087 100644 --- a/src/x87/macro-assembler-x87.h +++ b/src/x87/macro-assembler-x87.h
@@ -425,6 +425,7 @@ void FXamSign(); void X87CheckIA(); void X87SetRC(int rc); + void X87SetFPUCW(int cw); void ClampUint8(Register reg); void ClampTOSToUint8(Register result_reg);