On Thu, Jun 19, 2025 at 05:59:08PM +0800, Yang Yujie wrote: > +/* Implement TARGET_C_BITINT_TYPE_INFO. > + Return true if _BitInt(N) is supported and fill its details into *INFO. > */ > +bool > +loongarch_bitint_type_info (int n, struct bitint_info *info) > +{ > + if (n <= 8) > + info->limb_mode = QImode; > + else if (n <= 16) > + info->limb_mode = HImode; > + else if (n <= 32) > + info->limb_mode = SImode; > + else > + info->limb_mode = DImode;
As mentioned in another mail, please follow what aarch64 is doing here (at least unless you explain how it violates your psABI): if (n <= 8) info->limb_mode = QImode; else if (n <= 16) info->limb_mode = HImode; else if (n <= 32) info->limb_mode = SImode; else if (n <= 64) info->limb_mode = DImode; else if (n <= 128) info->limb_mode = TImode; else info->limb_mode = DImode; if (n > 128) info->abi_limb_mode = TImode; else info->abi_limb_mode = info->limb_mode; If you have !TARGET_64BIT ABI, using TImode for it looks wrong to me though. I'm not sure if you do though, while the backend has tons of TARGET_64BIT checks etc., ISA_BASE_LA64 seems to be the only one except for N_ISA_BASE_TYPES. Jakub