On Wed, May 12, 2021 at 2:06 PM H.J. Lu <hjl.to...@gmail.com> wrote:
>
> On Wed, May 12, 2021 at 2:00 AM Richard Biener
> <richard.guent...@gmail.com> wrote:
> >
> > On Wed, May 12, 2021 at 1:35 AM H.J. Lu <hjl.to...@gmail.com> wrote:
> > >
> > > It is only defined for i386 and everyone uses the default:
> > >
> > >  #define MAX_BITSIZE_MODE_ANY_INT (64*BITS_PER_UNIT)
> >
> > The default is determined by genmodes.c which looks at the maximum
> > size of any [partial] integer mode.  Since we have
> >
> > INT_MODE (OI, 32);
> > INT_MODE (XI, 64);
> >
> > this will increase the size of wide_int.  aarch64 and arm are the only
> > other targets with XImode, OImode is also used by s390 and ia64.
> >
> > Keeping wide_int small is desirable.
>
> Since I want to use OImode and XImode in op_by_pieces operations,
> wide_int needs to support OImode and XImode.

OK, I see.

Richard.

> > Richard.
> >
> > > Whatever problems we had before, they have been fixed now.
> > >
> > >         * config/i386/i386-modes.def (MAX_BITSIZE_MODE_ANY_INT): Removed.
> > > ---
> > >  gcc/config/i386/i386-modes.def | 15 +++------------
> > >  1 file changed, 3 insertions(+), 12 deletions(-)
> > >
> > > diff --git a/gcc/config/i386/i386-modes.def 
> > > b/gcc/config/i386/i386-modes.def
> > > index dbddfd8e48f..4e7014be034 100644
> > > --- a/gcc/config/i386/i386-modes.def
> > > +++ b/gcc/config/i386/i386-modes.def
> > > @@ -107,19 +107,10 @@ INT_MODE (XI, 64);
> > >  PARTIAL_INT_MODE (HI, 16, P2QI);
> > >  PARTIAL_INT_MODE (SI, 32, P2HI);
> > >
> > > -/* Mode used for signed overflow checking of TImode.  As
> > > -   MAX_BITSIZE_MODE_ANY_INT is only 160, wide-int.h reserves only that
> > > -   rounded up to multiple of HOST_BITS_PER_WIDE_INT bits in wide_int 
> > > etc.,
> > > -   so OImode is too large.  For the overflow checking we actually need
> > > -   just 1 or 2 bits beyond TImode precision.  Use 160 bits to have
> > > -   a multiple of 32.  */
> > > +/* Mode used for signed overflow checking of TImode.  For the overflow
> > > +   checking we actually need just 1 or 2 bits beyond TImode precision.
> > > +   Use 160 bits to have a multiple of 32.  */
> > >  PARTIAL_INT_MODE (OI, 160, POI);
> > >
> > > -/* Keep the OI and XI modes from confusing the compiler into thinking
> > > -   that these modes could actually be used for computation.  They are
> > > -   only holders for vectors during data movement.  Include POImode 
> > > precision
> > > -   though.  */
> > > -#define MAX_BITSIZE_MODE_ANY_INT (160)
> > > -
> > >  /* The symbol Pmode stands for one of the above machine modes (usually 
> > > SImode).
> > >     The tm.h file specifies which one.  It is not a distinct mode.  */
> > > --
> > > 2.31.1
> > >
>
>
>
> --
> H.J.

Reply via email to