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

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

Issue 2077533002: [builtins] Introduce proper Float64Exp operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Import tests from Raymond. Created 4 years, 6 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
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 cdd96a0826f6f28ea989c42278113b1614c92372..48a7f3f13558bb0cc33b1c19afdd4389f2121bca 100644
--- a/src/crankshaft/ia32/lithium-codegen-ia32.cc
+++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc
@@ -3425,11 +3425,16 @@ void LCodeGen::DoMathClz32(LMathClz32* instr) {
void LCodeGen::DoMathExp(LMathExp* instr) {
XMMRegister input = ToDoubleRegister(instr->value());
XMMRegister result = ToDoubleRegister(instr->result());
- XMMRegister temp0 = double_scratch0();
- Register temp1 = ToRegister(instr->temp1());
- Register temp2 = ToRegister(instr->temp2());
-
- MathExpGenerator::EmitMathExp(masm(), input, result, temp0, temp1, temp2);
+ // Pass one double as argument on the stack.
+ __ PrepareCallCFunction(2, eax);
+ __ movsd(Operand(esp, 0 * kDoubleSize), input);
+ __ CallCFunction(ExternalReference::ieee754_exp_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::PrepareForTailCall(const ParameterCount& actual,

Powered by Google App Engine
This is Rietveld 408576698