Skip to content

Commit faf9a9d

Browse files
authored
Merge pull request #244 from riscv-non-isa/struct-return-in-stack
Clarify address of struct return value is not required hold on return register
2 parents 9ea35f6 + 2a17357 commit faf9a9d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

riscv-cc.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ type would be passed. If such an argument would have been passed by
155155
reference, the caller allocates memory for the return value, and passes the
156156
address as an implicit first parameter.
157157

158+
NOTE: There is no requirement that the address be returned from the function
159+
and so software should not assume that a0 will hold the address of the return
160+
value on return.
161+
158162
The stack grows downwards (towards lower addresses) and the stack pointer shall
159163
be aligned to a 128-bit boundary upon procedure entry.
160164
The first argument passed on the stack is located at offset zero of the stack pointer

0 commit comments

Comments
 (0)