Skip to content

Commit b313e62

Browse files
committed
Rename shuffle and swizzle to i8x16 prefix
v8x16.shuffle and v8x16.swizzle is now i8x16.shuffle and i8x16.swizzle respectively. Fixed WebAssembly#316.
1 parent b89087d commit b313e62

File tree

13 files changed

+69
-69
lines changed

13 files changed

+69
-69
lines changed

interpreter/binary/decode.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ let simd_prefix s =
224224
| 0x00l -> let a, o = memop s in v128_load a o
225225
| 0x0bl -> let a, o = memop s in v128_store a o
226226
| 0x0cl -> v128_const (at v128 s)
227-
| 0x0dl -> v8x16_shuffle (List.init 16 (fun x -> u8 s))
228-
| 0x0el -> v8x16_swizzle
227+
| 0x0dl -> i8x16_shuffle (List.init 16 (fun x -> u8 s))
228+
| 0x0el -> i8x16_swizzle
229229
| 0x0fl -> i8x16_splat
230230
| 0x10l -> i16x8_splat
231231
| 0x11l -> i32x4_splat

interpreter/syntax/operators.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ let v128_or = Binary (V128 (V128Op.V128 V128Op.Or))
226226
let v128_xor = Binary (V128 (V128Op.V128 V128Op.Xor))
227227
let v128_bitselect = Ternary (V128Op.Bitselect)
228228

229-
let v8x16_swizzle = Binary (V128 V128Op.(I8x16 Swizzle))
230-
let v8x16_shuffle imms = Binary (V128 V128Op.(I8x16 (Shuffle imms)))
229+
let i8x16_swizzle = Binary (V128 V128Op.(I8x16 Swizzle))
230+
let i8x16_shuffle imms = Binary (V128 V128Op.(I8x16 (Shuffle imms)))
231231

232232
let i8x16_splat = Convert (V128 (V128Op.I8x16 V128Op.Splat))
233233
let i8x16_extract_lane_s imm = SimdExtract (V128Op.I8x16 (SX, imm))

interpreter/text/arrange.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ struct
230230
| _ -> failwith "Unimplemented v128 unop"
231231

232232
let binop xx (op : binop) = match op with
233-
| I8x16 (Shuffle imms) -> "v8x16.shuffle " ^ (String.concat " " (List.map nat imms))
234-
| I8x16 Swizzle -> "v8x16.swizzle"
233+
| I8x16 (Shuffle imms) -> "i8x16.shuffle " ^ (String.concat " " (List.map nat imms))
234+
| I8x16 Swizzle -> "i8x16.swizzle"
235235
| I8x16 Eq -> "i8x16.eq"
236236
| I8x16 Ne -> "i8x16.ne"
237237
| I8x16 LtS -> "i8x16.lt_s"

interpreter/text/lexer.mll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,8 @@ rule token = parse
465465
| (simd_float_shape as s)".le" { BINARY (simd_float_op s f32x4_le f64x2_le) }
466466
| (simd_float_shape as s)".gt" { BINARY (simd_float_op s f32x4_gt f64x2_gt) }
467467
| (simd_float_shape as s)".ge" { BINARY (simd_float_op s f32x4_ge f64x2_ge) }
468-
| "v8x16.swizzle" { BINARY v8x16_swizzle }
469-
| "v8x16.shuffle" { SHUFFLE }
468+
| "i8x16.swizzle" { BINARY i8x16_swizzle }
469+
| "i8x16.shuffle" { SHUFFLE }
470470
| vxxx".not" { UNARY v128_not }
471471
| vxxx".and" { UNARY v128_and }
472472
| vxxx".andnot" { UNARY v128_andnot }

interpreter/text/parser.mly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ plain_instr :
389389
| EXTRACT_LANE NAT { let at = at () in fun c -> $1 (simd_lane_index $2 at) }
390390
| REPLACE_LANE NAT { let at = at () in fun c -> $1 (simd_lane_index $2 at) }
391391
| SHIFT { fun c -> $1 }
392-
| SHUFFLE literal_list { let at = at () in fun c -> v8x16_shuffle (shuffle_literal $2 at) }
392+
| SHUFFLE literal_list { let at = at () in fun c -> i8x16_shuffle (shuffle_literal $2 at) }
393393
394394
395395
call_instr :

