Revision: 25137
Author: [email protected]
Date: Wed Nov 5 10:01:22 2014 UTC
Log: Version 3.29.88.16 (merged r25125)
x87: Set the FPU precision control to double-precision.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/700943004
https://code.google.com/p/v8/source/detail?r=25137
Modified:
/branches/3.29/src/version.cc
/branches/3.29/src/x87/lithium-codegen-x87.cc
/branches/3.29/src/x87/macro-assembler-x87.cc
/branches/3.29/src/x87/macro-assembler-x87.h
=======================================
--- /branches/3.29/src/version.cc Tue Nov 4 15:10:33 2014 UTC
+++ /branches/3.29/src/version.cc Wed Nov 5 10:01:22 2014 UTC
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 29
#define BUILD_NUMBER 88
-#define PATCH_LEVEL 15
+#define PATCH_LEVEL 16
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
=======================================
--- /branches/3.29/src/x87/lithium-codegen-x87.cc Tue Oct 14 08:52:50 2014
UTC
+++ /branches/3.29/src/x87/lithium-codegen-x87.cc Wed Nov 5 10:01:22 2014
UTC
@@ -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);
}
=======================================
--- /branches/3.29/src/x87/macro-assembler-x87.cc Thu Sep 25 00:05:09 2014
UTC
+++ /branches/3.29/src/x87/macro-assembler-x87.cc Wed Nov 5 10:01:22 2014
UTC
@@ -765,6 +765,13 @@
fldcw(MemOperand(esp, 0));
add(esp, Immediate(kPointerSize));
}
+
+
+void MacroAssembler::X87SetFPUCW(int cw) {
+ push(Immediate(cw));
+ fldcw(MemOperand(esp, 0));
+ add(esp, Immediate(kPointerSize));
+}
void MacroAssembler::AssertNumber(Register object) {
=======================================
--- /branches/3.29/src/x87/macro-assembler-x87.h Mon Oct 13 12:12:16 2014
UTC
+++ /branches/3.29/src/x87/macro-assembler-x87.h Wed Nov 5 10:01:22 2014
UTC
@@ -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);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.