POP X,YZ
Specification:
x | ← S[τ - 1]mod256 (size of the callee's stack frame), |
S[τ - 1] | ← $(X - 1) (main return value), |
rL | ← min(x + X,rG), |
$(rL - 1) | ← $(rL - x - 2) |
… | |
$(x + 1) | ← $0, |
$x | ← S[τ - 1] |
… | |
$0 | ← S[τ - x - 1], |
τ | ← τ - x - 1 |
@ | ← rJ + 4YZ |
Timing:
3υ
Description:
The POP instruction undoes the effect of a previous PUSHJ Instruction.
X indicates the number of return values in registers $0 to $(X-1),
where $(X-1) contains the main return value.
Initially, the size x of the callee's stack frame (the number of its local registers)
is directly below $0 on the register stack. This value is replaced by the main
return value. After that, the registers are renumbered such that the callee's
local registers are again $0, $1, ... and the return values are in
registers $X and following (where the $X here is from the previous PUSHJ
instruction).
(Consider: You can see examples of the PUSHJ and POP instruction here)
See also: