Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Commit c4bae8d

Browse files
committed
v128.load32_zero and v128.load64_zero instructions
1 parent fdca37a commit c4bae8d

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

proposals/simd/BinarySIMD.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,5 @@ The `v8x16.shuffle` instruction has 16 bytes after `simdop`.
205205
| `i32x4.trunc_sat_f32x4_u` | `0xf9`| - |
206206
| `f32x4.convert_i32x4_s` | `0xfa`| - |
207207
| `f32x4.convert_i32x4_u` | `0xfb`| - |
208+
| `v128.load32_zero` | `0xfc`| - |
209+
| `v128.load64_zero` | `0xfd`| - |

proposals/simd/ImplementationStatus.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@
178178
| `i32x4.trunc_sat_f32x4_u` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
179179
| `f32x4.convert_i32x4_s` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
180180
| `f32x4.convert_i32x4_u` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
181+
| `v128.load32_zero` | | | | | |
182+
| `v128.load64_zero` | | | | | |
181183

182184
[1] Tip of tree LLVM as of May 20, 2020
183185

proposals/simd/SIMD.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,24 @@ def S.load(memarg):
766766
return S.from_bytes(memory[memarg.offset:memarg.offset + 16])
767767
```
768768

769+
### Load and Zero-Pad
770+
771+
* `v128.load32_zero(memarg) -> v128`
772+
* `v128.load64_zero(memarg) -> v128`
773+
774+
Load a single 32-bit or 64-bit element into the lowest bits of a `v128` vector,
775+
and initialize all other bits of the `v128` vector to zero.
776+
777+
```python
778+
def S.load32_zero(memarg):
779+
return S.from_bytes(memory[memarg.offset:memarg.offset + 4])
780+
```
781+
782+
```python
783+
def S.load64_zero(memarg):
784+
return S.from_bytes(memory[memarg.offset:memarg.offset + 8])
785+
```
786+
769787
### Load and Splat
770788

771789
* `v8x16.load_splat(memarg) -> v128`

0 commit comments

Comments
 (0)