Skip to content

Commit 4957b3c

Browse files
committed
Enable wasm-simd f32x4 test
Use valid literal constant (old number was taken from the test that relied on runtime coersion). Enable running the test in buildExtractTests.js.
1 parent 625ec96 commit 4957b3c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

test/wasm.simd/buildExtractTests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function RunFloat32x4Tests() {
116116
exports = new WebAssembly.Instance(mod, ffi).exports;
117117

118118
check(1.0, "exports.func_f32x4_0");
119-
check(2147483648, "exports.func_f32x4_1");
119+
check(3.4028234663852886e+38, "exports.func_f32x4_1");
120120
check(2147483648, "exports.func_f32x4_2");
121121
check(-2147483648, "exports.func_f32x4_3");
122122
}
@@ -127,7 +127,7 @@ RunInt16x8UnsignedTests();
127127
RunInt16x8SignedTests();
128128
RunInt8x16UnsignedTests();
129129
RunInt8x16SignedTests();
130-
// FIXME broken extract_lane: RunFloat32x4Tests();
130+
RunFloat32x4Tests();
131131

132132
if(passed) {
133133
print("Passed");

test/wasm.simd/f32x4.wasm

0 Bytes
Binary file not shown.

test/wasm.simd/f32x4.wast

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88
(export "func_f32x4_0")
99
(result f32)
1010
(f32x4.extract_lane 0
11-
(v128.const i32 0x3f800000 0x7fffffff 0x4f000000 0xcf000000))
11+
(v128.const i32 0x3f800000 0x7f7fffff 0x4f000000 0xcf000000))
1212
)
1313
(func
1414
(export "func_f32x4_1")
1515
(result f32)
1616
(f32x4.extract_lane 1
17-
(v128.const i32 0x3f800000 0x7fffffff 0x4f000000 0xcf000000))
17+
(v128.const i32 0x3f800000 0x7f7fffff 0x4f000000 0xcf000000))
1818
)
1919
(func
2020
(export "func_f32x4_2")
2121
(result f32)
2222
(f32x4.extract_lane 2
23-
(v128.const i32 0x3f800000 0x7fffffff 0x4f000000 0xcf000000))
23+
(v128.const i32 0x3f800000 0x7f7fffff 0x4f000000 0xcf000000))
2424
)
2525
(func
2626
(export "func_f32x4_3")
2727
(result f32)
2828
(f32x4.extract_lane 3
29-
(v128.const i32 0x3f800000 0x7fffffff 0x4f000000 0xcf000000))
29+
(v128.const i32 0x3f800000 0x7f7fffff 0x4f000000 0xcf000000))
3030
)
3131
)

0 commit comments

Comments
 (0)