Commit 4334e2b8 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

Fix ubsan errors in tests

See https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/7102

Change-Id: I2c6577be06dbcafe11f7911cc6b3ec4b7bea5c5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1703764Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62734}
parent ee2b5a56
......@@ -383,7 +383,8 @@ int64_t LessEqual(double a, double b) { return a <= b ? -1 : 0; }
void RunWasm_##name##_Impl(LowerSimd lower_simd, ExecutionTier execution_tier)
// Returns true if the platform can represent the result.
bool PlatformCanRepresent(float x) {
template <typename T>
bool PlatformCanRepresent(T x) {
#if V8_TARGET_ARCH_ARM
return std::fpclassify(x) != FP_SUBNORMAL;
#else
......
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