| Index: src/wasm/function-body-decoder.h
|
| diff --git a/src/wasm/function-body-decoder.h b/src/wasm/function-body-decoder.h
|
| index 63215c590f20cde96f7347a4f62c8e3a155a05d4..836dda4b44a9c4408f85aab006237cc6d30e2e3a 100644
|
| --- a/src/wasm/function-body-decoder.h
|
| +++ b/src/wasm/function-body-decoder.h
|
| @@ -70,9 +70,7 @@
|
| float value;
|
| unsigned length;
|
| inline ImmF32Operand(Decoder* decoder, const byte* pc) {
|
| - // Avoid bit_cast because it might not preserve the signalling bit of a NaN.
|
| - uint32_t tmp = decoder->checked_read_u32(pc, 1, "immf32");
|
| - value = *reinterpret_cast<float*>(&tmp);
|
| + value = bit_cast<float>(decoder->checked_read_u32(pc, 1, "immf32"));
|
| length = 4;
|
| }
|
| };
|
| @@ -81,9 +79,7 @@
|
| double value;
|
| unsigned length;
|
| inline ImmF64Operand(Decoder* decoder, const byte* pc) {
|
| - // Avoid bit_cast because it might not preserve the signalling bit of a NaN.
|
| - uint64_t tmp = decoder->checked_read_u64(pc, 1, "immf64");
|
| - value = *reinterpret_cast<double*>(&tmp);
|
| + value = bit_cast<double>(decoder->checked_read_u64(pc, 1, "immf64"));
|
| length = 8;
|
| }
|
| };
|
|
|