Skip to content

Commit

Permalink
define in terms of i,j intermediate vars
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Dec 12, 2024
1 parent 52a9eba commit 44b5781
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/eof.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ The following instructions are introduced in EOF code:
- `EXCHANGE (0xe8)` instruction
- deduct 3 gas
- read uint8 operand `imm`
- `n = imm >> 4 + 1`, `m = imm & 0x0F + n + 1`
- `i = imm >> 4`, `j = imm & 0x0F`
- `n = i + 1`, `m = j + i + 2`
- `n + 1`th stack item is swapped with `m + 1`th stack item (1-based).
- Stack validation: `stack_height >= m + 1`
- `RETURNDATALOAD (0xf7)` instruction
Expand Down

0 comments on commit 44b5781

Please sign in to comment.