From ac8df6591a042767e45488c8e7b0398726362511 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 20 Mar 2026 17:52:28 -0500 Subject: [PATCH] Add support for powerpc64le systems This requires POWER ISA 3.0 or higher Older ISA variants lack current deployment and required features Big endian systems are NOT supported Signed-off-by: Timothy Pearson --- Inc/DirectXMath.h | 4 ++-- Inc/DirectXMathMisc.inl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Inc/DirectXMath.h b/Inc/DirectXMath.h index 6228e7d..a73d79f 100644 --- a/Inc/DirectXMath.h +++ b/Inc/DirectXMath.h @@ -82,7 +82,7 @@ #endif #if !defined(_XM_ARM_NEON_INTRINSICS_) && !defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) -#if (defined(_M_IX86) || defined(_M_X64) || __i386__ || __x86_64__) && !defined(_M_HYBRID_X86_ARM64) && !defined(_M_ARM64EC) +#if (defined(_M_IX86) || defined(_M_X64) || __i386__ || __x86_64__ || __powerpc64__) && !defined(_M_HYBRID_X86_ARM64) && !defined(_M_ARM64EC) #define _XM_SSE_INTRINSICS_ #elif defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #define _XM_ARM_NEON_INTRINSICS_ @@ -213,7 +213,7 @@ #define XM_PERMUTE_PS( v, c ) _mm_shuffle_ps((v), (v), c ) #endif -#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 11) +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 11)) || defined(__powerpc64__) #define XM_LOADU_SI16( p ) _mm_cvtsi32_si128(*reinterpret_cast(p)) #else #define XM_LOADU_SI16( p ) _mm_loadu_si16(p) diff --git a/Inc/DirectXMathMisc.inl b/Inc/DirectXMathMisc.inl index 7a21dc8..10983bb 100644 --- a/Inc/DirectXMathMisc.inl +++ b/Inc/DirectXMathMisc.inl @@ -1971,7 +1971,7 @@ inline XMVECTOR XM_CALLCONV XMColorSRGBToRGB(FXMVECTOR srgb) noexcept inline bool XMVerifyCPUSupport() noexcept { -#if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) +#if defined(_XM_SSE_INTRINSICS_) && !defined(__powerpc64__) && !defined(_XM_NO_INTRINSICS_) int CPUInfo[4] = { -1 }; #if (defined(__clang__) || defined(__GNUC__)) && defined(__cpuid) __cpuid(0, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]);