X0
alias W0architectural number 0Argument 0 / return value 0
X064-bit view
X only
shared with W0
W032-bit view
bits 31:0 of X0
write
Writing W0 does not simply deposit 32 bits. Bits 63:32 of X0 are reset to zero as a side effect, so a W write always clears the upper half. This is the reason W0 and X0 can never hold unrelated values at the same time.
Notes
Also commonly used as a scratch register. When a function returns a value of 16 bytes or fewer, X0 holds the low 8 bytes of the result and X1 the high 8. Writing W0 rather than X0 zeroes bits 63:32 as a side effect.