[libc-dev] [musl] Powerpc Linux 'scv' system call ABI proposal take 2

Nicholas Piggin via libc-dev libc-dev at lists.llvm.org
Tue Apr 21 23:29:19 PDT 2020

Excerpts from Nicholas Piggin's message of April 22, 2020 4:18 pm:
> If we go further and try to preserve r3 as well by putting the return 
> value in r9 or r0, we go backwards about 300 bytes. It's good for the 
> lock loops and complex functions, but hurts a lot of simpler functions 
> that have to add 'mr r3,r9' etc.  
> Most of the time there are saved non-volatile GPRs around anyway though, 
> so not sure which way to go on this. Text size savings can't be ignored
> and it's pretty easy for the kernel to do (we already save r3-r8 and
> zero them on exit, so we could load them instead from cache line that's
> should be hot).
> So I may be inclined to go this way, even if we won't see benefit now.

By, "this way" I don't mean r9 or r0 return value (which is larger code),
but r3 return value with r0,r4-r8 preserved.


More information about the libc-dev mailing list