Commit 214b02a5 authored by Evan Nemerson's avatar Evan Nemerson

xop: initial implementation

XOP was an AMD ISA extension which Intel never adopted.  It is present
on heavy-equipment CPUs (bulldozer, piledriver, etc.), but no longer
supported on Zen.  It never really attained widespread use, but this
could still be useful.

Huge thanks to Jan Ringoš (@tringi) for testing this during
development; I don't have access to any hardware that supports XOP
so Jan's involvement was absolutely critical.

This is just the portable version; we still need to go through and add
accelerated implementations.

Fixes #678
parent e4e2a2fa
......@@ -254,6 +254,9 @@
# if defined(__SSE4_2__)
# define SIMDE_ARCH_X86_SSE4_2 1
# endif
# if defined(__XOP__)
# define SIMDE_ARCH_X86_XOP 1
# endif
# if defined(__AVX__)
# define SIMDE_ARCH_X86_AVX 1
# if !defined(SIMDE_ARCH_X86_SSE3)
......
......@@ -806,6 +806,7 @@ HEDLEY_DIAGNOSTIC_POP
# if !HEDLEY_GCC_VERSION_CHECK(11,0,0)
# define SIMDE_BUG_GCC_95483
# endif
# define SIMDE_BUG_GCC_98521
# endif
# if !HEDLEY_GCC_VERSION_CHECK(9,4,0) && defined(SIMDE_ARCH_AARCH64)
# define SIMDE_BUG_GCC_94488
......@@ -844,6 +845,7 @@ HEDLEY_DIAGNOSTIC_POP
# if HEDLEY_HAS_WARNING("-Wvector-conversion") && SIMDE_DETECT_CLANG_VERSION_NOT(11,0,0)
# define SIMDE_BUG_CLANG_44589
# endif
# define SIMDE_BUG_CLANG_48673
# endif
# define SIMDE_BUG_CLANG_45959
# elif defined(HEDLEY_MSVC_VERSION)
......
......@@ -133,6 +133,15 @@
#define SIMDE_X86_SSE4_2_NATIVE
#endif
#if !defined(SIMDE_X86_XOP_NATIVE) && !defined(SIMDE_X86_XOP_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
#if defined(SIMDE_ARCH_X86_XOP)
#define SIMDE_X86_XOP_NATIVE
#endif
#endif
#if defined(SIMDE_X86_XOP_NATIVE) && !defined(SIMDE_X86_SSE4_2_NATIVE)
#define SIMDE_X86_SSE4_2_NATIVE
#endif
#if !defined(SIMDE_X86_SSE4_2_NATIVE) && !defined(SIMDE_X86_SSE4_2_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
#if defined(SIMDE_ARCH_X86_SSE4_2)
#define SIMDE_X86_SSE4_2_NATIVE
......@@ -238,6 +247,14 @@
#include <mmintrin.h>
#endif
#if defined(SIMDE_X86_XOP_NATIVE)
#if defined(_MSC_VER)
#include <intrin.h>
#else
#include <x86intrin.h>
#endif
#endif
#if defined(HEDLEY_MSVC_VERSION)
#pragma warning(pop)
#endif
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment