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

Commit

Permalink
Instruction renaming
Browse files Browse the repository at this point in the history
Renames instructions as discussed in
WebAssembly/spec#884 (comment).
Closes #4 and fixes #6.
  • Loading branch information
aheejin authored and sunfishcode committed Apr 2, 2019
1 parent 28e981c commit ce495e2
Showing 1 changed file with 16 additions and 16 deletions.
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` |

0 comments on commit ce495e2

Please sign in to comment.