diff options
author | Ian Moffett <ian@osmora.org> | 2025-07-22 14:48:40 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-07-22 14:48:40 -0400 |
commit | d0f80773522b2dec7c8f314934fecc1b8e203166 (patch) | |
tree | 3be963311cf7cf0990af97e10ac2684b6ffbeb5a | |
parent | 548ae74ff2cc056b575ab14a0804404ea20e6d72 (diff) |
docs: 'br' and 'brl' should only have register ops
On a 64-bit machine, memory addresses are usually 64-bit values.
However, OSMX64 encodes fixed-length 32-bit instructions which is wayy
smaller than an address. Therefore it is only possible to stick it in a
register and branch using the register as an operand.
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -168,8 +168,8 @@ Control flow instructions are used to control which instructions the CPU execute | Mnemonic | Effect | | -------------------------------------- | ----------------------------------------------- | | `hlt` | Execution halted | -| `br` dst: r/m/imm | `pc` = `dst` | -| `brl` dst: r/m/imm | `rp` = `pc` + size of opcode, then `pc` = `dst` | +| `br` dst: r | `pc` = `dst` | +| `brl` dst: r | `rp` = `pc` + size of opcode, then `pc` = `dst` | | `bret` | `pc` = `rp` | | `beq` a: r/m, b: r/m/imm, dst: r/m/imm | Iff `a` = `b`, `pc` = `dst` | | `bne` a: r/m, b: r/m/imm, dst: r/m/imm | Iff `a` != `b`, `pc` = `dst` | |