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

Unified Diff: src/compiler/x87/code-generator-x87.cc

Issue 2119773003: X87: [turbofan] Introduce Float64Pow and NumberPow operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « no previous file | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x87/code-generator-x87.cc
diff --git a/src/compiler/x87/code-generator-x87.cc b/src/compiler/x87/code-generator-x87.cc
index 6bacda0cb6dc3c9a2774cb1ffd577187d0571572..c2dd40c56b4ba3dfa0b468a4f3e2a2d5e8c11d82 100644
--- a/src/compiler/x87/code-generator-x87.cc
+++ b/src/compiler/x87/code-generator-x87.cc
@@ -785,6 +785,16 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
case kIeee754Float64Log10:
ASSEMBLE_IEEE754_UNOP(log10);
break;
+ case kIeee754Float64Pow: {
+ // Keep the x87 FPU stack empty before calling stub code
+ __ fstp(0);
+ // Call the MathStub and put return value in stX_0
+ MathPowStub stub(isolate(), MathPowStub::DOUBLE);
+ __ CallStub(&stub);
+ /* Return value is in st(0) on x87. */
+ __ lea(esp, Operand(esp, 2 * kDoubleSize));
+ break;
+ }
case kIeee754Float64Sin:
__ X87SetFPUCW(0x027F);
ASSEMBLE_IEEE754_UNOP(sin);
« no previous file with comments | « no previous file | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698