This commit is contained in:
2026-03-09 13:11:10 -06:00
parent 6268b356aa
commit 41050d05d5

View File

@@ -21,4 +21,10 @@ Clean stack: []
RS: 0 RS: 0
Collected result: {'result': {'type': 'result', 'value': 42}} Collected result: {'result': {'type': 'result', 'value': 42}}
**Explanation:**
Since there is only one argument and it fits in a single register, it is
placed directly in `RA` (the first available argument register).
Before the call, the 4 caller-saved registers (R0-R3) are pushed onto the
stack to preserve their values. `RS` points to position 4, reflecting those
4 entries. After `undo_function_call`, the stack is empty, `RS` returns to 0,
and the result value `42` is successfully collected from `RA`.