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: Thu, 10 Jul 2014 10:30:09 +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> <3286026 dot Mx0bBiaKZx at polaris> <201407070601 dot s6761iXu005256 at greed dot delorie dot com>
> Except gcc now knows the size of partial int modes. In this case,
> PSImode is 20 bits and TYPE_SIZE is 20 bits, so they match.
I don't understand. The problematic change is
> - TYPE_SIZE (type) = bitsize_int (GET_MODE_BITSIZE (TYPE_MODE (type)));
> + TYPE_SIZE (type) = bitsize_int (GET_MODE_PRECISION (TYPE_MODE
> (type))); TYPE_SIZE_UNIT (type) = size_int (GET_MODE_SIZE (TYPE_MODE
> (type))); break;
which means that the precision of the mode is used to set the size of the
type, which very likely means that the size of the mode is larger. So the
size of the mode will be larger than the size of the type, which is a lie.
> The code was biting me when TYPE_SIZE was bigger than PSImode, and the
> code kept choosing SImode instead.
IMO you're papering over the real issue, which appears to be the choice of the
mode. Why does the code choose PSImode instead of SImode, if the type and the
mode have the same precision (20) and size (24)?
--
Eric Botcazou