block_of_code: Add HasAVX512_Icelake

Detect AVX512 feature support up to the [Icelake-level featureset](https://en.wikipedia.org/wiki/AVX-512#CPUs_with_AVX-512)
This commit is contained in:
Wunkolo 2020-09-09 09:40:09 -07:00 committed by merry
parent 0e1112b7df
commit c2d5f6da90
2 changed files with 16 additions and 0 deletions

View file

@ -384,6 +384,21 @@ bool BlockOfCode::HasAVX512_Skylake() const {
&& DoesCpuSupport(Xbyak::util::Cpu::tAVX512VL); && DoesCpuSupport(Xbyak::util::Cpu::tAVX512VL);
} }
bool BlockOfCode::HasAVX512_Icelake() const {
return DoesCpuSupport(Xbyak::util::Cpu::tAVX512F)
&& DoesCpuSupport(Xbyak::util::Cpu::tAVX512CD)
&& DoesCpuSupport(Xbyak::util::Cpu::tAVX512BW)
&& DoesCpuSupport(Xbyak::util::Cpu::tAVX512DQ)
&& DoesCpuSupport(Xbyak::util::Cpu::tAVX512VL)
&& DoesCpuSupport(Xbyak::util::Cpu::tAVX512_VPOPCNTDQ)
&& DoesCpuSupport(Xbyak::util::Cpu::tAVX512_VNNI)
&& DoesCpuSupport(Xbyak::util::Cpu::tGFNI)
&& DoesCpuSupport(Xbyak::util::Cpu::tVAES)
&& DoesCpuSupport(Xbyak::util::Cpu::tAVX512_VBMI2)
&& DoesCpuSupport(Xbyak::util::Cpu::tAVX512_BITALG)
&& DoesCpuSupport(Xbyak::util::Cpu::tVPCLMULQDQ);
}
bool BlockOfCode::HasAVX512_BITALG() const { bool BlockOfCode::HasAVX512_BITALG() const {
return DoesCpuSupport(Xbyak::util::Cpu::tAVX512_BITALG); return DoesCpuSupport(Xbyak::util::Cpu::tAVX512_BITALG);
} }

View file

@ -158,6 +158,7 @@ public:
bool HasFMA() const; bool HasFMA() const;
bool HasAVX2() const; bool HasAVX2() const;
bool HasAVX512_Skylake() const; bool HasAVX512_Skylake() const;
bool HasAVX512_Icelake() const;
bool HasAVX512_BITALG() const; bool HasAVX512_BITALG() const;
private: private: