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

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

Issue 2036273002: PPC: [builtins] Migrate Math.log to TurboFan. (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/compiler/ppc/instruction-codes-ppc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ppc/code-generator-ppc.cc
diff --git a/src/compiler/ppc/code-generator-ppc.cc b/src/compiler/ppc/code-generator-ppc.cc
index 46e1122c7f46059ab6db8b4a9c0382871a0d7e70..c75e698e9572ad6d7c000ae5294671f0318ee142 100644
--- a/src/compiler/ppc/code-generator-ppc.cc
+++ b/src/compiler/ppc/code-generator-ppc.cc
@@ -437,6 +437,17 @@ Condition FlagsConditionToCondition(FlagsCondition condition, ArchOpcode op) {
} while (0)
+#define ASSEMBLE_FLOAT_LOG() \
+ do { \
+ FrameScope scope(masm(), StackFrame::MANUAL); \
+ __ PrepareCallCFunction(0, 1, kScratchReg); \
+ __ MovToFloatParameter(i.InputDoubleRegister(0)); \
+ __ CallCFunction(ExternalReference::math_log_double_function(isolate()), \
+ 0, 1); \
+ __ MovFromFloatResult(i.OutputDoubleRegister()); \
+ DCHECK_EQ(LeaveRC, i.OutputRCBit()); \
+ } while (0)
+
#define ASSEMBLE_FLOAT_MAX(scratch_reg) \
do { \
__ fsub(scratch_reg, i.InputDoubleRegister(0), i.InputDoubleRegister(1)); \
@@ -1229,6 +1240,11 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
// and generate a CallAddress instruction instead.
ASSEMBLE_FLOAT_MODULO();
break;
+ case kPPC_LogDouble:
+ // TODO(bmeurer): We should really get rid of this special instruction,
+ // and generate a CallAddress instruction instead.
+ ASSEMBLE_FLOAT_LOG();
+ break;
case kPPC_Neg:
__ neg(i.OutputRegister(), i.InputRegister(0), LeaveOE, i.OutputRCBit());
break;
« no previous file with comments | « no previous file | src/compiler/ppc/instruction-codes-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698