ARM64 General-Purpose Register
The ARM64 provides 31 general-purpose registers. Table 1 lists the names and functions of the registers.
Register |
Description |
|---|---|
x0 – x7 |
The registers are used to transfer the subprogram parameters. They do not need to be saved when being used. The redundant parameters are saved in the caller stack and are transferred to the called function through a stack. The x0 register can also be used as a return value register. |
x8 |
Indirect result register. It does not need to be saved when being used. It is used to transfer the addresses of indirect results. For example, a function returns a large structure, and x8 saves the structure address. |
x9 – x15 |
Temporary registers, which do not need to be saved when they are used by subprograms. |
x16 – x17 |
Internal process call registers. They are usually used for instructions such as the plt addressing instruction dynamic links. They are also called IP0 and IP1. |
x18 |
Reserved register on the platform. The register varies according to the operating system. |
x19 – x28 |
Temporary registers, which must be saved when they are used by subprograms. |
x29 |
Frame pointer (FP) register. It is used to connect stack frames and must be saved when being used. |
x30 |
Link register (LR), which is used to save the return address of subprograms. |