From ee8d666a27f092f669b4df084837aec1ae683899 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Fri, 17 Feb 2023 09:06:53 -0800 Subject: [PATCH] Add intrinsics headers --- include/boost/charconv/detail/config.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/boost/charconv/detail/config.hpp b/include/boost/charconv/detail/config.hpp index 62e3536..0991b03 100644 --- a/include/boost/charconv/detail/config.hpp +++ b/include/boost/charconv/detail/config.hpp @@ -64,6 +64,24 @@ #endif // Determine endianness +// Inclue intrinsics if available +#if defined(_MSC_VER) +# include +# if defined(_WIN64) +# define BOOST_CHARCONV_HAS_MSVC_64BIT_INTRINSICS +# else +# define BOOST_CHARCONV_HAS_MSVC_32BIT_INTRINSICS +# endif +#elif (defined(__x86_64__) || defined(__i386__)) +# include +# define BOOST_CHARCONV_HAS_X86_INTRINSICS +#elif defined(__ARM_NEON__) +# include +# define BOOST_CHARCONV_HAS_ARM_INTRINSICS +#else +# define BOOST_CHARCONV_HAS_NO_INTRINSICS +#endif + static_assert((BOOST_CHARCONV_ENDIAN_BIG_BYTE || BOOST_CHARCONV_ENDIAN_LITTLE_BYTE) && !(BOOST_CHARCONV_ENDIAN_BIG_BYTE && BOOST_CHARCONV_ENDIAN_LITTLE_BYTE), "Inconsistent endianness detected. Please file an issue at https://github.com/cppalliance/charconv with your architecture");