From fc3514107d34bc449190ac9e9ca605c505f9eefc Mon Sep 17 00:00:00 2001 From: arcum42 Date: Wed, 7 Jul 2010 09:14:47 +0000 Subject: [PATCH] Work around VU0.code & VU1.code being packed in Linux when freezing memory. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3411 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/CMakeLists.txt | 1 + pcsx2/Linux/pcsx2.cbp | 1 + pcsx2/VUmicroMem.cpp | 12 ++++++++++++ 3 files changed, 14 insertions(+) diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 750b58c5ec..3e3c6efa70 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -557,6 +557,7 @@ set(pcsx2x86Headers x86/newVif_BlockBuffer.h x86/newVif_HashBucket.h x86/newVif_UnpackSSE.h + x86/sVU_Compare.h x86/sVU_Debug.h x86/sVU_Micro.h x86/sVU_zerorec.h diff --git a/pcsx2/Linux/pcsx2.cbp b/pcsx2/Linux/pcsx2.cbp index 5c623e67c4..f8249b1c1a 100644 --- a/pcsx2/Linux/pcsx2.cbp +++ b/pcsx2/Linux/pcsx2.cbp @@ -593,6 +593,7 @@ + diff --git a/pcsx2/VUmicroMem.cpp b/pcsx2/VUmicroMem.cpp index 6ff2ab9d34..923810be13 100644 --- a/pcsx2/VUmicroMem.cpp +++ b/pcsx2/VUmicroMem.cpp @@ -111,7 +111,13 @@ void SaveStateBase::vuMicroFreeze() pxAssume( VU1.Mem != NULL ); Freeze(VU0.ACC); +#ifdef __LINUX__ + // GCC is unable to bind packed fields. + u32 temp_vu0_code = VU0.code; + Freeze(temp_vu0_code); +#else Freeze(VU0.code); +#endif FreezeMem(VU0.Mem, 4*1024); FreezeMem(VU0.Micro, 4*1024); @@ -119,7 +125,13 @@ void SaveStateBase::vuMicroFreeze() Freeze(VU0.VI); Freeze(VU1.ACC); +#ifdef __LINUX__ + // GCC is unable to bind packed fields. + u32 temp_vu1_code = VU1.code; + Freeze(temp_vu1_code); +#else Freeze(VU1.code); +#endif FreezeMem(VU1.Mem, 16*1024); FreezeMem(VU1.Micro, 16*1024);