This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Use long for mantissa for generic mp code
- From: Richard Henderson <rth at twiddle dot net>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 26 Feb 2013 10:53:54 -0800
- Subject: Re: [PATCH] Use long for mantissa for generic mp code
- References: <20130226154206.GY21039@spoyarek.pnq.redhat.com>
On 02/26/2013 07:42 AM, Siddhesh Poyarekar wrote:
> +typedef long mantissa_t;
> +typedef int64_t mantissa_store_t;
Is there any need for these to be signed? Unsigned greatly
simplifies the code generated for DIV_RADIX.
> +#define TWOPOW(i) (1 << i)
Wrong type. 1L (or 1UL, see above).
> +/* Truncate IN to a multiple of F, where F is a power of two. */
> +#define TRUNCATE_TO_MUL(in, f) ((in) & ~(f))
Err, ~f? Either this doesn't work at all, or the comment is wrong.
> +++ b/sysdeps/powerpc/powerpc32/power4/fpu/mpa-arch.h
> +++ b/sysdeps/powerpc/powerpc64/power4/fpu/mpa-arch.h
We should not have two copies of this file.
Is there, or could there be, a common directory, perhaps
sysdeps/powerpc/power4/fpu/, that both targets share?
Alternately, one file should include the other explicitly.