mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Add MIPS/Loongson support
This commit is contained in:
parent
25684e18d6
commit
27b70f0726
5 changed files with 17 additions and 8 deletions
|
@ -16,6 +16,10 @@ if(BLACKBERRY)
|
|||
set(ARM ON)
|
||||
endif()
|
||||
|
||||
if(LOONGSON)
|
||||
set(MIPS ON) # MIPS + x86 for now
|
||||
endif()
|
||||
|
||||
if(ARM)
|
||||
set(USING_GLES2 ON)
|
||||
else() # Assume x86
|
||||
|
@ -30,6 +34,7 @@ endif()
|
|||
|
||||
# User-editable options (go into CMakeCache.txt)
|
||||
option(ARM "Set to ON if targeting an ARM processor" ${ARM})
|
||||
option(MIPS "Set to ON if targeting a MIPS processor" ${MIPS})
|
||||
option(X86 "Set to ON if targeting an X86 processor" ${X86})
|
||||
option(ANDROID "Set to ON if targeting an Android device" ${ANDROID})
|
||||
option(BLACKBERRY "Set to ON if targeting a Blackberry device" ${BLACKBERRY})
|
||||
|
@ -105,6 +110,10 @@ if(USING_GLES2)
|
|||
add_definitions(-DUSING_GLES2)
|
||||
endif()
|
||||
|
||||
if(MIPS)
|
||||
add_definitions(-DMIPS)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_NDEBUG")
|
||||
|
||||
|
@ -127,7 +136,7 @@ if(NOT MSVC)
|
|||
add_definitions(-D_QNX_SOURCE=1 -D_C99=1)
|
||||
endif()
|
||||
|
||||
if(X86)
|
||||
if(X86 AND NOT MIPS)
|
||||
# enable sse2 code generation
|
||||
add_definitions(-msse2)
|
||||
endif()
|
||||
|
|
|
@ -29,14 +29,14 @@
|
|||
#undef _interlockedbittestandreset64
|
||||
#else
|
||||
|
||||
#ifndef _M_GENERIC
|
||||
#if !defined(_M_GENERIC) && !defined(MIPS)
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
|
||||
#if defined __FreeBSD__
|
||||
#include <sys/types.h>
|
||||
#include <machine/cpufunc.h>
|
||||
#else
|
||||
#elif !defined(MIPS)
|
||||
static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,
|
||||
unsigned int *ecx, unsigned int *edx)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define SLEEP(x) usleep(x*1000)
|
||||
#endif
|
||||
|
||||
#ifdef IOS
|
||||
#if defined(IOS) || defined(MIPS)
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
|
@ -51,8 +51,8 @@ template<> struct CompileTimeAssert<true> {};
|
|||
#ifdef GEKKO
|
||||
#define Crash()
|
||||
#else
|
||||
// Assume !ARM = x86
|
||||
#if !defined(ARM)
|
||||
// Assume !ARM && !MIPS = x86
|
||||
#if !defined(ARM) && !defined(MIPS)
|
||||
#define Crash() {asm ("int $3");}
|
||||
#else
|
||||
#define Crash() {kill( getpid(), SIGINT ) ; }
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "Common.h"
|
||||
|
||||
#ifndef ARM
|
||||
#if !defined(ARM) && !defined(MIPS)
|
||||
#define USE_SSE
|
||||
#endif
|
||||
|
||||
|
|
2
native
2
native
|
@ -1 +1 @@
|
|||
Subproject commit 7bc8374c8816efe0fab4a9cd5959ca2d2fcd09d8
|
||||
Subproject commit b8100e023858a9b2a217ac7f38cb78cca983b952
|
Loading…
Add table
Reference in a new issue