armviz

SP

alias WSParchitectural number 31

Stack pointer

SP64-bit view
X only
shared with WSP
WSP32-bit view
bits 31:0 of SP
write

Writing WSP does not simply deposit 32 bits. Bits 63:32 of SP are reset to zero as a side effect, so a W write always clears the upper half. This is the reason WSP and WZR can never hold unrelated values at the same time.

Notes

Encoded as register number 31 in the instruction word. The same encoding means the zero register in instructions that name a data operand, and the stack pointer in instructions that perform a stack access. An instruction can never mean both.