pcsx2: use a common general intrin include

Avoid issue with various compiler conversion
Fix build with GCC4.8
This commit is contained in:
Gregory Hainaut 2016-01-11 08:54:54 +01:00
parent 52b4604d3b
commit a6eb871b42
7 changed files with 37 additions and 11 deletions

View File

@ -33,11 +33,6 @@ using x86Emitter::xWrite64;
#define MEMADDR(addr, oplen) (addr) #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 ModRM( uint mod, uint reg, uint rm );
extern void SibSB( uint ss, uint index, uint base ); extern void SibSB( uint ss, uint index, uint base );
extern void SET8R( int cc, int to ); extern void SET8R( int cc, int to );

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
#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

View File

@ -21,7 +21,7 @@
#include "vtlb.h" #include "vtlb.h"
#include <xmmintrin.h> #include "x86emitter/x86_intrin.h"
// [TODO] This *could* be replaced with an assignment operator on u128 that implicitly // [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 -- // uses _mm_store and _mm_load internally. However, there are alignment concerns --

View File

@ -35,7 +35,7 @@
# include <wx/msw/wrapwin.h> # include <wx/msw/wrapwin.h>
#endif #endif
#include <xmmintrin.h> #include "x86emitter/x86_intrin.h"
// -------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------
// SysCoreThread *External Thread* Implementations // SysCoreThread *External Thread* Implementations

View File

@ -15,7 +15,7 @@
#include "PrecompiledHeader.h" #include "PrecompiledHeader.h"
#include <xmmintrin.h> #include "x86emitter/x86_intrin.h"
SSE_MXCSR g_sseMXCSR = { DEFAULT_sseMXCSR }; SSE_MXCSR g_sseMXCSR = { DEFAULT_sseMXCSR };
SSE_MXCSR g_sseVUMXCSR = { DEFAULT_sseVUMXCSR }; SSE_MXCSR g_sseVUMXCSR = { DEFAULT_sseVUMXCSR };

View File

@ -13,7 +13,7 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "xmmintrin.h" #include "x86emitter/x86_intrin.h"
#pragma once #pragma once
// Create some typecast operators for SIMD operations. For some reason MSVC needs a // Create some typecast operators for SIMD operations. For some reason MSVC needs a

View File

@ -19,8 +19,7 @@
#include "Vif_Dma.h" #include "Vif_Dma.h"
#include "newVif.h" #include "newVif.h"
#include <xmmintrin.h> #include "x86emitter/x86_intrin.h"
#include <emmintrin.h>
using namespace x86Emitter; using namespace x86Emitter;