[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}
This commit is contained in:
zhengxing.li 2016-10-10 19:13:29 -07:00 committed by Commit bot
parent 127798897f
commit ecc7d969ea

View File

@ -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);
}