aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2014-11-12 02:36:07 +0000
committerBen Murdoch <benm@google.com>2014-11-12 02:36:07 +0000
commit2bdb5c84b88fe64a13ed5a17a5e482190c6cd9c9 (patch)
treefec81dbd00c5d184896bb4d0001746b62bb013d2
parente9d7eff67019473a0a0d97267ac2d148fd8e08c8 (diff)
parent32157030fdea5773288de46e84f118d22def5fd2 (diff)
downloadv8-2bdb5c84b88fe64a13ed5a17a5e482190c6cd9c9.tar.gz
Merge from Chromium at DEPS revision 39.0.2171.59
This commit was generated by merge_to_master.py. Change-Id: Icc82dfd5fe6115ae33a4895c0a56147ef871e4bd
-rw-r--r--src/version.cc2
-rw-r--r--src/x87/lithium-codegen-x87.cc16
-rw-r--r--src/x87/macro-assembler-x87.cc7
-rw-r--r--src/x87/macro-assembler-x87.h1
4 files changed, 16 insertions, 10 deletions
diff --git a/src/version.cc b/src/version.cc
index 75846224d..a6c529e36 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 00bbe5e72..a5bc5eae0 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);
}
@@ -4062,8 +4060,8 @@ void LCodeGen::DoMathSqrt(LMathSqrt* instr) {
__ 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 @@ void LCodeGen::DoMathExp(LMathExp* instr) {
__ 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 47a46d4e3..a1fa3317d 100644
--- a/src/x87/macro-assembler-x87.cc
+++ b/src/x87/macro-assembler-x87.cc
@@ -767,6 +767,13 @@ void MacroAssembler::X87SetRC(int rc) {
}
+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 ed0b7c174..c9e9087f9 100644
--- a/src/x87/macro-assembler-x87.h
+++ b/src/x87/macro-assembler-x87.h
@@ -425,6 +425,7 @@ class MacroAssembler: public Assembler {
void FXamSign();
void X87CheckIA();
void X87SetRC(int rc);
+ void X87SetFPUCW(int cw);
void ClampUint8(Register reg);
void ClampTOSToUint8(Register result_reg);