On Sat, Mar 14, 2026 at 1:03 PM Maciej W. Rozycki <[email protected]> wrote:
>
> On Sat, 14 Mar 2026, Maciej W. Rozycki wrote:
>
> > > diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
> > > index f52d0d2358c..535e10b8844 100644
> > > --- a/gcc/config/mips/mips.h
> > > +++ b/gcc/config/mips/mips.h
> > > @@ -1708,7 +1708,7 @@ FP_ASM_SPEC "\
> > >   /* long double is not a fixed mode, but the idea is that, if we
> > >     support long double, we also want a 128-bit integer type.  */
> > > -#define MAX_FIXED_MODE_SIZE MIPS_LONG_DOUBLE_TYPE_SIZE
> > > +#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TARGET_64BIT ? TImode : 
> > > DImode)
> >
> >  The comment requires adjustment as it no longer matches code.
> >
> >  Presumably it's a regression, isn't it?
>
>  Also I do believe the new MAX_FIXED_MODE_SIZE setting is also the default
> (cf. UNITS_PER_WORD), so ISTM the macro can simply be removed.  Question
> remains why it was added in the first place in its current form.

I looked into the history. It was added when 128bit long double
support was added back in 2003 (r0-47422-g8a3812735f1147).
I can't tell if o64 (or is it eabi64) was defined at the time or even
tried to be used.
Only in recent years if __int128 is defined libstdc++ starts to
support it and uses it with __builtin_clzg (which in turn uses
MAX_FIXED_MODE_SIZE).
It might be the case that Alexandre was trying to support at one point
128bit floating pointer with o32 and needed to define
MAX_FIXED_MODE_SIZE and never removed that definition when he
submitted the final patch for 128bit floating point.
Looks more like a historical accident rather than anything else.


Thanks,
Andrew

>
>   Maciej

Reply via email to