File tree 7 files changed +13
-2
lines changed
7 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,7 @@ let simd_prefix s =
372
372
| 0xb9l -> i32x4_max_u
373
373
| 0xbal -> i32x4_dot_i16x8_s
374
374
| 0xc1l -> i64x2_neg
375
+ | 0xc4l -> i64x2_bitmask
375
376
| 0xcbl -> i64x2_shl
376
377
| 0xccl -> i64x2_shr_s
377
378
| 0xcdl -> i64x2_shr_u
Original file line number Diff line number Diff line change @@ -601,6 +601,7 @@ let encode m =
601
601
| SimdBitmask Simd. I8x16 -> simd_op 0x64l
602
602
| SimdBitmask Simd. I16x8 -> simd_op 0x84l
603
603
| SimdBitmask Simd. I32x4 -> simd_op 0xa4l
604
+ | SimdBitmask Simd. I64x2 -> simd_op 0xc4l
604
605
| SimdBitmask (_ ) -> assert false
605
606
606
607
| _ -> assert false
Original file line number Diff line number Diff line change @@ -221,6 +221,7 @@ module SimdOp (SXX : Simd.S) (Value : ValueType with type t = SXX.t) = struct
221
221
| Simd. I8x16 -> SXX.I8x16. bitmask
222
222
| Simd. I16x8 -> SXX.I16x8. bitmask
223
223
| Simd. I32x4 -> SXX.I32x4. bitmask
224
+ | Simd. I64x2 -> SXX.I64x2. bitmask
224
225
| _ -> assert false
225
226
in I32 (f (of_value 1 v))
226
227
Original file line number Diff line number Diff line change @@ -379,6 +379,7 @@ let i64x2_mul = Binary (V128 V128Op.(I64x2 Mul))
379
379
let i64x2_shl = SimdShift V128Op. (I64x2 Shl )
380
380
let i64x2_shr_s = SimdShift V128Op. (I64x2 ShrS )
381
381
let i64x2_shr_u = SimdShift V128Op. (I64x2 ShrU )
382
+ let i64x2_bitmask = SimdBitmask Simd. I64x2
382
383
383
384
let f32x4_splat = Convert (V128 V128Op. (F32x4 Splat ))
384
385
let f32x4_extract_lane imm = SimdExtract (V128Op. F32x4 (ZX , imm))
Original file line number Diff line number Diff line change @@ -394,6 +394,7 @@ struct
394
394
| Simd. I8x16 -> " i8x16.bitmask"
395
395
| Simd. I16x8 -> " i16x8.bitmask"
396
396
| Simd. I32x4 -> " i32x4.bitmask"
397
+ | Simd. I64x2 -> " i64x2.bitmask"
397
398
| _ -> assert false
398
399
399
400
end
Original file line number Diff line number Diff line change @@ -532,8 +532,7 @@ rule token = parse
532
532
{ only [" i8x16" ; " i16x8" ; " i32x4" ] s lexbuf;
533
533
UNARY (simd_int_op s i8x16_all_true i16x8_all_true i32x4_all_true unreachable) }
534
534
| (simd_int_shape as s)" .bitmask"
535
- { only [" i8x16" ; " i16x8" ; " i32x4" ] s lexbuf;
536
- UNARY (simd_int_op s i8x16_bitmask i16x8_bitmask i32x4_bitmask unreachable) }
535
+ { UNARY (simd_int_op s i8x16_bitmask i16x8_bitmask i32x4_bitmask i64x2_bitmask) }
537
536
| (simd_int_shape as s)" .shl"
538
537
{ SHIFT (simd_int_op s i8x16_shl i16x8_shl i32x4_shl i64x2_shl) }
539
538
| (simd_int_shape as s)" .shr_s"
Original file line number Diff line number Diff line change 12
12
(func (export " i32x4.any_true" ) (param $0 v128 ) (result i32 ) (i32x4.any_true (local.get $0 )))
13
13
(func (export " i32x4.all_true" ) (param $0 v128 ) (result i32 ) (i32x4.all_true (local.get $0 )))
14
14
(func (export " i32x4.bitmask" ) (param $0 v128 ) (result i32 ) (i32x4.bitmask (local.get $0 )))
15
+
16
+ (func (export " i64x2.bitmask" ) (param $0 v128 ) (result i32 ) (i64x2.bitmask (local.get $0 )))
15
17
)
16
18
17
19
;; i8x16
156
158
(assert_return (invoke " i32x4.bitmask" (v128.const i32x4 -1 0 1 0xF ))
157
159
(i32.const 0x00000001 ))
158
160
161
+ (assert_return (invoke " i64x2.bitmask" (v128.const i64x2 0xFFFFFFFF_FFFFFFFF 0xFFFFFFFF_FFFFFFFF ))
162
+ (i32.const 0x00000003 ))
163
+ (assert_return (invoke " i64x2.bitmask" (v128.const i64x2 -1 0xF ))
164
+ (i32.const 0x00000001 ))
165
+
159
166
;; Combination
160
167
161
168
(module (memory 1 )
You can’t perform that action at this time.
0 commit comments