This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 1/4] change specific int128 -> generic intN
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 12 Jul 2014 11:13:01 +0200
- Subject: Re: [patch 1/4] change specific int128 -> generic intN
- Authentication-results: sourceware.org; auth=none
- References: <201404142303 dot s3EN3ONP009938 at greed dot delorie dot com> <1528221 dot 6ADjPgnoBP at polaris> <201407111630 dot s6BGUlfp009499 at greed dot delorie dot com>
> > What are GET_MODE_BITSIZE and GET_MODE_PRECISION for PSImode?
>
> It *should* be 20 and 20 for msp430. But GET_MODE_BITSIZE returns 32,
> because it's a macro that does GET_MODE_SIZE * BITS_PER_UNIT, so it
> cannot return 20.
No, it should not be 20, mode sizes are multiple of the unit, you're mixing
precision and size. I doubt the hardware accesses 20 bits, more probably 24
or 32 bits, so the mode size cannot be 20 bits.
> GCC typically uses size for "fits in a" tests.
Then change them to use the precision when this matters, the wide-int folks
have already changed them in a few places but that's probably not sufficient.
--
Eric Botcazou