Skip to content

Commit c8f02b4

Browse files
committed
Alternative output for i32x4_relaxed_trunc.wast tests
Additional variants for i32x4.relaxed_trunc_f32x4_u and i32x4.relaxed_trunc_f64x2_u_zero based on algorithms implemented by SpiderMonkey and v8.
1 parent ba2d5eb commit c8f02b4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/core/relaxed-simd/i32x4_relaxed_trunc.wast

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@
5050
(v128.const f32x4 0 -1.0 4294967040.0 4294967296.0))
5151
;; out of range -> saturate or UINT32_MAX
5252
(either (v128.const i32x4 0 0 4294967040 0xffffffff)
53-
(v128.const i32x4 0 0xffffffff 4294967040 0xffffffff)))
53+
(v128.const i32x4 0 0xffffffff 4294967040 0xffffffff)
54+
(v128.const i32x4 0 0xffffffff 4294967040 0)))
5455

5556
(assert_return (invoke "i32x4.relaxed_trunc_f32x4_u"
5657
(v128.const f32x4 nan -nan nan:0x444444 -nan:0x444444))
5758
;; nans -> 0 or UINT32_MAX
5859
(either (v128.const i32x4 0 0 0 0)
59-
(v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)))
60+
(v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)
61+
(v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)))
6062

6163
(assert_return (invoke "i32x4.relaxed_trunc_f64x2_s_zero"
6264
(v128.const f64x2 -2147483904.0 2147483904.0))
@@ -73,7 +75,8 @@
7375
(v128.const f64x2 -1.0 4294967296.0))
7476
;; out of range -> saturate or UINT32_MAX
7577
(either (v128.const i32x4 0 0xffffffff 0 0)
76-
(v128.const i32x4 0xffffffff 0xffffffff 0 0)))
78+
(v128.const i32x4 0xffffffff 0xffffffff 0 0)
79+
(v128.const i32x4 0xfffffffe 0 0 0)))
7780

7881
(assert_return (invoke "i32x4.relaxed_trunc_f64x2_u_zero"
7982
(v128.const f64x2 nan -nan))

0 commit comments

Comments
 (0)