mirror of https://github.com/PCSX2/pcsx2.git
On Linux, when we say _forceinline, actually force it to inline.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@261 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
2e5ba07383
commit
a6a2676cc9
|
@ -310,9 +310,11 @@ typedef struct tagDMACh{
|
|||
|
||||
#ifdef _WIN32
|
||||
extern PSMEMORYMAP* memLUT;
|
||||
#endif
|
||||
|
||||
extern __forceinline u8* dmaGetAddr(u32 mem)
|
||||
#else
|
||||
static __forceinline u8* dmaGetAddr(u32 mem)
|
||||
#endif
|
||||
{
|
||||
u8* p, *pbase;
|
||||
mem &= ~0xf;
|
||||
|
@ -345,7 +347,12 @@ extern __forceinline u8* dmaGetAddr(u32 mem)
|
|||
extern u8 *psS; //0.015 mb, scratch pad
|
||||
extern uptr *memLUTR;
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
extern __forceinline void *dmaGetAddr(u32 addr) {
|
||||
#else
|
||||
static __forceinline void *dmaGetAddr(u32 addr) {
|
||||
#endif
|
||||
u8 *ptr;
|
||||
|
||||
/*#ifdef DMA_LOG
|
||||
|
|
26
pcsx2/Misc.h
26
pcsx2/Misc.h
|
@ -23,6 +23,8 @@
|
|||
#include <malloc.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "PS2Etypes.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
@ -157,7 +159,11 @@ BOOL Save_Patch_Proc( char * filename );
|
|||
|
||||
#include <sys/timeb.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
extern __forceinline u32 timeGetTime()
|
||||
#else
|
||||
static __forceinline u32 timeGetTime()
|
||||
#endif
|
||||
{
|
||||
struct timeb t;
|
||||
ftime(&t);
|
||||
|
@ -268,7 +274,7 @@ void injectIRX(char *filename);
|
|||
#if !defined(_MSC_VER) && !defined(HAVE_ALIGNED_MALLOC)
|
||||
|
||||
// declare linux equivalents
|
||||
extern __forceinline void* pcsx2_aligned_malloc(size_t size, size_t align)
|
||||
static __forceinline void* pcsx2_aligned_malloc(size_t size, size_t align)
|
||||
{
|
||||
assert( align < 0x10000 );
|
||||
char* p = (char*)malloc(size+align);
|
||||
|
@ -280,7 +286,7 @@ extern __forceinline void* pcsx2_aligned_malloc(size_t size, size_t align)
|
|||
return p;
|
||||
}
|
||||
|
||||
extern __forceinline void pcsx2_aligned_free(void* pmem)
|
||||
static __forceinline void pcsx2_aligned_free(void* pmem)
|
||||
{
|
||||
if( pmem != NULL ) {
|
||||
char* p = (char*)pmem;
|
||||
|
@ -291,6 +297,9 @@ extern __forceinline void pcsx2_aligned_free(void* pmem)
|
|||
#define _aligned_malloc pcsx2_aligned_malloc
|
||||
#define _aligned_free pcsx2_aligned_free
|
||||
|
||||
// This might work, too; I'll have to test the two, and see if it makes a difference.
|
||||
//#define _aligned_malloc(size,align) memalign(align, size)
|
||||
//#define _aligned_free free
|
||||
#endif
|
||||
|
||||
// cross-platform atomic operations
|
||||
|
@ -325,8 +334,11 @@ typedef void* PVOID;
|
|||
return __test_and_set(__p, (unsigned long)__q);
|
||||
# endif
|
||||
}*/
|
||||
|
||||
#ifdef _WIN32
|
||||
extern __forceinline void InterlockedExchangePointer(PVOID volatile* Target, void* Value)
|
||||
#else
|
||||
static __forceinline void InterlockedExchangePointer(PVOID volatile* Target, void* Value)
|
||||
#endif
|
||||
{
|
||||
#ifdef __x86_64__
|
||||
__asm__ __volatile__(".intel_syntax\n"
|
||||
|
@ -339,7 +351,11 @@ extern __forceinline void InterlockedExchangePointer(PVOID volatile* Target, voi
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
extern __forceinline long InterlockedExchange(long volatile* Target, long Value)
|
||||
#else
|
||||
static __forceinline long InterlockedExchange(long volatile* Target, long Value)
|
||||
#endif
|
||||
{
|
||||
__asm__ __volatile__(".intel_syntax\n"
|
||||
"lock xchg [%0], %%eax\n"
|
||||
|
@ -347,7 +363,11 @@ extern __forceinline long InterlockedExchange(long volatile* Target, long Value)
|
|||
return 0; // The only function that even looks at this is a debugging function
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
extern __forceinline long InterlockedExchangeAdd(long volatile* Addend, long Value)
|
||||
#else
|
||||
static __forceinline long InterlockedExchangeAdd(long volatile* Addend, long Value)
|
||||
#endif
|
||||
{
|
||||
__asm__ __volatile__(".intel_syntax\n"
|
||||
"lock xadd [%0], %%eax\n"
|
||||
|
|
|
@ -88,7 +88,7 @@ typedef union _LARGE_INTEGER
|
|||
{
|
||||
long long QuadPart;
|
||||
} LARGE_INTEGER;
|
||||
#define _inline __inline__
|
||||
#define _inline __inline__ __attribute__((unused))
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
|
@ -100,7 +100,7 @@ typedef union _LARGE_INTEGER
|
|||
#define PCSX2_ALIGNED16_DECL(x) x
|
||||
|
||||
#ifndef __forceinline
|
||||
#define __forceinline inline
|
||||
#define __forceinline __attribute__((always_inline,unused))
|
||||
#endif
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
|
|
@ -168,7 +168,12 @@ extern PCSX2_ALIGNED16_DECL(VURegs VU0);
|
|||
|
||||
#define VU1 (*g_pVU1)
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
extern __forceinline u32* GET_VU_MEM(VURegs* VU, u32 addr)
|
||||
#else
|
||||
static __forceinline u32* GET_VU_MEM(VURegs* VU, u32 addr)
|
||||
#endif
|
||||
{
|
||||
if( VU == g_pVU1 ) return (u32*)(VU1.Mem+(addr&0x3fff));
|
||||
|
||||
|
|
|
@ -40,19 +40,7 @@ make clean
|
|||
make install
|
||||
|
||||
else
|
||||
|
||||
make $@
|
||||
|
||||
#if [ $? -ne 0 ]
|
||||
#then
|
||||
#exit 1
|
||||
#fi
|
||||
|
||||
#if [ $# -eq 0 ] || [ $1 != "clean" ]
|
||||
#then
|
||||
#make install
|
||||
#fi
|
||||
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
|
|
|
@ -28,16 +28,16 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [debug build]),
|
|||
if test "x$debug" == xyes
|
||||
then
|
||||
AC_DEFINE(_DEBUG,1,[_DEBUG])
|
||||
CFLAGS+="${DEBUG_FLAGS}"
|
||||
CPPFLAGS+="${DEBUG_FLAGS}"
|
||||
CXXFLAGS+="${DEBUG_FLAGS}"
|
||||
CCASFLAGS+=" -D_DEBUG ${DEBUG_FLAGS}"
|
||||
CFLAGS+=" ${DEBUG_FLAGS}"
|
||||
CPPFLAGS+=" ${DEBUG_FLAGS}"
|
||||
CXXFLAGS+=" ${DEBUG_FLAGS}"
|
||||
CCASFLAGS+="-D_DEBUG ${DEBUG_FLAGS}"
|
||||
MYOBJDIR="Debug"
|
||||
else
|
||||
AC_DEFINE(NDEBUG,1,[NDEBUG])
|
||||
CFLAGS+="${NORMAL_FLAGS}"
|
||||
CPPFLAGS+="${NORMAL_FLAGS}"
|
||||
CXXFLAGS+="${NORMAL_FLAGS}"
|
||||
CFLAGS+=" ${NORMAL_FLAGS}"
|
||||
CPPFLAGS+=" ${NORMAL_FLAGS}"
|
||||
CXXFLAGS+=" ${NORMAL_FLAGS}"
|
||||
MYOBJDIR="Release"
|
||||
fi
|
||||
AC_MSG_RESULT($debug)
|
||||
|
|
Loading…
Reference in New Issue