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

Instruction renaming #7

Merged
merged 1 commit into from
Apr 2, 2019
Merged
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
32 changes: 16 additions & 16 deletions proposals/nontrapping-float-to-int-conversion/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ https://github.com/WebAssembly/nontrapping-float-to-int-conversions

This proposal introduces 8 new instructions:

- `i32.trunc_s:sat/f32`
- `i32.trunc_u:sat/f32`
- `i32.trunc_s:sat/f64`
- `i32.trunc_u:sat/f64`
- `i64.trunc_s:sat/f32`
- `i64.trunc_u:sat/f32`
- `i64.trunc_s:sat/f64`
- `i64.trunc_u:sat/f64`
- `i32.trunc_sat_f32_s`
- `i32.trunc_sat_f32_u`
- `i32.trunc_sat_f64_s`
- `i32.trunc_sat_f64_u`
- `i64.trunc_sat_f32_s`
- `i64.trunc_sat_f32_u`
- `i64.trunc_sat_f64_s`
- `i64.trunc_sat_f64_u`

The semantics are the same as the corresponding non-`:sat` instructions, except:
- Instead of trapping on positive or negative overflow, they return the maximum
Expand All @@ -83,11 +83,11 @@ The encodings for the new instructions use this new prefix and are as follows:

| Name | Opcode | Immediate | Description |
| ---- | ---- | ---- | ---- |
| `i32.trunc_s:sat/f32` | `0xfc` `0x00` | | :bowling: saturating form of `i32.trunc_s/f32` |
| `i32.trunc_u:sat/f32` | `0xfc` `0x01` | | :bowling: saturating form of `i32.trunc_u/f32` |
| `i32.trunc_s:sat/f64` | `0xfc` `0x02` | | :bowling: saturating form of `i32.trunc_s/f64` |
| `i32.trunc_u:sat/f64` | `0xfc` `0x03` | | :bowling: saturating form of `i32.trunc_u/f64` |
| `i64.trunc_s:sat/f32` | `0xfc` `0x04` | | :bowling: saturating form of `i64.trunc_s/f32` |
| `i64.trunc_u:sat/f32` | `0xfc` `0x05` | | :bowling: saturating form of `i64.trunc_u/f32` |
| `i64.trunc_s:sat/f64` | `0xfc` `0x06` | | :bowling: saturating form of `i64.trunc_s/f64` |
| `i64.trunc_u:sat/f64` | `0xfc` `0x07` | | :bowling: saturating form of `i64.trunc_u/f64` |
| `i32.trunc_sat_f32_s` | `0xfc` `0x00` | | :bowling: saturating form of `i32.trunc_f32_s` |
| `i32.trunc_sat_f32_u` | `0xfc` `0x01` | | :bowling: saturating form of `i32.trunc_f32_u` |
| `i32.trunc_sat_f64_s` | `0xfc` `0x02` | | :bowling: saturating form of `i32.trunc_f64_s` |
| `i32.trunc_sat_f64_u` | `0xfc` `0x03` | | :bowling: saturating form of `i32.trunc_f64_u` |
| `i64.trunc_sat_f32_s` | `0xfc` `0x04` | | :bowling: saturating form of `i64.trunc_f32_s` |
| `i64.trunc_sat_f32_u` | `0xfc` `0x05` | | :bowling: saturating form of `i64.trunc_f32_u` |
| `i64.trunc_sat_f64_s` | `0xfc` `0x06` | | :bowling: saturating form of `i64.trunc_f64_s` |
| `i64.trunc_sat_f64_u` | `0xfc` `0x07` | | :bowling: saturating form of `i64.trunc_f64_u` |