From ea388b3c69eee3822eecc51a7e06d3ca494f089c Mon Sep 17 00:00:00 2001 From: Attila Afra Date: Mon, 12 Oct 2020 23:27:40 +0300 Subject: fixed incorrect detection of AVX-512 on macOS --- xbyak/xbyak_util.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xbyak/xbyak_util.h b/xbyak/xbyak_util.h index 1e9bd1e..ca83498 100644 --- a/xbyak/xbyak_util.h +++ b/xbyak/xbyak_util.h @@ -442,7 +442,11 @@ public: if ((bv & 6) == 6) { if (ECX & (1U << 28)) type_ |= tAVX; if (ECX & (1U << 12)) type_ |= tFMA; - if (((bv >> 5) & 7) == 7) { + // do *not* check AVX-512 state on macOS because it has on-demand AVX-512 support + #if !defined(__APPLE__) + if (((bv >> 5) & 7) == 7) + #endif + { getCpuidEx(7, 0, data); if (EBX & (1U << 16)) type_ |= tAVX512F; if (type_ & tAVX512F) { -- cgit v1.2.3