16.7 Function Return Values
Function return values are returned in registers.
Integral or pointer value are placed in register R0
, extending up to R3
is necessary. This is true also for floating-point values.
If a function needs to return an aggregate value that is too large to fit in the return registers, it is placed in stack space allocated by the caller.