Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 16 Apr 2020 14:44:51 -0400
From: Rich Felker <dalias@...c.org>
To: Adhemerval Zanella <adhemerval.zanella@...aro.org>
Cc: Nicholas Piggin <npiggin@...il.com>, libc-alpha@...rceware.org,
	musl@...ts.openwall.com, linuxppc-dev@...ts.ozlabs.org,
	libc-dev@...ts.llvm.org
Subject: Re: Powerpc Linux 'scv' system call ABI proposal take 2

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.