Add AVX512F flag
This commit is contained in:
@@ -23,7 +23,12 @@ pub(crate) fn define(shared: &SettingGroup) -> SettingGroup {
|
||||
);
|
||||
let has_avx512vl = settings.add_bool(
|
||||
"has_avx512vl",
|
||||
"AVX512DQ: CPUID.07H:EBX.AVX512VL[bit 31]",
|
||||
"AVX512VL: CPUID.07H:EBX.AVX512VL[bit 31]",
|
||||
false,
|
||||
);
|
||||
let has_avx512f = settings.add_bool(
|
||||
"has_avx512f",
|
||||
"AVX512F: CPUID.07H:EBX.AVX512F[bit 16]",
|
||||
false,
|
||||
);
|
||||
let has_popcnt = settings.add_bool("has_popcnt", "POPCNT: CPUID.01H:ECX.POPCNT[bit 23]", false);
|
||||
@@ -76,6 +81,10 @@ pub(crate) fn define(shared: &SettingGroup) -> SettingGroup {
|
||||
"use_avx512vl_simd",
|
||||
predicate!(shared_enable_simd && has_avx512vl),
|
||||
);
|
||||
settings.add_predicate(
|
||||
"use_avx512f_simd",
|
||||
predicate!(shared_enable_simd && has_avx512f),
|
||||
);
|
||||
|
||||
settings.add_predicate("use_popcnt", predicate!(has_popcnt && has_sse42));
|
||||
settings.add_predicate("use_bmi1", predicate!(has_bmi1));
|
||||
|
||||
@@ -91,6 +91,9 @@ fn parse_x86_cpuid(isa_builder: &mut isa::Builder) -> Result<(), &'static str> {
|
||||
if info.has_avx512vl() {
|
||||
isa_builder.enable("has_avx512vl").unwrap();
|
||||
}
|
||||
if info.has_avx512f() {
|
||||
isa_builder.enable("has_avx512f").unwrap();
|
||||
}
|
||||
}
|
||||
if let Some(info) = cpuid.get_extended_function_info() {
|
||||
if info.has_lzcnt() {
|
||||
|
||||
Reference in New Issue
Block a user