[musl] Powerpc Linux 'scv' system call ABI proposal take 2
Rich Felker
dalias at libc.org
Fri Apr 17 04:44:51 AEST 2020
On Thu, Apr 16, 2020 at 02:31:51PM -0400, Rich Felker wrote:
> > While on musl:
> >
> > 0000000000000000 <kill>:
> > 0: 48 83 ec 08 sub $0x8,%rsp
> > 4: 48 63 ff movslq %edi,%rdi
> > 7: 48 63 f6 movslq %esi,%rsi
> > a: b8 3e 00 00 00 mov $0x3e,%eax
> > f: 0f 05 syscall
> > 11: 48 89 c7 mov %rax,%rdi
> > 14: e8 00 00 00 00 callq 19 <kill+0x19>
> > 19: 5a pop %rdx
> > 1a: c3 retq
>
> Wow that's some extraordinarily bad codegen going on by gcc... The
> sign-extension is semantically needed and I don't see a good way
> around it (glibc's asm is kinda a hack taking advantage of kernel not
> looking at high bits, I think), but the gratuitous stack adjustment
> and refusal to generate a tail call isn't. I'll see if we can track
> down what's going on and get it fixed.
It seems to be https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14441
which I've updated with a comment about the above.
Rich
More information about the Linuxppc-dev
mailing list