On Wed, Sep 9, 2026 at 9:23 PM Stefan Schulze Frielinghaus
<[email protected]> wrote:
>
> Hi Rainer,
>
> On Wed, Sep 09, 2026 at 01:12:23PM +0200, Rainer Orth wrote:
> > Hi Stefan,
> >
> > > Initially asm-hard-reg-2.c was intended to be considered only on 64-bit
> > > x86. Commit r16-3110 changed this by adding i?86-*-* to the target
> > > selector but does not add a definition for GPR which renders those tests
> > > to fail for i?86-*-*. My intention to not include 32-bit targets was
> > > due to the usage of long long integer types for GPR operands. @H.J. Lu,
> > > can you elaborate on that commit? Was adding i?86-*-* really intended?
Since gcc.dg/asm-hard-reg-5.c has
#elif defined (__x86_64__)
# define VR "{xmm9}"
/* { dg-final { scan-assembler-times "foo\t%xmm9" 2 { target { x86_64-*-* } } }
} */
#endif
this file failed to compile with -m32 on x86_64. BTW,
/* { dg-final { scan-assembler-times "foo\t%xmm9" 2 { target { x86_64-*-* } } }
} */
should be changed to
/* { dg-final { scan-assembler-times "foo\t%xmm9" 2 { target { {
i?86-*-* x86_64-*-* } && { ! ia32 } } } } } */
since -m64 defines __x86_64__ on x86.
> > > If so a #define GPR is needed for the target.
> >
> > adding just target x86_64-*-* is always wrong: you can also get 64-bit
> > x86 on i?86-*-* targets with -m64 (and 32-bit x86 on x86_64-*-* with
> > -m32). Best use target x86 instead.
> >
> > If you need to restrict to 64-bit, use target { x86 && { ! ia32 } }.
>
> I must be still missing something since the test is run for me on my
> 32-bit cross (i686-linux-gnu) despite the fact of using
> { x86 && { ! ia32 } }.
>
> The intention of the test was to cover type long long for GPRs which is
> not supported on 32-bit x86: "warning: unsupported size for integer
> register"
>
> What seems to work for me (in the sense that the test is skipped) is the
> selector { x86 && lp64 }, although, I haven't wrapped my head around why
> and especially what the difference between !ia32 and lp64 is.
>
> Cheers,
> Stefan
--
H.J.