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

Pseudo-Minimum and Pseudo-Maximum instructions #122

Merged
merged 1 commit into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions proposals/simd/BinarySIMD.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ For example, `ImmLaneIdx16` is a byte with values in the range 0-15 (inclusive).
| `f32x4.div` | `0xe7`| - |
| `f32x4.min` | `0xe8`| - |
| `f32x4.max` | `0xe9`| - |
| `f32x4.pmin` | `0xea`| - |
| `f32x4.pmax` | `0xeb`| - |
| `f64x2.abs` | `0xec`| - |
| `f64x2.neg` | `0xed`| - |
| `f64x2.sqrt` | `0xef`| - |
Expand All @@ -206,6 +208,8 @@ For example, `ImmLaneIdx16` is a byte with values in the range 0-15 (inclusive).
| `f64x2.div` | `0xf3`| - |
| `f64x2.min` | `0xf4`| - |
| `f64x2.max` | `0xf5`| - |
| `f64x2.pmin` | `0xf6`| - |
| `f64x2.pmax` | `0xf7`| - |
| `i32x4.trunc_sat_f32x4_s` | `0xf8`| - |
| `i32x4.trunc_sat_f32x4_u` | `0xf9`| - |
| `f32x4.convert_i32x4_s` | `0xfa`| - |
Expand Down
12 changes: 12 additions & 0 deletions proposals/simd/SIMD.md
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,18 @@ Lane-wise minimum value, propagating NaNs.

Lane-wise maximum value, propagating NaNs.

### Pseudo-minimum
* `f32x4.pmin(a: v128, b: v128) -> v128`
* `f64x2.pmin(a: v128, b: v128) -> v128`

Lane-wise minimum value, defined as `b < a ? b : a`.

### Pseudo-maximum
* `f32x4.pmax(a: v128, b: v128) -> v128`
* `f64x2.pmax(a: v128, b: v128) -> v128`

Lane-wise maximum value, defined as `a < b ? b : a`.

## Floating-point arithmetic

The floating-point arithmetic operations are all lane-wise versions of the
Expand Down