On Wed, 2025-12-10 at 19:21 +0800, WANG Xuerui wrote:
> On 11/27/25 17:22, mengqinggang wrote:
> > [snip]
> > diff --git a/gcc/config/loongarch/loongarch-c.cc
> > b/gcc/config/loongarch/loongarch-c.cc
> > index fc031a6fe90..6e2f8f43818 100644
> > --- a/gcc/config/loongarch/loongarch-c.cc
> > +++ b/gcc/config/loongarch/loongarch-c.cc
> > @@ -55,6 +55,11 @@ loongarch_define_unconditional_macros (cpp_reader *pfile)
> > builtin_define ("__loongarch_grlen=64");
> > builtin_define ("__loongarch64");
> > }
> > + else
> > + builtin_define ("__loongarch_grlen=32");
> > +
> > + if (TARGET_ABI_ILP32)
> > + builtin_define ("__loongarch_ilp32");
> >
> > if (TARGET_ABI_LP64)
> > {
>
> It would be great to indicate LA32R with a builtin macro too, something
> like "__loongarch_la32r" sounds great to me. I'm okay with spelling
> "reduced" fully out too.
IMO we should add something like "__loongarch_32s" and use
!defined(__loongarch_32s) for 32r then. For all yet supported ISA
subsets (LSX, LASX, etc.) we always use the positive form to indicate
the subset is available, not the negative form.
--
Xi Ruoyao <[email protected]>