#ifndef LOONGARCH_FEATURE
#define LOONGARCH_FEATURE(NAME, KIND)
#endif

LOONGARCH_FEATURE("+32bit", FK_32BIT)
LOONGARCH_FEATURE("+64bit", FK_64BIT)
LOONGARCH_FEATURE("+f", FK_FP32)
LOONGARCH_FEATURE("+d", FK_FP64)
LOONGARCH_FEATURE("+lsx", FK_LSX)
LOONGARCH_FEATURE("+lasx", FK_LASX)
LOONGARCH_FEATURE("+lbt", FK_LBT)
LOONGARCH_FEATURE("+lvz", FK_LVZ)
LOONGARCH_FEATURE("+ual", FK_UAL)
LOONGARCH_FEATURE("+frecipe", FK_FRECIPE)
LOONGARCH_FEATURE("+lam-bh", FK_LAM_BH)
LOONGARCH_FEATURE("+lamcas", FK_LAMCAS)
LOONGARCH_FEATURE("+ld-seq-sa", FK_LD_SEQ_SA)
LOONGARCH_FEATURE("+div32", FK_DIV32)
LOONGARCH_FEATURE("+scq", FK_SCQ)
LOONGARCH_FEATURE("+32s", FK_32S)

#undef LOONGARCH_FEATURE

#ifndef LOONGARCH_ARCH
#define LOONGARCH_ARCH(NAME, KIND, FEATURES)
#endif

LOONGARCH_ARCH("loongarch32", AK_LOONGARCH32, FK_32BIT)
LOONGARCH_ARCH("loongarch64", AK_LOONGARCH64, FK_64BIT | FK_FP32 | FK_FP64 | FK_UAL)
LOONGARCH_ARCH("la464", AK_LA464, FK_64BIT | FK_FP32 | FK_FP64 | FK_LSX | FK_LASX | FK_UAL)
LOONGARCH_ARCH("la664", AK_LA664, FK_64BIT | FK_FP32 | FK_FP64 | FK_LSX | FK_LASX | FK_UAL | FK_FRECIPE | FK_LAM_BH | FK_LAMCAS | FK_LD_SEQ_SA | FK_DIV32 | FK_SCQ)

#undef LOONGARCH_ARCH
