This repository was archived by the owner on Dec 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -201,3 +201,6 @@ The `v8x16.shuffle` instruction has 16 bytes after `simdop`.
201
201
| ` i64x2.load32x2_s ` | ` 0xd6 ` | m: memarg |
202
202
| ` i64x2.load32x2_u ` | ` 0xd7 ` | m: memarg |
203
203
| ` v128.andnot ` | ` 0xd8 ` | - |
204
+ | ` i8x16.abs ` | ` 0xd9 ` | - |
205
+ | ` i16x8.abs ` | ` 0xda ` | - |
206
+ | ` i32x4.abs ` | ` 0xdb ` | - |
Original file line number Diff line number Diff line change 91
91
| ` i8x16.min_u ` | ` -munimplemented-simd128 ` | :heavy_check_mark : | | |
92
92
| ` i8x16.max_s ` | ` -munimplemented-simd128 ` | :heavy_check_mark : | | |
93
93
| ` i8x16.max_u ` | ` -munimplemented-simd128 ` | :heavy_check_mark : | | |
94
+ | ` i8x16.abs ` | | | | |
94
95
| ` i16x8.neg ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
95
96
| ` i16x8.any_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
96
97
| ` i16x8.all_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
108
109
| ` i16x8.min_u ` | ` -munimplemented-simd128 ` | :heavy_check_mark : | | |
109
110
| ` i16x8.max_s ` | ` -munimplemented-simd128 ` | :heavy_check_mark : | | |
110
111
| ` i16x8.max_u ` | ` -munimplemented-simd128 ` | :heavy_check_mark : | | |
112
+ | ` i16x8.abs ` | | | | |
111
113
| ` i32x4.neg ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
112
114
| ` i32x4.any_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
113
115
| ` i32x4.all_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
121
123
| ` i32x4.min_u ` | ` -munimplemented-simd128 ` | :heavy_check_mark : | | |
122
124
| ` i32x4.max_s ` | ` -munimplemented-simd128 ` | :heavy_check_mark : | | |
123
125
| ` i32x4.max_u ` | ` -munimplemented-simd128 ` | :heavy_check_mark : | | |
126
+ | ` i32x4.abs ` | | | | |
124
127
| ` i64x2.neg ` | ` -munimplemented-simd128 ` | | :heavy_check_mark : | :heavy_check_mark : |
125
128
| ` i64x2.shl ` | ` -munimplemented-simd128 ` | | :heavy_check_mark : | :heavy_check_mark : |
126
129
| ` i64x2.shr_s ` | ` -munimplemented-simd128 ` | | :heavy_check_mark : | :heavy_check_mark : |
Original file line number Diff line number Diff line change @@ -488,6 +488,18 @@ each pair.
488
488
def S.max(a, b):
489
489
return S.lanewise_binary(max , a, b)
490
490
```
491
+ ### Lane-wise integer absolute value
492
+ * ` i8x16.abs(a: v128) -> v128 `
493
+ * ` i16x8.abs(a: v128) -> v128 `
494
+ * ` i32x4.abs(a: v128) -> v128 `
495
+
496
+ Lane-wise wrapping absolute value.
497
+
498
+ ``` python
499
+ def S.abs(a):
500
+ return S.lanewise_unary(abs , S.AsSigned(a))
501
+ ```
502
+
491
503
## Bit shifts
492
504
493
505
### Left shift by scalar
@@ -776,7 +788,7 @@ def S.neg(a):
776
788
return S.lanewise_unary(ieee.negate, a)
777
789
```
778
790
779
- ### Absolute value
791
+ ### Floating-point absolute value
780
792
* ` f32x4.abs(a: v128) -> v128 `
781
793
* ` f64x2.abs(a: v128) -> v128 `
782
794
You can’t perform that action at this time.
0 commit comments