Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(906)

Unified Diff: src/x87/lithium-codegen-x87.cc

Issue 700053003: Set the FPU precision control to double-precision. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/lithium-codegen-x87.cc
diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc
index 2766b658fd1a0c28498173e12b527582092ece76..35d95532c1278b8d11771261b32e11906784efa5 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,7 @@ 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));
+ __ X87SetFPUCW(0x037F);
}
« no previous file with comments | « no previous file | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698