This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Powerpc/trampline: consider __NO_FPRS__
- From: Ryan Arnold <ryan dot arnold at gmail dot com>
- To: Sebastian Andrzej Siewior <sebastian at breakpoint dot cc>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Fri, 18 Jun 2010 14:10:52 -0500
- Subject: Re: [PATCH] Powerpc/trampline: consider __NO_FPRS__
- References: <20100618083214.GB5851@Chamillionaire.breakpoint.cc>
On Fri, Jun 18, 2010 at 3:32 AM, Sebastian Andrzej Siewior
<sebastian@breakpoint.cc> wrote:
> 2010-06-18 ÂSebastan Andrzej Siewior Â<bigeasy@linutronix.de>
>
> Â Â Â Â* sysdeps/powerpc/powerpc32/dl-trampoline.S: Put __NO_FPRS__ around
> Â Â Â Âfloating point opcodes.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> Âsysdeps/powerpc/powerpc32/dl-trampoline.S | Â Â4 ++++
> Â1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/sysdeps/powerpc/powerpc32/dl-trampoline.S b/sysdeps/powerpc/powerpc32/dl-trampoline.S
> index 6a158c3..bd815c7 100644
> --- a/sysdeps/powerpc/powerpc32/dl-trampoline.S
> +++ b/sysdeps/powerpc/powerpc32/dl-trampoline.S
> @@ -137,6 +137,7 @@ _dl_prof_resolve:
> Â Â Â Âstw r9,40(r1)
> Â Â Â Âstw r10,44(r1)
> Â Â Â Âstw r0,8(r1)
> +#ifndef __NO_FPRS__
> Â# Save the floating point registers
> Â Â Â Âstfd fp1,48(r1)
> Â Â Â Âstfd fp2,56(r1)
> @@ -146,6 +147,7 @@ _dl_prof_resolve:
> Â Â Â Âstfd fp6,88(r1)
> Â Â Â Âstfd fp7,96(r1)
> Â Â Â Âstfd fp8,104(r1)
> +#endif
> Â# XXX TODO: store vmx registers
> Â# Load the extra parameters.
> Â Â Â Âaddi r6,r1,16
> @@ -169,6 +171,7 @@ _dl_prof_resolve:
> Â Â Â Âlwz r4,20(r1)
> Â Â Â Âlwz r3,16(r1)
> Â Â Â Â lwz r0,12(r1)
> +#ifndef __NO_FPRS__
> Â# Load the floating point registers.
> Â Â Â Âlfd fp1,48(r1)
> Â Â Â Âlfd fp2,56(r1)
> @@ -178,6 +181,7 @@ _dl_prof_resolve:
> Â Â Â Âlfd fp6,88(r1)
> Â Â Â Âlfd fp7,96(r1)
> Â Â Â Âlfd fp8,104(r1)
> +#endif
> Â# ...unwind the stack frame, and jump to the PLT entry we updated.
> Â Â Â Âaddi r1,r1,320
> Â Â Â Âbctr
> --
> 1.6.6.1
The currently blessed method for achieving what you want is to clone
this code and move a copy with FPU support into the powerpc32/fpu/
directory and strip the FPR save out of the powerpc32/dl-trampoline.S
code. This, of course, introduces code bloat of asm files which is
... undesirable.
Ryan S. Arnold