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

Commit 90a79a0

Browse files
committed
v128.load32_zero and v128.load64_zero instructions
1 parent 8af851e commit 90a79a0

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

proposals/simd/BinarySIMD.md

+2
Original file line numberDiff line numberDiff line change
@@ -222,3 +222,5 @@ For example, `ImmLaneIdx16` is a byte with values in the range 0-15 (inclusive).
222222
| `i32x4.trunc_sat_f32x4_u` | `0xf9`| - |
223223
| `f32x4.convert_i32x4_s` | `0xfa`| - |
224224
| `f32x4.convert_i32x4_u` | `0xfb`| - |
225+
| `v128.load32_zero` | `0xfc`| - |
226+
| `v128.load64_zero` | `0xfd`| - |

proposals/simd/ImplementationStatus.md

+2
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@
190190
| `i32x4.trunc_sat_f32x4_u` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
191191
| `f32x4.convert_i32x4_s` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
192192
| `f32x4.convert_i32x4_u` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
193+
| `v128.load32_zero` | | | | | |
194+
| `v128.load64_zero` | | | | | |
193195

194196
[1] Tip of tree LLVM as of May 20, 2020
195197

proposals/simd/NewOpcodes.md

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
| v128.load32_splat | 0x09 |
1313
| v128.load64_splat | 0x0a |
1414
| v128.store | 0x0b |
15+
| v128.load32_zero | 0xfc |
16+
| v128.load64_zero | 0xfd |
17+
1518

1619
| Basic operation | opcode |
1720
| ----------------| ------ |

proposals/simd/SIMD.md

+18
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
* `v128.load8_splat(memarg) -> v128`

0 commit comments

Comments
 (0)