Files
ARMSX2/common/VectorIntrin.h
T

49 lines
931 B
C
Raw Normal View History

// SPDX-FileCopyrightText: 2002-2026 PCSX2 Dev Team
2024-07-30 13:42:36 +02:00
// SPDX-License-Identifier: GPL-3.0+
// Includes appropriate intrinsic header based on platform.
#pragma once
2026-03-10 23:40:32 -05:00
#include "common/Pcsx2Defs.h"
#if defined(ARCH_X86)
2024-03-21 16:43:50 +10:00
#ifdef _MSC_VER
#include <intrin.h>
#endif
#if defined(__AVX2__)
#define _M_SSE 0x501
#elif defined(__AVX__)
#define _M_SSE 0x500
#elif defined(__SSE4_1__)
#define _M_SSE 0x401
#else
#error PCSX2 requires compiling for at least SSE 4.1
#endif
// Starting with AVX, processors have fast unaligned loads
// Reduce code duplication by not compiling multiple versions
#if _M_SSE >= 0x500
#define FAST_UNALIGNED 1
#else
#define FAST_UNALIGNED 0
#endif
#include <xmmintrin.h>
#include <emmintrin.h>
#include <tmmintrin.h>
#include <smmintrin.h>
#include <immintrin.h>
2026-03-10 23:40:32 -05:00
#elif defined(ARCH_ARM64)
#include <arm_neon.h>
#endif
#ifdef __APPLE__
#include <stdlib.h> // alloca
#else
#include <malloc.h> // alloca
#endif