powerpc Linux scv support and scv system call ABI proposal

Segher Boessenkool segher at kernel.crashing.org
Thu Jan 30 00:20:19 AEDT 2020


On Wed, Jan 29, 2020 at 02:58:44PM +1000, Nicholas Piggin wrote:
> Adhemerval Zanella's on January 29, 2020 3:26 am:
> >     __asm__ __volatile__                                                \
> >       ("sc\n\t"                                                         \
> >        "bns+ 1f\n\t"                                                    \
> >        "neg %1, %1\n\t"                                                 \
> >        "1:\n\t"                                                         \

> True, but the taken branch would be a 1 cycle bubble in fetch. Could 
> avoid that by branching out of line then back for the error case. But
> mfocrf is fine (only sources one register), that's what should be used
> here I think.

        neg %9,%1 ; isel %1,%9,%1,so

> That probably makes the performance argument for avoiding CR[SO] for
> error return indication less significant. Commonality with other
> architectures is probably the bigger reason for it.

Yes, and to have the syscall calling convention closer to the normal
function calling convention would be good, too.


Segher


More information about the Linuxppc-dev mailing list