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

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

Issue 2060743002: [builtins] Introduce proper Float64Log1p operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@Math_Log
Patch Set: REBASE 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/compiler/x64/code-generator-x64.cc
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
index 9ed183a391668cc076f9c03a4e56e2257daa02c9..43633e0de41d89af5c32765a8e4ea4f6ef812643 100644
--- a/src/compiler/x64/code-generator-x64.cc
+++ b/src/compiler/x64/code-generator-x64.cc
@@ -594,6 +594,13 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
} \
} while (false)
+#define ASSEMBLE_IEEE754_UNOP(name) \
+ do { \
+ __ PrepareCallCFunction(1); \
+ __ CallCFunction(ExternalReference::ieee754_##name##_function(isolate()), \
+ 1); \
+ } while (false)
+
void CodeGenerator::AssembleDeconstructFrame() {
__ movq(rsp, rbp);
__ popq(rbp);
@@ -841,8 +848,10 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
break;
}
case kIeee754Float64Log:
- __ PrepareCallCFunction(1);
- __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 1);
+ ASSEMBLE_IEEE754_UNOP(log);
+ break;
+ case kIeee754Float64Log1p:
+ ASSEMBLE_IEEE754_UNOP(log1p);
break;
case kX64Add32:
ASSEMBLE_BINOP(addl);

Powered by Google App Engine
This is Rietveld 408576698