proposals/simd/BinarySIMD.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ instr ::= ...
2424

2525
Some SIMD instructions have additional immediate operands following `simdop`.
2626
These immediate operands are encoded as individual bytes.
27-
For example, the `v8x16.shuffle` instruction has 16 bytes after `simdop`.
27+
For example, the `i8x16.shuffle` instruction has 16 bytes after `simdop`.
2828

2929
In the description below, `ImmLaneIdx{I}` indicates the maximum value of the byte.
3030
For example, `ImmLaneIdx16` is a byte with values in the range 0-15 (inclusive).
@@ -45,8 +45,8 @@ For example, `ImmLaneIdx16` is a byte with values in the range 0-15 (inclusive).
4545
| `v64x2.load_splat` | `0x0a`| m:memarg |
4646
| `v128.store` | `0x0b`| m:memarg |
4747
| `v128.const` | `0x0c`| i:ImmByte[16] |
48-
| `v8x16.shuffle` | `0x0d`| s:ImmLaneIdx32[16] |
49-
| `v8x16.swizzle` | `0x0e`| - |
48+
| `i8x16.shuffle` | `0x0d`| s:ImmLaneIdx32[16] |
49+
| `i8x16.swizzle` | `0x0e`| - |
5050
| `i8x16.splat` | `0x0f`| - |
5151
| `i16x8.splat` | `0x10`| - |
5252
| `i32x4.splat` | `0x11`| - |

proposals/simd/ImplementationStatus.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
| `v64x2.load_splat` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
1414
| `v128.store` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
1515
| `v128.const` | `-munimplemented-simd128` | :heavy_check_mark: [6] | | | :heavy_check_mark: |
16-
| `v8x16.shuffle` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
17-
| `v8x16.swizzle` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
16+
| `i8x16.shuffle` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
17+
| `i8x16.swizzle` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
1818
| `i8x16.splat` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
1919
| `i16x8.splat` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
2020
| `i32x4.splat` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |

proposals/simd/NewOpcodes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
| Basic operation | opcode |
1717
| ----------------| ------ |
1818
| v128.const | 0x0c |
19-
| v8x16.shuffle | 0x0d |
20-
| v8x16.swizzle | 0x0e |
19+
| i8x16.shuffle | 0x0d |
20+
| i8x16.swizzle | 0x0e |
2121

2222
| Splat operation | opcode |
2323
| --------------- | ------ |

proposals/simd/SIMD.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ The input lane value, `x`, is interpreted the same way as for the splat
300300
instructions. For the `i8` and `i16` lanes, the high bits of `x` are ignored.
301301

302302
### Shuffling using immediate indices
303-
* `v8x16.shuffle(a: v128, b: v128, imm: ImmLaneIdx32[16]) -> v128`
303+
* `i8x16.shuffle(a: v128, b: v128, imm: ImmLaneIdx32[16]) -> v128`
304304

305305
Returns a new vector with lanes selected from the lanes of the two input vectors
306306
`a` and `b` specified in the 16 byte wide immediate mode operand `imm`. This
@@ -320,7 +320,7 @@ def S.shuffle(a, b, s):
320320
```
321321

322322
### Swizzling using variable indices
323-
* `v8x16.swizzle(a: v128, s: v128) -> v128`
323+
* `i8x16.swizzle(a: v128, s: v128) -> v128`
324324

325325
Returns a new vector with lanes selected from the lanes of the first input
326326
vector `a` specified in the second input vector `s`. The indices `i` in range

proposals/simd/TextSIMD.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ The canonical text format used for printing `v128.const` instructions is
2020
v128.const i32x4 0xNNNNNNNN 0xNNNNNNNN 0xNNNNNNNN 0xNNNNNNNN
2121
```
2222

23-
### v8x16.shuffle
23+
### i8x16.shuffle
2424

2525
```
26-
v8x16.shuffle i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5
26+
i8x16.shuffle i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5 i5
2727
```

test/core/simd/simd_lane.wast

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,21 @@
6161

