Commit 8c4e388e authored by balazs.kilvady's avatar balazs.kilvady Committed by Commit bot

MIPS: Fix 'MIPS: Followup [turbofan] Introduce new operators...

MIPS: Fix 'MIPS: Followup [turbofan] Introduce new operators Float32SubPreserveNan and Float64SubPreserveNan.'

Port eff959bb

Original commit message:
Float32SubMinusZero and Float64SubMinusZero tests are failing because MIPS does not preserve NaN payload according to Wasm spec. Implemented macro-assembler methods that check for NaN operands, and return the qNaN value with preserved payload and sign bits.

TEST=cctest/test-run-wasm/Run_WasmFloat32SubMinusZero, cctest/test-run-wasm/Run_WasmFloat64SubMinusZero
BUG=

Review-Url: https://codereview.chromium.org/2081993002
Cr-Commit-Position: refs/heads/master@{#37151}
parent 2cabc866
......@@ -23,14 +23,13 @@ const uint32_t kDoubleSignMask = HeapNumber::kSignMask;
const uint32_t kDoubleExponentShift = HeapNumber::kExponentShift;
const uint32_t kDoubleNaNShift = kDoubleExponentShift - 1;
const uint32_t kDoubleNaNMask =
kDoubleSignMask | HeapNumber::kExponentMask | (1 << kDoubleNaNShift);
HeapNumber::kExponentMask | (1 << kDoubleNaNShift);
const uint32_t kSingleSignMask = kBinary32SignMask;
const uint32_t kSingleExponentMask = kBinary32ExponentMask;
const uint32_t kSingleExponentShift = kBinary32ExponentShift;
const uint32_t kSingleNaNShift = kSingleExponentShift - 1;
const uint32_t kSingleNaNMask =
kSingleSignMask | kSingleExponentMask | (1 << kSingleNaNShift);
const uint32_t kSingleNaNMask = kSingleExponentMask | (1 << kSingleNaNShift);
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size,
CodeObjectRequired create_code_object)
......
......@@ -21,15 +21,13 @@ namespace internal {
const uint64_t kDoubleSignMask = Double::kSignMask;
const uint32_t kDoubleExponentShift = HeapNumber::kMantissaBits;
const uint32_t kDoubleNaNShift = kDoubleExponentShift - 1;
const uint64_t kDoubleNaNMask =
kDoubleSignMask | Double::kExponentMask | (1L << kDoubleNaNShift);
const uint64_t kDoubleNaNMask = Double::kExponentMask | (1L << kDoubleNaNShift);
const uint32_t kSingleSignMask = kBinary32SignMask;
const uint32_t kSingleExponentMask = kBinary32ExponentMask;
const uint32_t kSingleExponentShift = kBinary32ExponentShift;
const uint32_t kSingleNaNShift = kSingleExponentShift - 1;
const uint32_t kSingleNaNMask =
kSingleSignMask | kSingleExponentMask | (1 << kSingleNaNShift);
const uint32_t kSingleNaNMask = kSingleExponentMask | (1 << kSingleNaNShift);
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size,
CodeObjectRequired create_code_object)
......
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