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


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] Use long for mantissa for generic mp code


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.


r~


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