6262
;; Swizzle and shuffle
6363
(func (export "v8x16_swizzle") (param v128 v128) (result v128)
64-
(v8x16.swizzle (local.get 0) (local.get 1)))
64+
(i8x16.swizzle (local.get 0) (local.get 1)))
6565
(func (export "v8x16_shuffle-1") (param v128 v128) (result v128)
66-
(v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (local.get 0) (local.get 1)))
66+
(i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (local.get 0) (local.get 1)))
6767
(func (export "v8x16_shuffle-2") (param v128 v128) (result v128)
68-
(v8x16.shuffle 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 (local.get 0) (local.get 1)))
68+
(i8x16.shuffle 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 (local.get 0) (local.get 1)))
6969
(func (export "v8x16_shuffle-3") (param v128 v128) (result v128)
70-
(v8x16.shuffle 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 (local.get 0) (local.get 1)))
70+
(i8x16.shuffle 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 (local.get 0) (local.get 1)))
7171
(func (export "v8x16_shuffle-4") (param v128 v128) (result v128)
72-
(v8x16.shuffle 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 (local.get 0) (local.get 1)))
72+
(i8x16.shuffle 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 (local.get 0) (local.get 1)))
7373
(func (export "v8x16_shuffle-5") (param v128 v128) (result v128)
74-
(v8x16.shuffle 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (local.get 0) (local.get 1)))
74+
(i8x16.shuffle 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (local.get 0) (local.get 1)))
7575
(func (export "v8x16_shuffle-6") (param v128 v128) (result v128)
76-
(v8x16.shuffle 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 (local.get 0) (local.get 1)))
76+
(i8x16.shuffle 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 (local.get 0) (local.get 1)))
7777
(func (export "v8x16_shuffle-7") (param v128 v128) (result v128)
78-
(v8x16.shuffle 0 0 0 0 0 0 0 0 16 16 16 16 16 16 16 16 (local.get 0) (local.get 1)))
78+
(i8x16.shuffle 0 0 0 0 0 0 0 0 16 16 16 16 16 16 16 16 (local.get 0) (local.get 1)))
7979
)
8080

