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

Unified Diff: src/assembler.cc

Issue 1638283004: [wasm] Backoff implementation for F64Trunc using std::trunc. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@init-root-register
Patch Set: Use math.h trunc instead of std::trunc. Created 4 years, 11 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 | « src/assembler.h ('k') | src/compiler/wasm-compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index 4099e1febcfc5272953c43fc3abaede1f024da80..dd9175c295561b4f9116c76afc27f44381425af2 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -34,6 +34,7 @@
#include "src/assembler.h"
+#include <math.h>
#include <cmath>
#include "src/api.h"
#include "src/base/cpu.h"
@@ -1131,6 +1132,12 @@ ExternalReference ExternalReference::compute_output_frames_function(
Redirect(isolate, FUNCTION_ADDR(Deoptimizer::ComputeOutputFrames)));
}
+static void trunc64_wrapper(double* param) { *param = trunc(*param); }
ahaas 2016/02/01 12:04:02 std::trunc caused problems on android.
+
+ExternalReference ExternalReference::trunc64_wrapper_function(
+ Isolate* isolate) {
+ return ExternalReference(Redirect(isolate, FUNCTION_ADDR(trunc64_wrapper)));
+}
ExternalReference ExternalReference::log_enter_external_function(
Isolate* isolate) {
« no previous file with comments | « src/assembler.h ('k') | src/compiler/wasm-compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698