@@ -78,32 +78,34 @@ enum cpu_type_enum {
78
78
#define CPU_FEATURE_FPU 3 /* CPU has FPU */
79
79
#define CPU_FEATURE_LSX 4 /* CPU has LSX (128-bit SIMD) */
80
80
#define CPU_FEATURE_LASX 5 /* CPU has LASX (256-bit SIMD) */
81
- #define CPU_FEATURE_COMPLEX 6 /* CPU has Complex instructions */
82
- #define CPU_FEATURE_CRYPTO 7 /* CPU has Crypto instructions */
83
- #define CPU_FEATURE_LVZ 8 /* CPU has Virtualization extension */
84
- #define CPU_FEATURE_LBT_X86 9 /* CPU has X86 Binary Translation */
85
- #define CPU_FEATURE_LBT_ARM 10 /* CPU has ARM Binary Translation */
86
- #define CPU_FEATURE_LBT_MIPS 11 /* CPU has MIPS Binary Translation */
87
- #define CPU_FEATURE_TLB 12 /* CPU has TLB */
88
- #define CPU_FEATURE_CSR 13 /* CPU has CSR */
89
- #define CPU_FEATURE_WATCH 14 /* CPU has watchpoint registers */
90
- #define CPU_FEATURE_VINT 15 /* CPU has vectored interrupts */
91
- #define CPU_FEATURE_CSRIPI 16 /* CPU has CSR-IPI */
92
- #define CPU_FEATURE_EXTIOI 17 /* CPU has EXT-IOI */
93
- #define CPU_FEATURE_PREFETCH 18 /* CPU has prefetch instructions */
94
- #define CPU_FEATURE_PMP 19 /* CPU has perfermance counter */
95
- #define CPU_FEATURE_SCALEFREQ 20 /* CPU supports cpufreq scaling */
96
- #define CPU_FEATURE_FLATMODE 21 /* CPU has flat mode */
97
- #define CPU_FEATURE_EIODECODE 22 /* CPU has EXTIOI interrupt pin decode mode */
98
- #define CPU_FEATURE_GUESTID 23 /* CPU has GuestID feature */
99
- #define CPU_FEATURE_HYPERVISOR 24 /* CPU has hypervisor (running in VM) */
81
+ #define CPU_FEATURE_CRC32 6 /* CPU has CRC32 instructions */
82
+ #define CPU_FEATURE_COMPLEX 7 /* CPU has Complex instructions */
83
+ #define CPU_FEATURE_CRYPTO 8 /* CPU has Crypto instructions */
84
+ #define CPU_FEATURE_LVZ 9 /* CPU has Virtualization extension */
85
+ #define CPU_FEATURE_LBT_X86 10 /* CPU has X86 Binary Translation */
86
+ #define CPU_FEATURE_LBT_ARM 11 /* CPU has ARM Binary Translation */
87
+ #define CPU_FEATURE_LBT_MIPS 12 /* CPU has MIPS Binary Translation */
88
+ #define CPU_FEATURE_TLB 13 /* CPU has TLB */
89
+ #define CPU_FEATURE_CSR 14 /* CPU has CSR */
90
+ #define CPU_FEATURE_WATCH 15 /* CPU has watchpoint registers */
91
+ #define CPU_FEATURE_VINT 16 /* CPU has vectored interrupts */
92
+ #define CPU_FEATURE_CSRIPI 17 /* CPU has CSR-IPI */
93
+ #define CPU_FEATURE_EXTIOI 18 /* CPU has EXT-IOI */
94
+ #define CPU_FEATURE_PREFETCH 19 /* CPU has prefetch instructions */
95
+ #define CPU_FEATURE_PMP 20 /* CPU has perfermance counter */
96
+ #define CPU_FEATURE_SCALEFREQ 21 /* CPU supports cpufreq scaling */
97
+ #define CPU_FEATURE_FLATMODE 22 /* CPU has flat mode */
98
+ #define CPU_FEATURE_EIODECODE 23 /* CPU has EXTIOI interrupt pin decode mode */
99
+ #define CPU_FEATURE_GUESTID 24 /* CPU has GuestID feature */
100
+ #define CPU_FEATURE_HYPERVISOR 25 /* CPU has hypervisor (running in VM) */
100
101
101
102
#define LOONGARCH_CPU_CPUCFG BIT_ULL(CPU_FEATURE_CPUCFG)
102
103
#define LOONGARCH_CPU_LAM BIT_ULL(CPU_FEATURE_LAM)
103
104
#define LOONGARCH_CPU_UAL BIT_ULL(CPU_FEATURE_UAL)
104
105
#define LOONGARCH_CPU_FPU BIT_ULL(CPU_FEATURE_FPU)
105
106
#define LOONGARCH_CPU_LSX BIT_ULL(CPU_FEATURE_LSX)
106
107
#define LOONGARCH_CPU_LASX BIT_ULL(CPU_FEATURE_LASX)
108
+ #define LOONGARCH_CPU_CRC32 BIT_ULL(CPU_FEATURE_CRC32)
107
109
#define LOONGARCH_CPU_COMPLEX BIT_ULL(CPU_FEATURE_COMPLEX)
108
110
#define LOONGARCH_CPU_CRYPTO BIT_ULL(CPU_FEATURE_CRYPTO)
109
111
#define LOONGARCH_CPU_LVZ BIT_ULL(CPU_FEATURE_LVZ)
0 commit comments