Skip to content

Commit

Permalink
cpufeatures: add support for detecting AVX-512 (#862)
Browse files Browse the repository at this point in the history
Adds support for detecting the following features:

- `avx512f`
- `avx512dq`
- `avx512ifma`
- `avx512pf`
- `avx512er`
- `avx512cd`
- `avx512bw`
- `avx512vl`

CPUID bitflags obtained from this table:

https://en.wikichip.org/wiki/x86/avx-512#Detection

Closes #815
  • Loading branch information
tarcieri authored Mar 24, 2023
1 parent b05b15a commit 1ffdfbe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cpufeatures/src/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,15 @@ __expand_check_macro! {
("bmi1", 1, ebx, 3),
("avx2", 0, ecx, 28, 1, ebx, 5),
("bmi2", 1, ebx, 8),
("avx512f", 1, ebx, 16),
("avx512dq", 1, ebx, 17),
("rdseed", 1, ebx, 18),
("adx", 1, ebx, 19),
("avx512ifma", 1, ebx, 21),
("avx512pf", 1, ebx, 26),
("avx512er", 1, ebx, 27),
("avx512cd", 1, ebx, 28),
("sha", 1, ebx, 29),
("avx512bw", 1, ebx, 30),
("avx512vl", 1, ebx, 31),
}

0 comments on commit 1ffdfbe

Please sign in to comment.