Skip to content

Commit 1ac16c2

Browse files
Try fixing nans
1 parent e2334d2 commit 1ac16c2

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

scripts/test/shared.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -443,14 +443,14 @@ def get_tests(test_dir, extensions=[], recursive=False):
443443
'token.wast', # Lexer should require spaces between strings and non-paren tokens
444444
]
445445

446-
if get_platform() == 'linux':
447-
SPEC_TESTSUITE_TESTS_TO_SKIP += [
448-
# Errors on Linux x86_64 with musl, https://github.com/WebAssembly/binaryen/pull/8557
449-
'f32.wast',
450-
'f64.wast',
451-
'simd_f32x4_rounding.wast',
452-
'simd_f64x2_rounding.wast',
453-
]
446+
# if get_platform() == 'linux':
447+
# SPEC_TESTSUITE_TESTS_TO_SKIP += [
448+
# # Errors on Linux x86_64 with musl, https://github.com/WebAssembly/binaryen/pull/8557
449+
# 'f32.wast',
450+
# 'f64.wast',
451+
# 'simd_f32x4_rounding.wast',
452+
# 'simd_f64x2_rounding.wast',
453+
# ]
454454

455455

456456
def _can_run_spec_test(test):

src/wasm/literal.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,9 +1142,9 @@ Literal Literal::trunc() const {
11421142
Literal Literal::nearbyint() const {
11431143
switch (type.getBasic()) {
11441144
case Type::f32:
1145-
return Literal(std::nearbyint(getf32()));
1145+
return standardizeNaN(Literal(std::nearbyint(getf32())));
11461146
case Type::f64:
1147-
return Literal(std::nearbyint(getf64()));
1147+
return standardizeNaN(Literal(std::nearbyint(getf64())));
11481148
default:
11491149
WASM_UNREACHABLE("unexpected type");
11501150
}

0 commit comments

Comments
 (0)