This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ppc32 lrint (BZ #3155)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]