diff --git a/common/include/x86emitter/legacy_internal.h b/common/include/x86emitter/legacy_internal.h index 027d497b4a..a881520920 100644 --- a/common/include/x86emitter/legacy_internal.h +++ b/common/include/x86emitter/legacy_internal.h @@ -33,11 +33,6 @@ using x86Emitter::xWrite64; #define MEMADDR(addr, oplen) (addr) -// Recent GCC define the macro in x86intrin.h -#ifndef _MM_MK_INSERTPS_NDX -#define _MM_MK_INSERTPS_NDX(srcField, dstField, zeroMask) (((srcField)<<6) | ((dstField)<<4) | (zeroMask)) -#endif - extern void ModRM( uint mod, uint reg, uint rm ); extern void SibSB( uint ss, uint index, uint base ); extern void SET8R( int cc, int to ); diff --git a/common/include/x86emitter/x86_intrin.h b/common/include/x86emitter/x86_intrin.h new file mode 100644 index 0000000000..199ead3b97 --- /dev/null +++ b/common/include/x86emitter/x86_intrin.h @@ -0,0 +1,32 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2016 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + +#pragma once + +// Because nobody can't agree on a single name ! +#if defined(__GNUG__) + +#include "x86intrin.h" + +#else + +#include "Intrin.h" + +#endif + +// Not correctly defined in GCC4.8 and below ! (dunno for VS) +#ifndef _MM_MK_INSERTPS_NDX +#define _MM_MK_INSERTPS_NDX(srcField, dstField, zeroMask) (((srcField)<<6) | ((dstField)<<4) | (zeroMask)) +#endif diff --git a/pcsx2/Memory.h b/pcsx2/Memory.h index 86507e03f3..94879ac7fc 100644 --- a/pcsx2/Memory.h +++ b/pcsx2/Memory.h @@ -21,7 +21,7 @@ #include "vtlb.h" -#include +#include "x86emitter/x86_intrin.h" // [TODO] This *could* be replaced with an assignment operator on u128 that implicitly // uses _mm_store and _mm_load internally. However, there are alignment concerns -- diff --git a/pcsx2/System/SysCoreThread.cpp b/pcsx2/System/SysCoreThread.cpp index fa2cd2da02..a9b9c9a840 100644 --- a/pcsx2/System/SysCoreThread.cpp +++ b/pcsx2/System/SysCoreThread.cpp @@ -35,7 +35,7 @@ # include #endif -#include +#include "x86emitter/x86_intrin.h" // -------------------------------------------------------------------------------------- // SysCoreThread *External Thread* Implementations diff --git a/pcsx2/x86/iMisc.cpp b/pcsx2/x86/iMisc.cpp index 361afa4629..bd48e8f372 100644 --- a/pcsx2/x86/iMisc.cpp +++ b/pcsx2/x86/iMisc.cpp @@ -15,7 +15,7 @@ #include "PrecompiledHeader.h" -#include +#include "x86emitter/x86_intrin.h" SSE_MXCSR g_sseMXCSR = { DEFAULT_sseMXCSR }; SSE_MXCSR g_sseVUMXCSR = { DEFAULT_sseVUMXCSR }; diff --git a/pcsx2/x86/newVif_HashBucket.h b/pcsx2/x86/newVif_HashBucket.h index 1253ff54aa..d1379fad8d 100644 --- a/pcsx2/x86/newVif_HashBucket.h +++ b/pcsx2/x86/newVif_HashBucket.h @@ -13,7 +13,7 @@ * If not, see . */ -#include "xmmintrin.h" +#include "x86emitter/x86_intrin.h" #pragma once // Create some typecast operators for SIMD operations. For some reason MSVC needs a diff --git a/pcsx2/x86/newVif_UnpackSSE.h b/pcsx2/x86/newVif_UnpackSSE.h index c9197d6b8e..a429751a13 100644 --- a/pcsx2/x86/newVif_UnpackSSE.h +++ b/pcsx2/x86/newVif_UnpackSSE.h @@ -19,8 +19,7 @@ #include "Vif_Dma.h" #include "newVif.h" -#include -#include +#include "x86emitter/x86_intrin.h" using namespace x86Emitter;