Subject: Re: Fwd: Fwd: X stopped working with 5.14 on iBook

From: Segher Boessenkool <[email-masked]>
Date: Fri, 5 Nov 2021 12:58:01 -0500

On Fri, Nov 05, 2021 at 10:36:18AM +1100, Finn Thain wrote:
> There is no __get_user_asm2_goto in this tree, and __get_user_asm2 already
> has the "=&r" constraint:
> 
> #define __get_user_asm2(x, addr, err)                   \
>         __asm__ __volatile__(                           \
>                 "1:     lwz%X2 %1, %2\n"                        \
>                 "2:     lwz%X2 %L1, %L2\n"              \
>                 "3:\n"                                  \
>                 ".section .fixup,\"ax\"\n"              \
>                 "4:     li %0,%3\n"                     \
>                 "       li %1,0\n"                      \
>                 "       li %1+1,0\n"                    \
>                 "       b 3b\n"                         \
>                 ".previous\n"                           \
>                 EX_TABLE(1b, 4b)                        \
>                 EX_TABLE(2b, 4b)                        \
>                 : "=r" (err), "=&r" (x)                 \
>                 : "m" (*addr), "i" (-EFAULT), "0" (err)) 

operand 0 needs an earlyclobber as well, in principle.  But there is
nothing left it can be tied to, so this won't change generated code.

What is operand 4 about?  It isn't used?

The "%1+1" can be written %L1 btw (it means exactly the same thing, but
work on more configs).

Segher