From cda10cc799d14582f742eaebf125778025526448 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 18 Oct 2020 15:50:48 -0700 Subject: [PATCH] ircd::simd::support: Fix formatting; fix avx512f macro name; add vbmi/vbmi2. --- include/ircd/simd/support.h | 54 ++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/include/ircd/simd/support.h b/include/ircd/simd/support.h index 8300138de..2937a9d1c 100644 --- a/include/ircd/simd/support.h +++ b/include/ircd/simd/support.h @@ -20,81 +20,99 @@ namespace ircd::simd::support { constexpr bool sse2 { - #if defined(__SSE2__) + #if defined(__SSE2__) true - #else + #else false #endif }; constexpr bool sse3 { - #if defined(__SSE3__) + #if defined(__SSE3__) true - #else + #else false #endif }; constexpr bool ssse3 { - #if defined(__SSSE3__) + #if defined(__SSSE3__) true - #else + #else false #endif }; constexpr bool sse4a { - #if defined(__SSE4A__) + #if defined(__SSE4A__) true - #else + #else false #endif }; constexpr bool sse4_1 { - #if defined(__SSE4_1__) + #if defined(__SSE4_1__) true - #else + #else false #endif }; constexpr bool sse4_2 { - #if defined(__SSE4_2__) + #if defined(__SSE4_2__) true - #else + #else false #endif }; constexpr bool avx { - #if defined(__AVX__) + #if defined(__AVX__) true - #else + #else false #endif }; constexpr bool avx2 { - #if defined(__AVX2__) + #if defined(__AVX2__) true - #else + #else false #endif }; constexpr bool avx512f { - #if defined(__AVX512__) + #if defined(__AVX512F__) true - #else + #else + false + #endif + }; + + constexpr bool avx512vbmi + { + #if defined(__AVX512VBMI__) + true + #else + false + #endif + }; + + constexpr bool avx512vbmi2 + { + #if defined(__AVX512VBMI2__) + true + #else false #endif };