The caller function passes parameters to the callee function using either the registers (R5 through R10) or on its own stack frame. The callee uses the stack area of the caller to store the parameters passed to the callee.
See Table 1. The parameters for Func 2 are stored either in the registers R5 through R10 or on the stack frame allocated for Func 1.
If Func 2 has more than six integer parameters, the first six parameters can be passed in registers R5 through R10, whereas all subsequent parameters must be passed on the stack frame allocated for Func 1, starting at offset SP + 28.
Should Func2 be a variable argument function (a variadic function) such as
printf()
, all variable arguments are stored on the stack frame
allocated by the caller.