8181
(assert_return (invoke "i8x16_extract_lane_s-first" (v128.const i8x16 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) (i32.const 127))
@@ -501,33 +501,33 @@
501501

502502
;; Invalid types for swizzle and shuffle values
503503
(assert_invalid (module (func (result v128)
504-
(v8x16.swizzle (i32.const 1) (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0)))) "type mismatch")
504+
(i8x16.swizzle (i32.const 1) (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0)))) "type mismatch")
505505
(assert_invalid (module (func (result v128)
506-
(v8x16.swizzle (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (i32.const 2)))) "type mismatch")
506+
(i8x16.swizzle (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (i32.const 2)))) "type mismatch")
507507
(assert_invalid (module (func (result v128)
508-
(v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (f32.const 3.0)
508+
(i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (f32.const 3.0)
509509
(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0)))) "type mismatch")
510510
(assert_invalid (module (func (result v128)
511-
(v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
511+
(i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
512512
(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (f32.const 4.0)))) "type mismatch")
513513

514-
;; v8x16.shuffle: the 1st argument must be 16-byte literals in 0..32
514+
;; i8x16.shuffle: the 1st argument must be 16-byte literals in 0..32
515515
(assert_malformed (module quote "(func (param v128) (result v128)"
516-
"(v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 (local.get 0) (local.get 0)))")
516+
"(i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 (local.get 0) (local.get 0)))")
517517
"invalid lane length")
518518
(assert_malformed (module quote "(func (param v128) (result v128)"
519-
"(v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (local.get 0) (local.get 0)))")
519+
"(i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (local.get 0) (local.get 0)))")
520520
"invalid lane length")
521521
(assert_malformed (module quote "(func (result v128)"
522-
"(v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -1"
522+
"(i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -1"
523523
"(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0)"
524524
"(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)))") "malformed lane index")
525525
(assert_malformed (module quote "(func (result v128)"
526-
"(v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 256"
526+
"(i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 256"
527527
"(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0)"
528528
"(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)))") "malformed lane index")
529529
(assert_invalid (module (func (result v128)
530-
(v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 255
530+
(i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 255
531531
(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0)
532532
(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)))) "invalid lane index")
533533

@@ -543,21 +543,21 @@
543543

544544
;; Old shuffle instruction names will not work
545545
(assert_malformed (module quote "(func (result v128) "
546-
"(v8x16.shuffle1 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
546+
"(i8x16.shuffle1 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
547547
"(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0)))")
548548
"unknown operator")
549549
(assert_malformed (module quote "(func (result v128) "
550-
"(v8x16.shuffle2_imm 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 "
550+
"(i8x16.shuffle2_imm 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 "
551551
"(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
552552
"(v128.const i8x16 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31)))")
553553
"unknown operator")
554-
;; v8x16 not i8x16
554+
;; i8x16 not v8x16
555555
(assert_malformed (module quote "(func (result v128) "
556-
"(i8x16.swizzle (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
556+
"(v8x16.swizzle (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
557557
"(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0)))")
558558
"unknown operator")
559559
(assert_malformed (module quote "(func (result v128) "
560-
"(i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 "
560+
"(v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 "
561561
"(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
562562
"(v128.const i8x16 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31)))")
563563
"unknown operator")
@@ -596,29 +596,29 @@
596596
(assert_malformed (module quote "(func (result v128) (i32x4.replace_lane inf (v128.const i32x4 0 0 0 0) (i32.const 1)))") "unexpected token")
597597
(assert_malformed (module quote "(func (result v128) (f32x4.replace_lane -inf (v128.const f32x4 0 0 0 0) (f32.const 1.1)))") "unexpected token")
598598

599-
;; v8x16.shuffle expects a 16-byte literals as first argument
599+
;; i8x16.shuffle expects a 16-byte literals as first argument
600600
(assert_malformed (module quote "(func (result v128) "
601-
"(v8x16.shuffle (v128.const i8x16 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31) "
601+
"(i8x16.shuffle (v128.const i8x16 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31) "
602602
"(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) "
603603
"(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)))") "invalid lane length")
604604
(assert_malformed (module quote "(func (result v128) "
605-
"(v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15.0) "
605+
"(i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15.0) "
606606
"(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) "
607607
"(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)))") "malformed lane index")
608608
(assert_malformed (module quote "(func (result v128) "
609-
"(v8x16.shuffle 0.5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
609+
"(i8x16.shuffle 0.5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
610610
"(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) "
611611
"(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)))") "malformed lane index")
612612
(assert_malformed (module quote "(func (result v128) "
613-
"(v8x16.shuffle -inf 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
613+
"(i8x16.shuffle -inf 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
614614
"(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) "
615615
"(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)))") "malformed lane index")
616616
(assert_malformed (module quote "(func (result v128) "
617-
"(v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 inf) "
617+
"(i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 inf) "
618618
"(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) "
619619
"(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)))") "malformed lane index")
620620
(assert_malformed (module quote "(func (result v128) "
621-
"(v8x16.shuffle nan 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
621+
"(i8x16.shuffle nan 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) "
622622
"(v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) "
623623
"(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)))") "malformed lane index")
624624

@@ -664,9 +664,9 @@
664664

665665
;; i8x16.replace outputs as shuffle operand
666666
(func (export "as-v8x16_swizzle-operand") (param v128 i32 v128) (result v128)
667-
(v8x16.swizzle (i8x16.replace_lane 0 (local.get 0) (local.get 1)) (local.get 2)))
667+
(i8x16.swizzle (i8x16.replace_lane 0 (local.get 0) (local.get 1)) (local.get 2)))
668668
(func (export "as-v8x16_shuffle-operands") (param v128 i32 v128 i32) (result v128)
669-
(v8x16.shuffle 16 1 18 3 20 5 22 7 24 9 26 11 28 13 30 15
669+
(i8x16.shuffle 16 1 18 3 20 5 22 7 24 9 26 11 28 13 30 15
670670
(i8x16.replace_lane 0 (local.get 0) (local.get 1))
671671
(i8x16.replace_lane 15 (local.get 2) (local.get 3))))
672672
)
@@ -726,10 +726,10 @@
726726
(i64x2.add (i64x2.replace_lane 0 (local.get 0) (local.get 1)) (i64x2.replace_lane 1 (local.get 2) (local.get 3))))
727727

