Page 142 - ARM 64 Bit Assembly Language
P. 142
128 Chapter 5
Figure 5.1: AArch64 User Program Registers.
Registers x0-x7 are used for passing arguments to subroutines. When calling a subroutine,
the first argument must be placed in x0, the second argument in x1, and so on. Conversely,
when writing a function, it is safe to assume that the arguments have been placed in these
registers by the caller. If the function accepts more than eight arguments, then the additional
arguments are passed using the stack, as will be explained in Section 5.4.5.2. The argument