relax r7 requirement for result stack

This commit is contained in:
2026-09-02 11:40:39 +02:00
parent da811fd65d
commit f7d3ca2ec5
+3 -3
View File
@@ -29,9 +29,9 @@ Arguments are passed in reverse order with the stack so:
lowest address = 1st stack arg lowest address = 1st stack arg
highest address = last stack arg highest address = last stack arg
Should a function return more values than fit into the 7 registers, the caller has to allocate space on the stack for them, and pass the pointer to that space in r7. Should a function return more values than fit into the 7 registers, the caller has to allocate space on the stack for them, and pass the pointer to that space in the next free argument register.
This reduces the amount of argument registers to 6 and all arguments above that shall go on the stack, the pointer to the result stack shall **always** be passed in r7. This reduces the amount of argument registers to 6 and all arguments above that shall go on the stack, the pointer to the result stack shall **always** be passed in an argument register.
r7 points at the highest available address for results, with the 8th result being stored there, the 9th below it and so on. This register points at the highest available address for results, with the 8th result being stored there, the 9th below it and so on.
### Stack ### Stack
Grows downwards from top of memory. Grows downwards from top of memory.