Skip to content

Commit c5a0588

Browse files
Location of arguments on function entry (#136)
1 parent 1a22c51 commit c5a0588

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

riscv-elf.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ address as an implicit first parameter.
161161

162162
The stack grows downwards (towards lower addresses) and the stack pointer shall
163163
be aligned to a 128-bit boundary upon procedure entry.
164+
The first argument passed on the stack is located at offset zero of the stack pointer
165+
on function entry; following arguments are stored at correspondingly
166+
higher addresses.
167+
164168
In the standard ABI, the stack pointer must remain
165169
aligned throughout procedure execution. Non-standard ABI code must realign the
166170
stack pointer prior to invoking standard ABI procedures. The operating system

0 commit comments

Comments
 (0)