From bddfd67bae804b69653d8c4445f54b3f62280fcd Mon Sep 17 00:00:00 2001 From: arcum42 Date: Thu, 14 May 2009 21:50:03 +0000 Subject: [PATCH] Minor tweaks here and there. Removes a couple compiler warnings, adds in a -m32 flag I missed, and updates the Makefile a bit. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1183 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/HwWrite.cpp | 2 +- pcsx2/Linux/ConfigDlg.cpp | 8 ++++---- pcsx2/Linux/ConfigDlg.h | 4 ++-- pcsx2/x86/Makefile.am | 15 ++++++++------- pcsx2/x86/iR3000A.cpp | 13 +++++++------ pcsx2/x86/ix86-32/iR5900LoadStore.cpp | 7 ++++--- pcsx2/x86/ix86-32/recVTLB.cpp | 2 +- pcsx2/x86/microVU.h | 5 +---- plugins/PeopsSPU2/Makefile | 4 ++-- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/pcsx2/HwWrite.cpp b/pcsx2/HwWrite.cpp index fc978a6f67..b9a346bd95 100644 --- a/pcsx2/HwWrite.cpp +++ b/pcsx2/HwWrite.cpp @@ -169,7 +169,7 @@ void hwWrite8(u32 mem, u8 value) { case 0x1000f180: { - bool flush = false; + //bool flush = false; // Terminate lines on CR or full buffers, and ignore \n's if the string contents // are empty (otherwise terminate on \n too!) diff --git a/pcsx2/Linux/ConfigDlg.cpp b/pcsx2/Linux/ConfigDlg.cpp index 8ba14b1a08..f37a141cc3 100644 --- a/pcsx2/Linux/ConfigDlg.cpp +++ b/pcsx2/Linux/ConfigDlg.cpp @@ -88,7 +88,7 @@ static void ConfPlugin(plugin_types type, plugin_callback call, bool pullcombo = void OnConf_Menu(GtkMenuItem *menuitem, gpointer user_data) { - char *name = gtk_widget_get_name(GTK_WIDGET(menuitem)); + char *name = (char*)gtk_widget_get_name(GTK_WIDGET(menuitem)); plugin_types type = strToPluginType(name); gtk_widget_set_sensitive(MainWindow, FALSE); @@ -138,7 +138,7 @@ void OnConfConf_Ok(GtkButton *button, gpointer user_data) { PluginConf *confs = ConfS(type); - if (!GetComboText(confs->Combo, confs->plist, PluginName(type))) + if (!GetComboText(confs->Combo, confs->plist, (char*)PluginName(type))) applychanges = FALSE; } @@ -153,7 +153,7 @@ void OnConfConf_Ok(GtkButton *button, gpointer user_data) void OnConfButton(GtkButton *button, gpointer user_data) { - char *name = gtk_widget_get_name(GTK_WIDGET(button)); + char *name = (char*)gtk_widget_get_name(GTK_WIDGET(button)); plugin_types type = strToPluginType(name); plugin_callback call = strToPluginCall(name); @@ -196,7 +196,7 @@ void UpdateConfDlg() sprintf(tmp, "GtkCombo_%s", PluginTypeToStr(type)); confs->Combo = lookup_widget(ConfDlg, tmp); SetComboToGList(GTK_COMBO_BOX(confs->Combo), confs->PluginNameList); - FindComboText(confs->Combo, confs->plist, confs->PluginNameList, PluginName(type)); + FindComboText(confs->Combo, confs->plist, confs->PluginNameList, (char*)PluginName(type)); } } diff --git a/pcsx2/Linux/ConfigDlg.h b/pcsx2/Linux/ConfigDlg.h index 5a8f971e11..081e2c0a3f 100644 --- a/pcsx2/Linux/ConfigDlg.h +++ b/pcsx2/Linux/ConfigDlg.h @@ -171,7 +171,7 @@ __forceinline const char *PluginCallbackName(int type, int call) return NULL; } -__forceinline int strToPluginCall(char *s) +__forceinline plugin_callback strToPluginCall(char *s) { char *sub = NULL; @@ -187,7 +187,7 @@ __forceinline int strToPluginCall(char *s) return PLUGIN_NULL; } -__forceinline int strToPluginType(char *s) +__forceinline plugin_types strToPluginType(char *s) { char *sub = NULL; diff --git a/pcsx2/x86/Makefile.am b/pcsx2/x86/Makefile.am index 77f3d29c0e..2e77cc0168 100644 --- a/pcsx2/x86/Makefile.am +++ b/pcsx2/x86/Makefile.am @@ -10,18 +10,19 @@ ix86-32/iR5900MultDiv.cpp ix86-32/iCore-32.cpp ix86-32/aR5900-32.S ix86-32/iR590 libx86recomp_a_SOURCES = \ BaseblockEx.cpp iCOP0.cpp iCOP2.cpp iCore.cpp iFPU.cpp iFPUd.cpp iMMI.cpp iPsxMem.cpp iR3000A.cpp iR3000Atables.cpp \ iR5900Misc.cpp iVU0micro.cpp iVU1micro.cpp iVUmicro.cpp iVUmicroLower.cpp iVUmicroUpper.cpp iVUzerorec.cpp iVif.cpp \ -ir5900tables.cpp fast_routines.S aR3000A.S aVUzerorec.S aVif.S $(archfiles) +ir5900tables.cpp fast_routines.S aR3000A.S aVUzerorec.S aVif.S $(archfiles) + +#ifdef PCSX2_MICROVU +#libx86recomp_a_SOURCES += \ +#microVU.cpp microVU_Misc.inl microVU_Log.inl microVU_Analyze.inl microVU_Alloc.inl microVU_Upper.inl microVU_Lower.inl \ +#microVU_Tables.inl microVU_Flags.inl microVU_Compile.inl microVU_Execute.inl \ +#microVU.h microVU_Alloc.h microVU_Misc.h +#endif 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 \ iR5900LoadStore.h iR5900Move.h iR5900MultDiv.h iR5900Shift.h iVUmicro.h iVUops.h iVUzerorec.h -#ifdef PCSX2_MICROVU -#libx86recomp_a_SOURCES += \ -#microVU.cpp microVU_Alloc.cpp microVU_Compile.cpp microVU_Lower.cpp microVU_Misc.cpp microVU_Upper.cpp aMicroVU.S \ -#microVU.h microVU_Alloc.h microVU_Misc.h microVU_Tables.h -#endif - libx86recomp_a_DEPENDENCIES = ix86/libix86.a SUBDIRS = ix86 \ No newline at end of file diff --git a/pcsx2/x86/iR3000A.cpp b/pcsx2/x86/iR3000A.cpp index 074222ea11..d2a20cdaff 100644 --- a/pcsx2/x86/iR3000A.cpp +++ b/pcsx2/x86/iR3000A.cpp @@ -212,15 +212,15 @@ static void iIopDumpBlock( int startpc, u8 * ptr ) fclose( f ); #ifdef __LINUX__ - // dump the asm - f = fopen( "mydump1", "wb" ); + // dump the asm + f = fopen( "mydump1", "wb" ); fwrite( ptr, 1, (uptr)x86Ptr - (uptr)ptr, f ); fclose( f ); sprintf( command, "objdump -D --target=binary --architecture=i386 -M intel mydump1 | cat %s - > tempdump", filename ); system( command ); - sprintf(command, "mv tempdump %s", filename); - system(command); - f = fopen( filename.c_str(), "a+" ); + sprintf(command, "mv tempdump %s", filename); + system(command); + f = fopen( filename.c_str(), "a+" ); #endif } #endif @@ -889,6 +889,7 @@ void psxRecompileNextInstruction(int delayslot) { static u8 s_bFlushReg = 1; + // pblock isn't used elsewhere in this function. BASEBLOCK* pblock = PSX_GETBLOCK(psxpc); #ifdef _DEBUG @@ -982,7 +983,7 @@ void iopRecRecompile(u32 startpc) if(!s_pCurBlockEx || s_pCurBlockEx->startpc != HWADDR(startpc)) s_pCurBlockEx = recBlocks.New(HWADDR(startpc), (uptr)recPtr); - psxbranch = 0; + psxbranch = 0; s_pCurBlock->SetFnptr( (uptr)x86Ptr ); s_psxBlockCycles = 0; diff --git a/pcsx2/x86/ix86-32/iR5900LoadStore.cpp b/pcsx2/x86/ix86-32/iR5900LoadStore.cpp index aaf93d1d47..ba09e7f748 100644 --- a/pcsx2/x86/ix86-32/iR5900LoadStore.cpp +++ b/pcsx2/x86/ix86-32/iR5900LoadStore.cpp @@ -67,9 +67,6 @@ REC_FUNC(SQC2); #else PCSX2_ALIGNED16(u64 retValues[2]); -static u32 s_bCachingMem = 0; -static u32 s_nAddMemOffset = 0; -static u32 s_tempaddr = 0; void _eeOnLoadWrite(int reg) { @@ -94,6 +91,10 @@ void _eeOnLoadWrite(int reg) #ifdef PCSX2_VIRTUAL_MEM +static u32 s_bCachingMem = 0; +static u32 s_nAddMemOffset = 0; +static u32 s_tempaddr = 0; + //////////////////////////////////////////////////// //#define REC_SLOWREAD //#define REC_SLOWWRITE diff --git a/pcsx2/x86/ix86-32/recVTLB.cpp b/pcsx2/x86/ix86-32/recVTLB.cpp index 5ce11a9d58..16f76b193d 100644 --- a/pcsx2/x86/ix86-32/recVTLB.cpp +++ b/pcsx2/x86/ix86-32/recVTLB.cpp @@ -293,7 +293,7 @@ void vtlb_dynarec_init() // clear the buffer to 0xcc (easier debugging). memset_8<0xcc,0x1000>( m_IndirectDispatchers ); - u8* baseptr = m_IndirectDispatchers; + //u8* baseptr = m_IndirectDispatchers; for( int mode=0; mode<2; ++mode ) { diff --git a/pcsx2/x86/microVU.h b/pcsx2/x86/microVU.h index 7dc1f4d804..88be602ebb 100644 --- a/pcsx2/x86/microVU.h +++ b/pcsx2/x86/microVU.h @@ -147,11 +147,8 @@ microVUt(void) mVUcacheProg(microVU* mVU, int progIndex); void* __fastcall mVUexecuteVU0(u32 startPC, u32 cycles); void* __fastcall mVUexecuteVU1(u32 startPC, u32 cycles); -#ifndef __LINUX__ typedef void (__fastcall *mVUrecCall)(u32, u32); -#else -typedef void (*mVUrecCall)(u32, u32) __attribute__((__fastcall)); // Not sure if this is correct syntax (should be close xD) -#endif + // Include all the *.inl files (Needed because C++ sucks with templates and *.cpp files) #include "microVU_Misc.inl" diff --git a/plugins/PeopsSPU2/Makefile b/plugins/PeopsSPU2/Makefile index c620587c0c..e53dcd2c0e 100644 --- a/plugins/PeopsSPU2/Makefile +++ b/plugins/PeopsSPU2/Makefile @@ -28,11 +28,11 @@ LIB = -lc -lm ifeq ($(USEALSA), TRUE) OBJ+= alsa.o LIB+= -lasound - LINKFLAGS = -shared -Wl,-soname,libspu2PeopsALSA.so -o libspu2PeopsALSA.so.1.0.3 + LINKFLAGS = -m32 -shared -Wl,-soname,libspu2PeopsALSA.so -o libspu2PeopsALSA.so.1.0.3 CCFLAGS3+= -DUSEALSA else OBJ+= oss.o - LINKFLAGS = -shared -Wl,-soname,libspu2PeopsOSS.so.1.6 -fPIC -fomit-frame-pointer -o libspu2PeopsOSS.so.1.6 -m32 + LINKFLAGS = -m32 -shared -Wl,-soname,libspu2PeopsOSS.so.1.6 -fPIC -fomit-frame-pointer -o libspu2PeopsOSS.so.1.6 endif ifeq ($(NOTHREADLIB), TRUE)