Skip to content

Commit fa8af5f

Browse files
Maratyszczadtig
authored andcommitted
Add Load-And-Splat instructions (WebAssembly#82)
1 parent f6e2cb4 commit fa8af5f

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

proposals/simd/BinarySIMD.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,8 @@ The `v8x16.shuffle2_imm` instruction has 16 bytes after `simdop`.
167167
| `f64x2.convert_s/i64x2` | `0xb1`| - |
168168
| `f64x2.convert_u/i64x2` | `0xb2`| - |
169169
| `v8x16.shuffle1` | `0xc0`| - |
170-
| `v8x16.shuffle2_imm` | `0xc1`| s:LaneIdx32[16] |
170+
| `v8x16.shuffle2_imm` | `0xc1`| s:LaneIdx32[16] |
171+
| `i8x16.load_splat` | `0xc2`| - |
172+
| `i16x8.load_splat` | `0xc3`| - |
173+
| `i32x4.load_splat` | `0xc4`| - |
174+
| `i64x2.load_splat` | `0xc5`| - |

proposals/simd/ImplementationStatus.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@
44
| `v128.store` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
55
| `v128.const` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: |
66
| `i8x16.splat` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
7+
| `i8x16.load_splat` | | | | |
78
| `i8x16.extract_lane_s` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
89
| `i8x16.extract_lane_u` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: |
910
| `i8x16.replace_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
1011
| `i16x8.splat` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
12+
| `i16x8.load_splat` | | | | |
1113
| `i16x8.extract_lane_s` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
1214
| `i16x8.extract_lane_u` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: |
1315
| `i16x8.replace_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
1416
| `i32x4.splat` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
17+
| `i32x4.load_splat` | | | | |
1518
| `i32x4.extract_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
1619
| `i32x4.replace_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
1720
| `i64x2.splat` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: |
@@ -21,6 +24,7 @@
2124
| `f32x4.extract_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
2225
| `f32x4.replace_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
2326
| `f64x2.splat` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: |
27+
| `i64x2.load_splat` | | | | |
2428
| `f64x2.extract_lane` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: |
2529
| `f64x2.replace_lane` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: |
2630
| `i8x16.eq` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |

proposals/simd/SIMD.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,15 @@ natural alignment.
666666

667667
Load a `v128` vector from the given heap address.
668668

669+
### Load and Splat
670+
671+
* `i8x16.load_splat(memarg) -> v128`
672+
* `i16x8.load_splat(memarg) -> v128`
673+
* `i32x4.load_splat(memarg) -> v128`
674+
* `i64x2.load_splat(memarg) -> v128`
675+
676+
Load a single element and splat to all lanes of a `v128` vector.
677+
669678
### Store
670679

671680
* `v128.store(memarg, data: v128)`

0 commit comments

Comments
 (0)