mirror of https://github.com/PCSX2/pcsx2.git
Fix up Linux after r1356. Make a few changes that ought to make -fpermissive unneccessary, though it needs more testing before I actually remove said flag.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1358 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
6841f7fd98
commit
1c3a537d5c
|
@ -618,7 +618,7 @@ u32 psxHwRead32(u32 add) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// A buffer that stores messages until it gets a /n or the number of chars (g_pbufi) is more then 1023.
|
// A buffer that stores messages until it gets a /n or the number of chars (g_pbufi) is more then 1023.
|
||||||
static s8 g_pbuf[1024];
|
static char g_pbuf[1024];
|
||||||
static int g_pbufi;
|
static int g_pbufi;
|
||||||
void psxHwWrite8(u32 add, u8 value) {
|
void psxHwWrite8(u32 add, u8 value) {
|
||||||
if (add >= HW_USB_START && add < HW_USB_END) {
|
if (add >= HW_USB_START && add < HW_USB_END) {
|
||||||
|
|
|
@ -134,7 +134,7 @@ void OnConfConf_Ok(GtkButton *button, gpointer user_data)
|
||||||
plugin_types type;
|
plugin_types type;
|
||||||
applychanges = TRUE;
|
applychanges = TRUE;
|
||||||
|
|
||||||
for (type = GS; type <= BIOS; type = type + 1)
|
for (type = GS; type <= BIOS; type = (plugin_types)((int)type + 1))
|
||||||
{
|
{
|
||||||
PluginConf *confs = ConfS(type);
|
PluginConf *confs = ConfS(type);
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ void UpdateConfDlg()
|
||||||
plugin_types type;
|
plugin_types type;
|
||||||
FindPlugins();
|
FindPlugins();
|
||||||
|
|
||||||
for (type = GS; type <= BIOS; type = type + 1)
|
for (type = GS; type <= BIOS; type = (plugin_types)((int)type + 1))
|
||||||
{
|
{
|
||||||
char tmp[50];
|
char tmp[50];
|
||||||
PluginConf *confs = ConfS(type);
|
PluginConf *confs = ConfS(type);
|
||||||
|
@ -274,7 +274,7 @@ void FindPlugins()
|
||||||
char plugin[g_MaxPath], name[g_MaxPath];
|
char plugin[g_MaxPath], name[g_MaxPath];
|
||||||
plugin_types type;
|
plugin_types type;
|
||||||
|
|
||||||
for (type = GS; type <= BIOS; type = type + 1)
|
for (type = GS; type <= BIOS; type = (plugin_types)((int)type + 1))
|
||||||
{
|
{
|
||||||
PluginConf *confs = ConfS(type);
|
PluginConf *confs = ConfS(type);
|
||||||
|
|
||||||
|
|
|
@ -927,9 +927,9 @@ void mmap_ClearCpuBlock( uint offset )
|
||||||
// manual protection. Indicates a logic error in the recompiler or protection code.
|
// manual protection. Indicates a logic error in the recompiler or protection code.
|
||||||
jASSUME( m_PageProtectInfo[rampage].Mode != ProtMode_Manual );
|
jASSUME( m_PageProtectInfo[rampage].Mode != ProtMode_Manual );
|
||||||
|
|
||||||
#ifndef __LINUX__ // this function is called from the signal handler
|
//#ifndef __LINUX__ // this function is called from the signal handler
|
||||||
DbgCon::WriteLn( "Manual page @ 0x%05x", params m_PageProtectInfo[rampage].ReverseRamMap>>12 );
|
//DbgCon::WriteLn( "Manual page @ 0x%05x", params m_PageProtectInfo[rampage].ReverseRamMap>>12 );
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
HostSys::MemProtect( &psM[rampage<<12], 1, Protect_ReadWrite );
|
HostSys::MemProtect( &psM[rampage<<12], 1, Protect_ReadWrite );
|
||||||
m_PageProtectInfo[rampage].Mode = ProtMode_Manual;
|
m_PageProtectInfo[rampage].Mode = ProtMode_Manual;
|
||||||
|
|
|
@ -324,17 +324,17 @@ vtlbHandler vtlb_RegisterHandler( vtlbMemR8FP* r8,vtlbMemR16FP* r16,vtlbMemR32FP
|
||||||
//write the code :p
|
//write the code :p
|
||||||
vtlbHandler rv=vtlbHandlerCount++;
|
vtlbHandler rv=vtlbHandlerCount++;
|
||||||
|
|
||||||
vtlbdata.RWFT[0][0][rv] = (r8!=0) ? r8:vtlbDefaultPhyRead8;
|
vtlbdata.RWFT[0][0][rv] = (r8!=0) ? (void*)(r8): (void*)vtlbDefaultPhyRead8;
|
||||||
vtlbdata.RWFT[1][0][rv] = (r16!=0) ? r16:vtlbDefaultPhyRead16;
|
vtlbdata.RWFT[1][0][rv] = (r16!=0) ? (void*)r16: (void*)vtlbDefaultPhyRead16;
|
||||||
vtlbdata.RWFT[2][0][rv] = (r32!=0) ? r32:vtlbDefaultPhyRead32;
|
vtlbdata.RWFT[2][0][rv] = (r32!=0) ? (void*)r32: (void*)vtlbDefaultPhyRead32;
|
||||||
vtlbdata.RWFT[3][0][rv] = (r64!=0) ? r64:vtlbDefaultPhyRead64;
|
vtlbdata.RWFT[3][0][rv] = (r64!=0) ? (void*)r64: (void*)vtlbDefaultPhyRead64;
|
||||||
vtlbdata.RWFT[4][0][rv] = (r128!=0) ? r128:vtlbDefaultPhyRead128;
|
vtlbdata.RWFT[4][0][rv] = (r128!=0) ? (void*)r128: (void*)vtlbDefaultPhyRead128;
|
||||||
|
|
||||||
vtlbdata.RWFT[0][1][rv] = (w8!=0) ? w8:vtlbDefaultPhyWrite8;
|
vtlbdata.RWFT[0][1][rv] = (w8!=0) ? (void*)w8: (void*)vtlbDefaultPhyWrite8;
|
||||||
vtlbdata.RWFT[1][1][rv] = (w16!=0) ? w16:vtlbDefaultPhyWrite16;
|
vtlbdata.RWFT[1][1][rv] = (w16!=0) ? (void*)w16: (void*)vtlbDefaultPhyWrite16;
|
||||||
vtlbdata.RWFT[2][1][rv] = (w32!=0) ? w32:vtlbDefaultPhyWrite32;
|
vtlbdata.RWFT[2][1][rv] = (w32!=0) ? (void*)w32: (void*)vtlbDefaultPhyWrite32;
|
||||||
vtlbdata.RWFT[3][1][rv] = (w64!=0) ? w64:vtlbDefaultPhyWrite64;
|
vtlbdata.RWFT[3][1][rv] = (w64!=0) ? (void*)w64: (void*)vtlbDefaultPhyWrite64;
|
||||||
vtlbdata.RWFT[4][1][rv] = (w128!=0) ? w128:vtlbDefaultPhyWrite128;
|
vtlbdata.RWFT[4][1][rv] = (w128!=0) ? (void*)w128: (void*)vtlbDefaultPhyWrite128;
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,19 +18,19 @@ ix86-32/iR5900Shift.cpp ix86-32/iR5900Arit.cpp ix86-32/iR5900Branch.cpp ix86-32
|
||||||
ix86-32/iR5900MultDiv.cpp ix86-32/iCore-32.cpp ix86-32/aR5900-32.S ix86-32/iR5900Templates.cpp ix86-32/recVTLB.cpp
|
ix86-32/iR5900MultDiv.cpp ix86-32/iCore-32.cpp ix86-32/aR5900-32.S ix86-32/iR5900Templates.cpp ix86-32/recVTLB.cpp
|
||||||
|
|
||||||
libx86recomp_a_SOURCES = \
|
libx86recomp_a_SOURCES = \
|
||||||
BaseblockEx.cpp iCOP0.cpp iCOP2.cpp iCore.cpp iFPU.cpp iFPUd.cpp iMMI.cpp iPsxMem.cpp iR3000A.cpp iR3000Atables.cpp \
|
BaseblockEx.cpp iCOP2.cpp iFPUd.cpp iR3000A.cpp iVU0micro.cpp ir5900tables.cpp sVU_Micro.cpp \
|
||||||
iR5900Misc.cpp iVU0micro.cpp iVU1micro.cpp iVUmicro.cpp iVUmicroLower.cpp iVUmicroUpper.cpp iVUzerorec.cpp iVif.cpp \
|
iCore.cpp iMMI.cpp iR3000Atables.cpp iVU1micro.cpp microVU.cpp sVU_Upper.cpp \
|
||||||
ir5900tables.cpp fast_routines.S aR3000A.S aVUzerorec.S aVif.S $(archfiles)
|
iCOP0.cpp iFPU.cpp iPsxMem.cpp iR5900Misc.cpp iVif.cpp sVU_Lower.cpp sVU_zerorec.cpp \
|
||||||
|
aR3000A.S aVUzerorec.S aVif.S fast_routines.S $(archfiles)
|
||||||
|
|
||||||
libx86recomp_a_SOURCES += \
|
libx86recomp_a_SOURCES += \
|
||||||
BaseblockEx.h iCOP0.h iCore.h iFPU.h iMMI.h iR3000A.h iR5900.h iR5900Arit.h iR5900AritImm.h iR5900Branch.h iR5900Jump.h \
|
microVU_Alloc.inl microVU_Compile.inl microVU_Flags.inl microVU_Lower.inl microVU_Tables.inl \
|
||||||
iR5900LoadStore.h iR5900Move.h iR5900MultDiv.h iR5900Shift.h iVUmicro.h iVUops.h iVUzerorec.h
|
microVU_Analyze.inl microVU_Execute.inl microVU_Log.inl microVU_Misc.inl microVU_Upper.inl
|
||||||
|
|
||||||
# Only active if PCSX2_MICROVU is defined.
|
|
||||||
libx86recomp_a_SOURCES += \
|
libx86recomp_a_SOURCES += \
|
||||||
microVU.cpp microVU_Misc.inl microVU_Log.inl microVU_Analyze.inl microVU_Alloc.inl microVU_Upper.inl microVU_Lower.inl \
|
BaseblockEx.h iFPU.h iR5900.h iR5900Branch.h iR5900Move.h microVU.h sVU_Debug.h \
|
||||||
microVU_Tables.inl microVU_Flags.inl microVU_Compile.inl microVU_Execute.inl \
|
iCOP0.h iMMI.h iR5900Arit.h iR5900Jump.h iR5900MultDiv.h microVU_IR.h sVU_Micro.h \
|
||||||
microVU.h microVU_Alloc.h microVU_Misc.h
|
iCore.h iR3000A.h iR5900AritImm.h iR5900LoadStore.h iR5900Shift.h microVU_Misc.h sVU_zerorec.h
|
||||||
|
|
||||||
|
|
||||||
libx86recomp_a_DEPENDENCIES = ix86/libix86.a
|
libx86recomp_a_DEPENDENCIES = ix86/libix86.a
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
// microVU.cpp assembly routines
|
|
||||||
// arcum42(@gmail.com)
|
|
||||||
.intel_syntax noprefix
|
|
||||||
|
|
||||||
.extern mVUexecuteVU0
|
|
||||||
.extern mVUexecuteVU1
|
|
||||||
.extern g_sseVUMXCSR
|
|
||||||
.extern g_sseMXCSR
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
// Dispatcher Functions
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
|
|
||||||
// Runs VU0 for number of cycles
|
|
||||||
// __fastcall = The first two DWORD or smaller arguments are passed in ECX and EDX registers; all other arguments are passed right to left.
|
|
||||||
//void __fastcall startVU0(u32 startPC, u32 cycles)
|
|
||||||
.globl startVU0
|
|
||||||
startVU0:
|
|
||||||
call mVUexecuteVU0
|
|
||||||
|
|
||||||
// backup cpu state
|
|
||||||
push ebx
|
|
||||||
push ebp
|
|
||||||
push esi
|
|
||||||
push edi
|
|
||||||
|
|
||||||
ldmxcsr g_sseVUMXCSR
|
|
||||||
// Should set xmmZ?
|
|
||||||
jmp eax
|
|
||||||
|
|
||||||
// Runs VU1 for number of cycles
|
|
||||||
// void __fastcall startVU1(u32 startPC, u32 cycles)
|
|
||||||
.globl startVU1
|
|
||||||
startVU01:
|
|
||||||
call mVUexecuteVU1
|
|
||||||
|
|
||||||
// backup cpu state
|
|
||||||
push ebx
|
|
||||||
push ebp
|
|
||||||
push esi
|
|
||||||
push edi
|
|
||||||
|
|
||||||
ldmxcsr g_sseVUMXCSR
|
|
||||||
|
|
||||||
jmp eax
|
|
||||||
|
|
||||||
// Exit point
|
|
||||||
// void __fastcall endVU0(u32 startPC, u32 cycles)
|
|
||||||
.globl endVU0
|
|
||||||
endVU0:
|
|
||||||
//call mVUcleanUpVU0
|
|
||||||
|
|
||||||
/*restore cpu state*/
|
|
||||||
pop edi;
|
|
||||||
pop esi;
|
|
||||||
pop ebp;
|
|
||||||
pop ebx;
|
|
||||||
|
|
||||||
ldmxcsr g_sseMXCSR
|
|
||||||
|
|
||||||
ret
|
|
||||||
|
|
|
@ -162,7 +162,10 @@ declareAllVariables
|
||||||
#define pass4 if (recPass == 3)
|
#define pass4 if (recPass == 3)
|
||||||
|
|
||||||
// Define mVUquickSearch
|
// Define mVUquickSearch
|
||||||
|
#ifndef __LINUX__
|
||||||
extern u8 mVUsearchXMM[0x1000];
|
extern u8 mVUsearchXMM[0x1000];
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef u32 (__fastcall *mVUCall)(void*, void*);
|
typedef u32 (__fastcall *mVUCall)(void*, void*);
|
||||||
#ifndef __LINUX__
|
#ifndef __LINUX__
|
||||||
#define mVUquickSearch(dest, src, size) ((((mVUCall)((void*)mVUsearchXMM))(dest, src)) == 0xf)
|
#define mVUquickSearch(dest, src, size) ((((mVUCall)((void*)mVUsearchXMM))(dest, src)) == 0xf)
|
||||||
|
@ -172,6 +175,7 @@ typedef u32 (__fastcall *mVUCall)(void*, void*);
|
||||||
#else
|
#else
|
||||||
//#define mVUquickSearch(dest, src, size) (!memcmp(dest, src, size))
|
//#define mVUquickSearch(dest, src, size) (!memcmp(dest, src, size))
|
||||||
#define mVUquickSearch(dest, src, size) (!memcmp_mmx(dest, src, size))
|
#define mVUquickSearch(dest, src, size) (!memcmp_mmx(dest, src, size))
|
||||||
|
#define mVUemitSearch()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Misc Macros...
|
// Misc Macros...
|
||||||
|
|
|
@ -438,6 +438,7 @@ void SSE_ADD2PS_XMM_to_XMM(x86SSERegType to, x86SSERegType from) {
|
||||||
// Micro VU - Custom Quick Search
|
// Micro VU - Custom Quick Search
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef __LINUX__
|
||||||
PCSX2_ALIGNED(0x1000, static u8 mVUsearchXMM[0x1000]);
|
PCSX2_ALIGNED(0x1000, static u8 mVUsearchXMM[0x1000]);
|
||||||
|
|
||||||
// Generates a custom optimized block-search function (Note: Structs must be 16-byte aligned!)
|
// Generates a custom optimized block-search function (Note: Structs must be 16-byte aligned!)
|
||||||
|
@ -490,3 +491,4 @@ void mVUemitSearch() {
|
||||||
xRET();
|
xRET();
|
||||||
HostSys::MemProtect(mVUsearchXMM, 0x1000, Protect_ReadOnly, true );
|
HostSys::MemProtect(mVUsearchXMM, 0x1000, Protect_ReadOnly, true );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue