diff options
Diffstat (limited to 'execution-support.e')
| -rw-r--r-- | execution-support.e | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/execution-support.e b/execution-support.e index 67f9162..05dfe6d 100644 --- a/execution-support.e +++ b/execution-support.e @@ -34,14 +34,14 @@ ~ Flags ~ * DF = 0 is required ~ -~ (base address -- new base address) +~ (output point -- output point) : pack-next - ~ Copy the next word's address from *rsi into rax. Increment rsi (as per the - ~ DF flag). + ~ Copy the next word's address from *rsi into rax. Increment rsi (as per + ~ the DF flag). lods64 - ~ Load the codeword from the word's contents, and jump to the interpreter it - ~ points to. + ~ Load the codeword from the word's contents, and jump to the interpreter + ~ it points to. :rax jmp-abs-indirect-reg64 ; @@ -64,7 +64,7 @@ ~ Thus, notionally we are doing just this one transfer of control before ~ eventually getting around to inlining "next". Hence the name. ~ -~ (target address, base address -- new base address) +~ (output point, target address -- output point) : pack-beforenext ~ Do a permanent transfer of control by setting rax and invoking the ~ codeword. Of course, we could jump to docol ourselves but this will work @@ -95,14 +95,12 @@ ~ ~ * rbp points to the top of the control stack. ~ -~ TODO can this be correct? it seems backwards? -~ (source register, base address -- new base address) +~ (output point, source register -- output point) : pack-pushcontrol swap :rbp -8 :rbp lea-reg64-disp8-reg64 swap :rbp 0 mov-disp8-reg64-reg64 ; -~ TODO can this be correct? it seems backwards? -~ (target register, base address -- new base address) +~ (output point, target register -- output point) : pack-popcontrol :rbp 0 3roll mov-reg64-disp8-reg64 :rbp 8 :rbp lea-reg64-disp8-reg64 ; |