This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Setting precision for a PSImode type
- From: Peter Bigot <bigotp at acm dot org>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 11 Apr 2012 11:53:43 -0500
- Subject: Re: Setting precision for a PSImode type
- References: <CAPOJ94Nb9Ub5_746eriWOyP4aK--4d5hL591XnEShEH-4xP+6A@mail.gmail.com> <4F54EBFD.4060605@codesourcery.com>
On Mon, Mar 5, 2012 at 10:38 AM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> On 03/05/2012 05:24 PM, Peter Bigot wrote:
>> And is there any reason (other than it doesn't seem to have been done
>> before) to believe PSImode is the wrong way to support a
>> general-purpose 20-bit integral type in gcc?
>
> If you're using 4.7.0, it should be possible to use FRACTIONAL_INT_MODE
> and get reasonable results. However, it hasn't been tested much, since
> the final bits of the patch series which would have added 40 bit int
> support to the C frontend didn't make it in. See the discussion following
> ?http://gcc.gnu.org/ml/gcc-patches/2011-07/msg00079.html
I stuck with PARTIAL_INT_MODE instead of FRACTIONAL_INT_MODE because
in my case the new type should not appear in the widen/narrow
hierarchy of MODE_INT, but the patches you added for this were
critical to the success I've had: 4.7.0 is working very well for me.
I've filed two bug reports for cases where BITSIZE needs to be updated
to PRECISION. Since my back-end is out of tree I can't provide test
cases, but if you could do so, or could apply the fixes as obvious, it
might help future developers avoid the problems I found. Thanks.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52919
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52856
Peter