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

Unified Diff: src/wasm/wasm-external-refs.cc

Issue 2177863002: Fix failure in mjsunit/wasm/embenchen/box2d on 32-bit architectures that do not support unaligned a… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-external-refs.cc
diff --git a/src/wasm/wasm-external-refs.cc b/src/wasm/wasm-external-refs.cc
index 52a96959b16cdb4c16cfc77aa4ba9a310161c0eb..09294c2c288ffeff6c436ccd4c39677d54ab8d8a 100644
--- a/src/wasm/wasm-external-refs.cc
+++ b/src/wasm/wasm-external-refs.cc
@@ -25,13 +25,21 @@ void f32_ceil_wrapper(float* param) { *param = ceilf(*param); }
void f32_nearest_int_wrapper(float* param) { *param = nearbyintf(*param); }
-void f64_trunc_wrapper(double* param) { *param = trunc(*param); }
+void f64_trunc_wrapper(double* param) {
+ WriteDoubleValue(param, trunc(ReadDoubleValue(param)));
+}
-void f64_floor_wrapper(double* param) { *param = floor(*param); }
+void f64_floor_wrapper(double* param) {
+ WriteDoubleValue(param, floor(ReadDoubleValue(param)));
+}
-void f64_ceil_wrapper(double* param) { *param = ceil(*param); }
+void f64_ceil_wrapper(double* param) {
+ WriteDoubleValue(param, ceil(ReadDoubleValue(param)));
+}
-void f64_nearest_int_wrapper(double* param) { *param = nearbyint(*param); }
+void f64_nearest_int_wrapper(double* param) {
+ WriteDoubleValue(param, nearbyint(ReadDoubleValue(param)));
+}
void int64_to_float32_wrapper(int64_t* input, float* output) {
*output = static_cast<float>(*input);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698