Commit d6386efa authored by ivica.bogosavljevic's avatar ivica.bogosavljevic Committed by Commit bot

Fix failure in mjsunit/wasm/embenchen/box2d on 32-bit architectures that do...

Fix failure in mjsunit/wasm/embenchen/box2d on 32-bit architectures that do not support unaligned access.

This test fails because WasmGraphBuilder::BuildCFuncInstruction allocates
space for doubles using StackSlot turbofan operator, but this space is not
guaranteed to be 8 bytes aligned if SP itself is not 8 bytes aligned (which
is the case on 32-bit architectures).

BUG=mjsunit/wasm/embenchen/box2d

Review-Url: https://codereview.chromium.org/2177863002
Cr-Commit-Position: refs/heads/master@{#38039}
parent 32346aae
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment