| Index: src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/crankshaft/ia32/lithium-codegen-ia32.cc b/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| index 48a7f3f13558bb0cc33b1c19afdd4389f2121bca..d9ab65f7bfd3fc0c9760b1379b804ce054ee925a 100644
|
| --- a/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| @@ -3421,6 +3421,35 @@ void LCodeGen::DoMathClz32(LMathClz32* instr) {
|
| __ Lzcnt(result, input);
|
| }
|
|
|
| +void LCodeGen::DoMathCos(LMathCos* instr) {
|
| + XMMRegister input = ToDoubleRegister(instr->value());
|
| + XMMRegister result = ToDoubleRegister(instr->result());
|
| + // Pass one double as argument on the stack.
|
| + __ PrepareCallCFunction(2, eax);
|
| + __ movsd(Operand(esp, 0 * kDoubleSize), input);
|
| + __ CallCFunction(ExternalReference::ieee754_cos_function(isolate()), 2);
|
| + // Return value is in st(0) on ia32.
|
| + // Store it into the result register.
|
| + __ sub(esp, Immediate(kDoubleSize));
|
| + __ fstp_d(Operand(esp, 0));
|
| + __ movsd(result, Operand(esp, 0));
|
| + __ add(esp, Immediate(kDoubleSize));
|
| +}
|
| +
|
| +void LCodeGen::DoMathSin(LMathSin* instr) {
|
| + XMMRegister input = ToDoubleRegister(instr->value());
|
| + XMMRegister result = ToDoubleRegister(instr->result());
|
| + // Pass one double as argument on the stack.
|
| + __ PrepareCallCFunction(2, eax);
|
| + __ movsd(Operand(esp, 0 * kDoubleSize), input);
|
| + __ CallCFunction(ExternalReference::ieee754_sin_function(isolate()), 2);
|
| + // Return value is in st(0) on ia32.
|
| + // Store it into the result register.
|
| + __ sub(esp, Immediate(kDoubleSize));
|
| + __ fstp_d(Operand(esp, 0));
|
| + __ movsd(result, Operand(esp, 0));
|
| + __ add(esp, Immediate(kDoubleSize));
|
| +}
|
|
|
| void LCodeGen::DoMathExp(LMathExp* instr) {
|
| XMMRegister input = ToDoubleRegister(instr->value());
|
|
|