[PATCH] Fix ppc32 lrint (BZ #3155)

Steven Munroe munroesj@us.ibm.com
Thu Sep 7 16:18:00 GMT 2006


Jakub Jelinek wrote:
>Hi!
>
>PPC32 ABI forbids stack accesses below r1 (unlike PPC64 ABI).
>The following patch fixes lrint which was violating this (detected by
>valgrind).
>There are 4 other ppc32 files that violate this:
>libc/sysdeps/powerpc/powerpc32/fpu/fprrest.S
>libc/sysdeps/powerpc/powerpc32/fpu/fprsave.S
>libc/sysdeps/powerpc/powerpc32/gprrest0.S
>libc/sysdeps/powerpc/powerpc32/gprsave0.S
>The stubs from those files aren't exported from libc.so.6 nor actually
>used for anything there, so I wonder if we can't nuke them altogether,
>or if they should move to libc_nonshared.a after making all the functions
>.hidden there.  GCC provides (some of) the PPC32 ABI mandates stubs
>in crtsavres.o (and there it accesses memory below r11, not r1),
>so I'm not 100% if we need these at all.
>  
I am not sure where these came from or their history. As you say they
don't match the Linux ABI but we can get away with this because of the
way the kernel's signal.c builds signal frames. Not something we should
depend on. Easiest to just remove them from sysdeps/powerpc/powerpc32.

Looks like they do match the AIX xcoff ABI. So perhaps they should be
moved to sysdeps/unix/sysv/aix. I don't know who if any one is
maintaining the AIX code in libc. I'll check around.



More information about the Libc-hacker mailing list