Commit 0b99ede9 authored by Richard Townsend's avatar Richard Townsend Committed by Commit Bot

[arm64][msvc] remove signbit ambiguity

MSVC 19.25 complains about signbit being ambiguous between
signbit(float) and signbit(double) overloads when called with an int8_t.
To remove the ambiguity, cast to a double.

Change-Id: I698f05eed9248eef493bbe46b75fcd07e37e2a05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2118510Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#66856}
parent 28d2cb1f
......@@ -1677,7 +1677,7 @@ WASM_SIMD_TEST_NO_LOWERING(I8x16BitMask) {
FOR_INT8_INPUTS(x) {
int32_t actual = r.Call(x);
// Lane 0 is always 0 (positive), lane 1 is always -1.
int32_t expected = std::signbit(x) ? 0xFFFE : 0x0002;
int32_t expected = std::signbit(static_cast<double>(x)) ? 0xFFFE : 0x0002;
CHECK_EQ(actual, expected);
}
}
......@@ -1697,7 +1697,7 @@ WASM_SIMD_TEST_NO_LOWERING(I16x8BitMask) {
FOR_INT16_INPUTS(x) {
int32_t actual = r.Call(x);
// Lane 0 is always 0 (positive), lane 1 is always -1.
int32_t expected = std::signbit(x) ? 0xFE : 2;
int32_t expected = std::signbit(static_cast<double>(x)) ? 0xFE : 2;
CHECK_EQ(actual, expected);
}
}
......@@ -1717,7 +1717,7 @@ WASM_SIMD_TEST_NO_LOWERING(I32x4BitMask) {
FOR_INT32_INPUTS(x) {
int32_t actual = r.Call(x);
// Lane 0 is always 0 (positive), lane 1 is always -1.
int32_t expected = std::signbit(x) ? 0xE : 2;
int32_t expected = std::signbit(static_cast<double>(x)) ? 0xE : 2;
CHECK_EQ(actual, expected);
}
}
......
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