diff options
author | Attila Afra <[email protected]> | 2020-10-12 23:27:40 +0300 |
---|---|---|
committer | Attila Afra <[email protected]> | 2020-10-12 23:27:40 +0300 |
commit | ea388b3c69eee3822eecc51a7e06d3ca494f089c (patch) | |
tree | 9080674ac820c5df810df77c5247b2299f350d00 | |
parent | ed1b8186fd05ab1a66d9036922f0d7621f46aca7 (diff) | |
download | xbyak-ea388b3c69eee3822eecc51a7e06d3ca494f089c.tar.gz xbyak-ea388b3c69eee3822eecc51a7e06d3ca494f089c.zip |
fixed incorrect detection of AVX-512 on macOS
-rw-r--r-- | xbyak/xbyak_util.h | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |