On Sun, 15 Mar 2026, Carter Rennick wrote:

> On 2026-03-14 4:43 p.m., Andrew Pinski wrote:
> 
> On Sat, Mar 14, 2026 at 1:03?PM Maciej W. Rozycki <[email protected]> wrote:
> 
>  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).

Right.  See also gcc-patches traffic around the time I changed 
the MAX_FIXED_MODE_SIZE default.

> Thank you both for your insights. I have confirmed that simply removing the
> macro resolves the issue and produces the same test results. I have updated 
> the
> patch accordingly.

Just one thing I noticed:

> gcc/testsuite/ChangeLog:
>       * gcc.target/mips/pr120144.c: New test.

This should *not* be a mips-only test-case.  There's nothing 
mips-specific about it; it has a sufficient int128-guard.  I 
guess gcc.dg/torture is best?

> diff --git a/gcc/testsuite/gcc.target/mips/pr120144.c 
> b/gcc/testsuite/gcc.target/mips/pr120144.c
> new file mode 100644
> index 00000000000..e254771ea78
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/mips/pr120144.c
> @@ -0,0 +1,8 @@
> +/* PR target/120144 */
> +/* { dg-do compile } */
> +/* { dg-require-effective-target int128 } */
> +
> +int f(unsigned __int128 t)
> +{
> +  return __builtin_clzg(t);
> +}

brgds, H-P

Reply via email to