Re: [PATCH] riscv/atomic: Do proper sign extension also for unsigned in arch_cmpxchg
From: Andreas Schwab
Date: Thu Jan 30 2025 - 10:54:04 EST
On Jan 30 2025, Alexandre Ghiti wrote:
> a2 is used as it is passed by the calling function, so we can't be sure a2
> is sign extended to me, what am I missing?
32-bit scalar arguments are guaranteed to be sign extended on entry.
--
Andreas Schwab, SUSE Labs, schwab@xxxxxxx
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."