Re: [PATCH v4 04/12] ARM: entry: Fix iWMMXT TIF flag handling

From
Ard Biesheuvel <ardb@kernel.org>
Date
2023-03-21 19:33:52
Also in
stable
Reply to
Nicolas Pitre, 2023-03-21
On Tue, 21 Mar 2023 at 20:19, Nicolas Pitre [off-list ref] wrote:
On Mon, Mar 20, 2023 at 2:19 PM Ard Biesheuvel [off-list ref] wrote:
quoted
The conditional MOVS instruction that appears to have been added to test
for the TIF_USING_IWMMXT thread_info flag only sets the N and Z
condition flags and register R7, none of which are referenced in the
subsequent code.
Really?

As far as I know, the rsb instruction is a "reversed subtract" and that
also sets the carry flag.

And so does a move with a shifter argument (the last dropped bit is
moved to the carry flag).

What am I missing?
No, you are absolutely right. I looked up the wrong encoding in the
ARM ARM. MOVS without a shift preserves the carry flag, but the
variant you used here behaves as you describe.

So the code is correct - apologies for the noise.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (32 messages) 32 messages, 6 authors, last reply 2023-04-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help