|Home > Overview of AArch64 state > Stack Pointer register|
In AArch64 state, SP represents the 64-bit Stack Pointer. SP_EL0 is an alias for SP. Do not use SP as a general purpose register.
You can only use SP as an operand in the following instructions:
There is a separate stack pointer for each of the three exception levels, SP_EL1, SP_EL2, and SP_EL3. Within an exception level you can either use the dedicated stack pointer for that exception level or you can use SP_EL0, the stack pointer associated with EL0. You can use the SPSel register to select which stack pointer to use in the exception level.
The choice of stack pointer is indicated by the letter t or
h appended to the exception level name, for example EL0t or EL3h.
The t suffix indicates that the exception level uses SP_EL0 and
the h suffix indicates it uses SP_EL
the current exception level number. EL0 always uses SP_EL0 so cannot
have an h suffix.