diff options
author | Ian Moffett <ian@osmora.org> | 2024-07-27 20:13:14 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-07-27 20:13:14 -0400 |
commit | 183d2d138d06ad6427f391360979513107b11d0c (patch) | |
tree | 2df05c2427c7ab16942521f9a4929565615e29f5 | |
parent | f01d439e7c1b49b8597377f6832b76f16eb446da (diff) |
Add extra operand for arithmetic instructions
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | README.md | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -51,14 +51,14 @@ and x1, #1 Arithmetic operations can write to all registers except `v0`-`v7`, `x0` and `pc`. Can read from all registers except `v0`-`v7`. -| Mnemonic | Effect | -| ---------------------------- | --------------------- | -| `add` dst: r/m, val: r/m/imm | `dst` = `dst` + `val` | -| `sub` dst: r/m, val: r/m/imm | `dst` = `dst` - `val` | -| `mul` dst: r/m, val: r/m/imm | `dst` = `dst` * `val` | -| `div` dst: r/m, val: r/m/imm | `dst` = `dst` / `val` | -| `inc` dst: r/m | `dst` = `dst` + `1` | -| `dec` dst: r/m | `dst` = `dst` - `1` | +| Mnemonic | Effect | +| ------------------------------------ | --------------------- | +| `add` dst: r, reg: r, val: r/imm | `dst` = `dst` + `val` | +| `sub` dst: r, reg: r, val: r/imm | `dst` = `dst` - `val` | +| `mul` dst: r, reg: r, val: r/imm | `dst` = `dst` * `val` | +| `div` dst: r, reg: r, val: r/imm | `dst` = `dst` / `val` | +| `inc` dst: r | `dst` = `dst` + `1` | +| `dec` dst: r | `dst` = `dst` - `1` | #### Example ``` |