[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mvm7c662jx8.fsf@suse.de>
Date: Tue, 04 Feb 2025 09:28:19 +0100
From: Andreas Schwab <schwab@...e.de>
To: Jessica Clarke <jrtc27@...c27.com>
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] riscv/futex: sign extend compare value in atomic cmpxchg
On Feb 03 2025, Jessica Clarke wrote:
> On 3 Feb 2025, at 10:06, Andreas Schwab <schwab@...e.de> wrote:
>>
>> Make sure the compare value in the lr/sc loop is sign extended to match
>> what lr.w does. Fortunately, due to the compiler keeping the register
>> contents sign extended anyway the lack of the explicit extension didn't
>> result in wrong code so far, but this cannot be relied upon.
>
> GCC may guarantee this today,
It doesn't, that's the point!
--
Andreas Schwab, SUSE Labs, schwab@...e.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
Powered by blists - more mailing lists