[PATCH] Powerpc/trampline: consider __NO_FPRS__
Ryan Arnold
ryan.arnold@gmail.com
Fri Jun 18 19:11:00 GMT 2010
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
More information about the Libc-alpha
mailing list