diff options
Diffstat (limited to 'config/toolchain-simd.m4')
-rw-r--r-- | config/toolchain-simd.m4 | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/config/toolchain-simd.m4 b/config/toolchain-simd.m4 index 29abbbb5b..37627b813 100644 --- a/config/toolchain-simd.m4 +++ b/config/toolchain-simd.m4 @@ -21,6 +21,8 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD], [ ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512PF ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512ER ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512VL + ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AES + ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_PCLMULQDQ ;; esac ]) @@ -359,3 +361,43 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512VL], [ AC_MSG_RESULT([no]) ]) ]) + +dnl # +dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AES +dnl # +AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AES], [ + AC_MSG_CHECKING([whether host toolchain supports AES]) + + AC_LINK_IFELSE([AC_LANG_SOURCE([ + [ + void main() + { + __asm__ __volatile__("aesenc %xmm0, %xmm1"); + } + ]])], [ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_AES], 1, [Define if host toolchain supports AES]) + ], [ + AC_MSG_RESULT([no]) + ]) +]) + +dnl # +dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_PCLMULQDQ +dnl # +AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_PCLMULQDQ], [ + AC_MSG_CHECKING([whether host toolchain supports PCLMULQDQ]) + + AC_LINK_IFELSE([AC_LANG_SOURCE([ + [ + void main() + { + __asm__ __volatile__("pclmulqdq %0, %%xmm0, %%xmm1" :: "i"(0)); + } + ]])], [ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_PCLMULQDQ], 1, [Define if host toolchain supports PCLMULQDQ]) + ], [ + AC_MSG_RESULT([no]) + ]) +]) |