X2
alias W2architectural number 2Argument 2
X264-bit view
X only
shared with W2
W232-bit view
bits 31:0 of X2
write
Writing W2 does not simply deposit 32 bits. Bits 63:32 of X2 are reset to zero as a side effect, so a W write always clears the upper half. This is the reason W2 and X2 can never hold unrelated values at the same time.
Notes
Some language runtimes use X2–X7 to carry the address of a small return value instead of returning it in registers.