mirror of https://github.com/PCSX2/pcsx2.git
On Linux, use stdint.h for variable size if possible.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@216 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
23c64e0497
commit
f1782de2f9
|
@ -53,6 +53,25 @@ typedef unsigned __int64 u64;
|
|||
|
||||
#else
|
||||
|
||||
#ifdef __LINUX__
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include "stdint.h"
|
||||
|
||||
typedef int8_t s8;
|
||||
typedef int16_t s16;
|
||||
typedef int32_t s32;
|
||||
typedef int64_t s64;
|
||||
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
typedef uint32_t u32;
|
||||
typedef uint64_t u64;
|
||||
|
||||
typedef uintptr_t uptr;
|
||||
typedef intptr_t sptr;
|
||||
|
||||
#else
|
||||
|
||||
typedef char s8;
|
||||
typedef short s16;
|
||||
typedef int s32;
|
||||
|
@ -62,8 +81,9 @@ typedef unsigned char u8;
|
|||
typedef unsigned short u16;
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned long long u64;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __LINUX__
|
||||
typedef union _LARGE_INTEGER
|
||||
{
|
||||
long long QuadPart;
|
||||
|
@ -85,6 +105,7 @@ typedef union _LARGE_INTEGER
|
|||
|
||||
#endif // _MSC_VER
|
||||
|
||||
#if !defined(__LINUX__) || !defined(HAVE_STDINT_H)
|
||||
#if defined(__x86_64__)
|
||||
typedef u64 uptr;
|
||||
typedef s64 sptr;
|
||||
|
@ -92,6 +113,7 @@ typedef s64 sptr;
|
|||
typedef u32 uptr;
|
||||
typedef s32 sptr;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
|
|
|
@ -509,7 +509,7 @@ int LoadPlugins() {
|
|||
}
|
||||
|
||||
uptr pDsp;
|
||||
static pluginsopened = 0;
|
||||
static int pluginsopened = 0;
|
||||
extern void spu2DMA4Irq();
|
||||
extern void spu2DMA7Irq();
|
||||
extern void spu2Irq();
|
||||
|
|
|
@ -16,7 +16,6 @@ CPPFLAGS=
|
|||
CXXFLAGS=
|
||||
CCASFLAGS=
|
||||
|
||||
|
||||
WARNING_FLAGS="-Wall -Wno-format -Wno-unused-value"
|
||||
NORMAL_FLAGS="-O3 -fomit-frame-pointer ${WARNING_FLAGS}"
|
||||
DEBUG_FLAGS=" -g ${WARNING_FLAGS}"
|
||||
|
|
|
@ -81,12 +81,12 @@ uptr *psxRecLUT;
|
|||
// R3000A statics
|
||||
int psxreclog = 0;
|
||||
|
||||
static char *recMem; // the recompiled blocks will be here
|
||||
static s8 *recMem; // the recompiled blocks will be here
|
||||
static BASEBLOCK *recRAM; // and the ptr to the blocks here
|
||||
static BASEBLOCK *recROM; // and here
|
||||
static BASEBLOCK *recROM1; // also here
|
||||
static BASEBLOCKEX *recBlocks = NULL;
|
||||
static char *recPtr;
|
||||
static s8 *recPtr;
|
||||
u32 psxpc; // recompiler psxpc
|
||||
int psxbranch; // set for branch
|
||||
static EEINST* s_pInstCache = NULL;
|
||||
|
@ -535,7 +535,7 @@ static int recInit() {
|
|||
// can't have upper 4 bits nonzero!
|
||||
startaddr = 0x0f000000;
|
||||
while(!(startaddr & 0xf0000000)) {
|
||||
recMem = (char*)SysMmap(startaddr, RECMEM_SIZE);
|
||||
recMem = (s8*)SysMmap(startaddr, RECMEM_SIZE);
|
||||
if( (uptr)recMem & 0xf0000000 ) {
|
||||
SysMunmap((uptr)recMem, RECMEM_SIZE); recMem = NULL;
|
||||
startaddr += 0x00100000;
|
||||
|
|
|
@ -117,7 +117,7 @@ static const u32 PWaitTimes[] = { 53, 43, 28, 23, 17, 11, 10 };
|
|||
static u32 s_vuInfo; // info passed into rec insts
|
||||
|
||||
static const u32 s_MemSize[2] = {VU0_MEMSIZE, VU1_MEMSIZE};
|
||||
static char* s_recVUMem = NULL, *s_recVUPtr = NULL;
|
||||
static s8* s_recVUMem = NULL, *s_recVUPtr = NULL;
|
||||
|
||||
// tables
|
||||
extern void (*recSVU_UPPER_OPCODE[64])();
|
||||
|
@ -350,7 +350,7 @@ void SuperVUInit(int vuindex)
|
|||
{
|
||||
if( vuindex < 0 ) {
|
||||
// upper 4 bits cannot be nonzero!
|
||||
s_recVUMem = (char*)SysMmap(0x0c000000, VU_EXESIZE);
|
||||
s_recVUMem = (s8*)SysMmap(0x0c000000, VU_EXESIZE);
|
||||
if( (uptr)s_recVUMem > 0x80000000 )
|
||||
SysPrintf("bad SuperVU alloc %x\n", s_recVUMem);
|
||||
memset(s_recVUMem, 0xcd, VU_EXESIZE);
|
||||
|
|
|
@ -207,7 +207,7 @@ _inline void CMOV32MtoR( int cc, int to, uptr from )
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
_inline void x86SetPtr( char* ptr )
|
||||
_inline void x86SetPtr( s8* ptr )
|
||||
{
|
||||
x86Ptr = ptr;
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ extern void write32( u32 val );
|
|||
extern void write64( u64 val );
|
||||
|
||||
|
||||
extern void x86SetPtr( char *ptr );
|
||||
extern void x86SetPtr( s8 *ptr );
|
||||
extern void x86Shutdown( void );
|
||||
|
||||
extern void x86SetJ8( u8 *j8 );
|
||||
|
|
Loading…
Reference in New Issue