Update CPUID detection for AVX2.
This commit is contained in:
parent
7055a8fc71
commit
125828b6b3
1 changed files with 4 additions and 0 deletions
|
@ -59,6 +59,7 @@
|
|||
#define SSE3_FLAG 0x1
|
||||
#define SSSE3_FLAG 0x200
|
||||
#define AVX_FLAG 0x10000000
|
||||
#define AVX2_FLAG (1U << 5)
|
||||
#define XOP_FLAG 0x800
|
||||
#define AES_FLAG 0x2000000
|
||||
|
||||
|
@ -178,6 +179,9 @@ cpuid_basic_identify(processor_cap_t *pc)
|
|||
if (raw.basic_cpuid[1][2] & AVX_FLAG) {
|
||||
pc->avx_level = 1;
|
||||
}
|
||||
if (raw.basic_cpuid[7][1] & AVX2_FLAG) {
|
||||
pc->avx_level = 2;
|
||||
}
|
||||
|
||||
if (raw.basic_cpuid[1][2] & AES_FLAG) {
|
||||
pc->aes_avail = 1;
|
||||
|
|
Loading…
Reference in a new issue