Commit ecc7d969 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

[X87] [crankshaft] Set Floating-point precision in Math.Cos/Math.Sin to standard double precision.

  This CL set Floating-point precision in Math.Cos/Math.Sin in Crankshaft compiler to standard double precision which is expected by v8.

BUG=

Review-Url: https://codereview.chromium.org/2403803002
Cr-Commit-Position: refs/heads/master@{#40146}
parent 12779889
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment