Commit 114c109a authored by ivica.bogosavljevic's avatar ivica.bogosavljevic Committed by Commit bot

MIPS: Fix Run_Wasm_F32CopySign.

Run_Wasm_F32CopySign was failing because function copysign
that is used to verify the results does implicit conversion
from float to double. In this conversion we lose information
about NaN sign and the test fails.

Fix by using copysignf to avoid unnecessary float to double
conversion.

TEST=cctest/test-run-wasm/Run_Wasm_F32CopySign
BUG=

Review URL: https://codereview.chromium.org/1857753002

Cr-Commit-Position: refs/heads/master@{#35237}
parent f7e7ba11
......@@ -2772,7 +2772,7 @@ TEST(Run_Wasm_F32CopySign) {
BUILD(r, WASM_F32_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
FOR_FLOAT32_INPUTS(i) {
FOR_FLOAT32_INPUTS(j) { CHECK_FLOAT_EQ(copysign(*i, *j), r.Call(*i, *j)); }
FOR_FLOAT32_INPUTS(j) { CHECK_FLOAT_EQ(copysignf(*i, *j), r.Call(*i, *j)); }
}
}
......
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