Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 9afb4cf

Browse files
committed
Updates the ISA spec.
1 parent 04ee028 commit 9afb4cf

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

doc/bytecode.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ All of them are 64 bit wide.
1919
| `r8` | all | GPR | Call-preserved
2020
| `r9` | all | GPR | Call-preserved
2121
| `r10` | all | Frame pointer | System register
22-
| `r11` | from v1 | Stack pointer | System register
2322
| `pc` | all | Program counter | Hidden register
2423

2524

@@ -258,7 +257,6 @@ Except that the target location of `callx` is the src register, thus runtime dyn
258257
Call instructions (`call` and `callx` but not `syscall`) do:
259258
- Save the registers `r6`, `r7`, `r8`, `r9`, the frame pointer `r10` and the `pc` (pointing at the next instruction)
260259
- If < v1: Add one stack frame size to the frame pointer `r10`
261-
- If ≥ v1: Move the stack pointer `r11` into the frame pointer `r10`
262260

263261
The `exit` (a.k.a. return) instruction does:
264262
- Restore the registers `r6`, `r7`, `r8`, `r9`, the frame pointer `r10` and the `pc`
@@ -324,13 +322,12 @@ Verification
324322
- For all instructions the source register must be `r0` ≤ src ≤ `r10`
325323
- For all instructions (except for memory writes) the destination register must be `r0` ≤ dst ≤ `r9`
326324
- For all instructions the opcode must be valid
327-
- Memory write instructions can use `r10` as destination register
328325

329326
### until v1
330-
- No instruction can use `r11` as destination register
327+
- Only memory write instruction can use `r10` as destination register
331328

332329
### from v1
333-
- `add64 reg, imm` can use `r11` as destination register
330+
- `add64 reg, imm` can also use `r10` as destination register
334331

335332
### until v2
336333
- Opcodes from the product / quotient / remainder instruction class are forbiden

0 commit comments

Comments
 (0)