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

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

Issue 2403803002: [X87] [crankshaft] Set Floating-point precision in Math.Cos/Math.Sin to standard double precision. (Closed)
Patch Set: Created 4 years, 2 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-codegen-x87.cc
diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc
index ead2a3db42cafce374cf7d2cadcfb6b90e7283aa..f2832bb183d3cb7e704a348510e536d4de10b710 100644
--- a/src/crankshaft/x87/lithium-codegen-x87.cc
+++ b/src/crankshaft/x87/lithium-codegen-x87.cc
@@ -3660,7 +3660,9 @@ void LCodeGen::DoMathCos(LMathCos* instr) {
__ PrepareCallCFunction(2, eax);
__ fstp_d(MemOperand(esp, 0));
X87PrepareToWrite(result);
+ __ X87SetFPUCW(0x027F);
__ CallCFunction(ExternalReference::ieee754_cos_function(isolate()), 2);
+ __ X87SetFPUCW(0x037F);
// Return value is in st(0) on ia32.
X87CommitWrite(result);
}
@@ -3674,7 +3676,9 @@ void LCodeGen::DoMathSin(LMathSin* instr) {
__ PrepareCallCFunction(2, eax);
__ fstp_d(MemOperand(esp, 0));
X87PrepareToWrite(result);
+ __ X87SetFPUCW(0x027F);
__ CallCFunction(ExternalReference::ieee754_sin_function(isolate()), 2);
+ __ X87SetFPUCW(0x037F);
// Return value is in st(0) on ia32.
X87CommitWrite(result);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698