728728
(func (export "swizzle-as-i8x16_add-operands") (param v128 v128 v128 v128) (result v128)
729-
(i8x16.add (v8x16.swizzle (local.get 0) (local.get 1)) (v8x16.swizzle (local.get 2) (local.get 3))))
729+
(i8x16.add (i8x16.swizzle (local.get 0) (local.get 1)) (i8x16.swizzle (local.get 2) (local.get 3))))
730730
(func (export "shuffle-as-i8x16_sub-operands") (param v128 v128 v128 v128) (result v128)
731-
(i8x16.sub (v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (local.get 0) (local.get 1))
732-
(v8x16.shuffle 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 (local.get 2) (local.get 3))))
731+
(i8x16.sub (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (local.get 0) (local.get 1))
732+
(i8x16.shuffle 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 (local.get 2) (local.get 3))))
733733

734734
;; Boolean horizontal reductions
735735
(func (export "as-i8x16_any_true-operand") (param v128 i32) (result i32)
@@ -742,9 +742,9 @@
742742
(i32x4.any_true (i64x2.replace_lane 0 (local.get 0) (local.get 1))))
743743

744744
(func (export "swizzle-as-i8x16_all_true-operands") (param v128 v128) (result i32)
745-
(i8x16.all_true (v8x16.swizzle (local.get 0) (local.get 1))))
745+
(i8x16.all_true (i8x16.swizzle (local.get 0) (local.get 1))))
746746
(func (export "shuffle-as-i8x16_any_true-operands") (param v128 v128) (result i32)
747-
(i8x16.any_true (v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (local.get 0) (local.get 1))))
747+
(i8x16.any_true (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (local.get 0) (local.get 1))))
748748
)
749749

750750
(assert_return (invoke "as-i8x16_splat-operand" (v128.const i8x16 0xff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
@@ -842,9 +842,9 @@
842842
(return (global.get $g)))
843843

844844
(func (export "as-return-value-2") (param v128 v128) (result v128)
845-
(return (v8x16.swizzle (local.get 0) (local.get 1))))
845+
(return (i8x16.swizzle (local.get 0) (local.get 1))))
846846
(func (export "as-global_set-value-2") (param v128 v128) (result v128)
847-
(global.set $h (v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 (local.get 0) (local.get 1)))
847+
(global.set $h (i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 (local.get 0) (local.get 1)))
848848
(return (global.get $h)))
849849

850850
(func (export "as-local_set-value-1") (param v128) (result i64) (local i64)
@@ -1236,8 +1236,8 @@
12361236
)
12371237
(assert_malformed
12381238
(module quote
1239-
"(func $v8x16.shuffle-1st-arg-empty (result v128)"
1240-
" (v8x16.shuffle"
1239+
"(func $i8x16.shuffle-1st-arg-empty (result v128)"
1240+
" (i8x16.shuffle"
12411241
" (v128.const i8x16 0 1 2 3 5 6 6 7 8 9 10 11 12 13 14 15)"
12421242
" (v128.const i8x16 1 2 3 5 6 6 7 8 9 10 11 12 13 14 15 16)"
12431243
" )"
@@ -1247,8 +1247,8 @@
12471247
)
12481248
(assert_invalid
12491249
(module
1250-
(func $v8x16.shuffle-2nd-arg-empty (result v128)
1251-
(v8x16.shuffle 0 1 2 3 5 6 6 7 8 9 10 11 12 13 14 15
1250+
(func $i8x16.shuffle-2nd-arg-empty (result v128)
1251+
(i8x16.shuffle 0 1 2 3 5 6 6 7 8 9 10 11 12 13 14 15
12521252
(v128.const i8x16 1 2 3 5 6 6 7 8 9 10 11 12 13 14 15 16)
12531253
)
12541254
)
@@ -1257,8 +1257,8 @@
12571257
)
12581258
(assert_malformed
12591259
(module quote
1260-
"(func $v8x16.shuffle-arg-empty (result v128)"
1261-
" (v8x16.shuffle)"
1260+
"(func $i8x16.shuffle-arg-empty (result v128)"
1261+
" (i8x16.shuffle)"
12621262
")"
12631263
)
12641264
"invalid lane length"

0 commit comments

Comments
 (0)