| Index: test/cctest/wasm/test-run-wasm.cc
|
| diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
|
| index f5c6f62e7c36207a2c0e046c57b37b8b070540e0..c9f1936c1ea113ba6ee8d6854895fe0d5f4d8da9 100644
|
| --- a/test/cctest/wasm/test-run-wasm.cc
|
| +++ b/test/cctest/wasm/test-run-wasm.cc
|
| @@ -609,15 +609,30 @@ WASM_EXEC_TEST(Float32SubMinusZero) {
|
| WasmRunner<float> r(execution_mode, MachineType::Float32());
|
| BUILD(r, WASM_F32_SUB(WASM_F32(-0.0), WASM_GET_LOCAL(0)));
|
|
|
| - CHECK_EQ(0x7fe00000, bit_cast<uint32_t>(r.Call(bit_cast<float>(0x7fa00000))));
|
| + uint32_t sNanValue =
|
| + bit_cast<uint32_t>(std::numeric_limits<float>::signaling_NaN());
|
| + uint32_t qNanValue =
|
| + bit_cast<uint32_t>(std::numeric_limits<float>::quiet_NaN());
|
| + uint32_t payload = 0x00200000;
|
| +
|
| + uint32_t expected = (qNanValue & 0xffc00000) | payload;
|
| + uint32_t operand = (sNanValue & 0xffc00000) | payload;
|
| + CHECK_EQ(expected, bit_cast<uint32_t>(r.Call(bit_cast<float>(operand))));
|
| }
|
|
|
| WASM_EXEC_TEST(Float64SubMinusZero) {
|
| WasmRunner<double> r(execution_mode, MachineType::Float64());
|
| BUILD(r, WASM_F64_SUB(WASM_F64(-0.0), WASM_GET_LOCAL(0)));
|
|
|
| - CHECK_EQ(0x7ff8123456789abc,
|
| - bit_cast<uint64_t>(r.Call(bit_cast<double>(0x7ff0123456789abc))));
|
| + uint64_t sNanValue =
|
| + bit_cast<uint64_t>(std::numeric_limits<double>::signaling_NaN());
|
| + uint64_t qNanValue =
|
| + bit_cast<uint64_t>(std::numeric_limits<double>::quiet_NaN());
|
| + uint64_t payload = 0x0000123456789abc;
|
| +
|
| + uint64_t expected = (qNanValue & 0xfff8000000000000) | payload;
|
| + uint64_t operand = (sNanValue & 0xfff8000000000000) | payload;
|
| + CHECK_EQ(expected, bit_cast<uint64_t>(r.Call(bit_cast<double>(operand))));
|
| }
|
|
|
| WASM_EXEC_TEST(Float64Neg) {
|
|
|