Figure 3 — Why No Counter
Software drives the recursion countdown in data registers. Hardware follows with a 1-bit flag and a PC register. The hardware does not need a counter because the software already has one. The separation is clean: software counts, hardware re-enters.
SOFTWARE (data registers)
The software counts down
n=5 → LAMBDA CR6
re-enter method body
n=4 → LAMBDA CR6
re-enter method body
n=3 → LAMBDA CR6
re-enter method body
n=2 → LAMBDA CR6
re-enter method body
n=1 → LAMBDA CR6
re-enter method body
n=0 → RETURN (base case)
Software recognizes n=0, executes RETURN
RETURN (real — pops CALL frame)
Done. Software counted.
HARDWARE (machine status)
The hardware holds 2 values
lambda_active = 1
lambda_pc = addr+4
(same value each time — idempotent)
No counter.
Hardware doesn't track n.
It doesn't need to.
base case triggers
Clear flag, jump to lambda_pc
lambda_active ← 0
Pop CALL frame.
Done. Hardware followed.
KEY INSIGHT: SEPARATION OF CONCERNS
Software counts.
The recursion argument (n) lives in data registers. Software decrements it.
Hardware doesn't need to.
A 1-bit flag and a PC register are the entire hardware cost.
Adding a hardware counter would be redundant.
The software already has the count.
Principle: never duplicate in hardware what software already provides for free.