This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [COMMITTED] PowerPC: Fix copysignf optimization macro
- From: Andreas Schwab <schwab at suse dot de>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Wed, 21 May 2014 08:55:06 +0200
- Subject: Re: [COMMITTED] PowerPC: Fix copysignf optimization macro
- Authentication-results: sourceware.org; auth=none
- References: <537BC70F dot 1070304 at linux dot vnet dot ibm dot com>
Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes:
> diff --git a/sysdeps/powerpc/fpu/math_private.h b/sysdeps/powerpc/fpu/math_private.h
> index dde153d..1ec4881 100644
> --- a/sysdeps/powerpc/fpu/math_private.h
> +++ b/sysdeps/powerpc/fpu/math_private.h
> @@ -166,11 +166,13 @@ __ieee754_sqrtf (float __x)
> # ifndef __copysignf
> # define __copysignf(x, y) \
> ({ float __z; \
> + float __x = x; \
> + float __y = y; \
> __asm __volatile ( \
> " fcpsgn %0,%1,%2\n" \
> " frsp %0,%0\n" \
> : "=f" (__z) \
> - : "f" (y), "f" (x)); \
> + : "f" (__y), "f" (__x));\
> __z; })
> # endif
Is that definition actually needed at all?
sysdeps/generic/math_private.h defines it as __builtin_copysignf.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."