mirror of https://github.com/PCSX2/pcsx2.git
Remove superVU. (#3386)
* Remove superVU, as well as the VUClipFlagHack, which was SuperVU only.
This commit is contained in:
parent
3c65ddf72e
commit
2b115d031e
|
@ -56,7 +56,6 @@
|
|||
-- Game Fixes (gameFixName = 1)
|
||||
---------------------------------------------
|
||||
-- VuAddSubHack = 1 // Tri-ace games, they use an encryption algorithm that requires VU ADDI opcode to be bit-accurate.
|
||||
-- VuClipFlagHack = 1 // Persona games, maybe others. It's to do with the VU clip flag (sVU-only).
|
||||
-- FpuCompareHack = 1 // Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
|
||||
-- FpuMulHack = 1 // Tales of Destiny hangs.
|
||||
-- FpuNegDivHack = 1 // Gundam games messed up camera-view. Dakar 2's sky showing over 3D. Others...
|
||||
|
@ -3125,7 +3124,6 @@ Region = NTSC-K
|
|||
Serial = SCKA-20099
|
||||
Name = Persona 3
|
||||
Region = NTSC-K
|
||||
VuClipFlagHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SCKA-20101
|
||||
Name = Seiken Densetsu 4 (Dawn of Mana)
|
||||
|
@ -3139,7 +3137,6 @@ Region = NTSC-K
|
|||
Serial = SCKA-20109
|
||||
Name = Persona 3 FES [Independent Starting Version]
|
||||
Region = NTSC-K
|
||||
VuClipFlagHack = 1
|
||||
MemCardFilter = SCKA-20109/SCKA-20099
|
||||
---------------------------------------------
|
||||
Serial = SCKA-20114
|
||||
|
@ -3158,7 +3155,6 @@ Serial = SCKA-20132
|
|||
Name = Shin Megami Tensei: Persona 4
|
||||
Region = NTSC-K
|
||||
Compat = 5
|
||||
VuClipFlagHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SCKA-24008
|
||||
Name = SOCOM - U.S. Navy SEALs
|
||||
|
@ -17695,7 +17691,6 @@ Serial = SLES-55018
|
|||
Name = Shin Megami Tensei: Persona 3
|
||||
Region = PAL-E
|
||||
Compat = 5
|
||||
VuClipFlagHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SLES-55019
|
||||
Name = Ratchet & Clank - Size Matters
|
||||
|
@ -18081,7 +18076,6 @@ Compat = 5
|
|||
Serial = SLES-55354
|
||||
Name = Shin Megami Tensei: Persona 3 FES
|
||||
Region = PAL-E
|
||||
VuClipFlagHack = 1
|
||||
MemCardFilter = SLES-55354/SLES-55018
|
||||
---------------------------------------------
|
||||
Serial = SLES-55355
|
||||
|
@ -18233,7 +18227,6 @@ Region = PAL-M5
|
|||
Serial = SLES-55474
|
||||
Name = Shin Megami Tensei: Persona 4
|
||||
Region = PAL-E
|
||||
VuClipFlagHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SLES-55476
|
||||
Name = Scooby-Doo! First Frights
|
||||
|
@ -27428,7 +27421,6 @@ Serial = SLPM-66445
|
|||
Name = Persona 3
|
||||
Region = NTSC-J
|
||||
Compat = 5
|
||||
VuClipFlagHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SLPM-66446
|
||||
Name = Beat Down - Fists of Vengeance [CapKore]
|
||||
|
@ -28359,13 +28351,11 @@ Region = NTSC-J
|
|||
Serial = SLPM-66689
|
||||
Name = Persona 3 FES [Append Edition]
|
||||
Region = NTSC-J
|
||||
VuClipFlagHack = 1
|
||||
MemCardFilter = SLPM-66445/SLPM-66689/SLPM-66690
|
||||
---------------------------------------------
|
||||
Serial = SLPM-66690
|
||||
Name = Persona 3 FES [Independent Starting Version]
|
||||
Region = NTSC-J
|
||||
VuClipFlagHack = 1
|
||||
MemCardFilter = SLPM-66445/SLPM-66689/SLPM-66690
|
||||
---------------------------------------------
|
||||
Serial = SLPM-66691
|
||||
|
@ -29447,7 +29437,6 @@ Serial = SLPM-66978
|
|||
Name = Persona 4 [Konami-style Special Edition]
|
||||
Region = NTSC-J
|
||||
Compat = 5
|
||||
VuClipFlagHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SLPM-66987
|
||||
Name = Kowloon Youma Gakuen Ki [Best Version]
|
||||
|
@ -29923,12 +29912,10 @@ Serial = SLPM-74277
|
|||
Name = Persona 3 FES [PlayStation 2 The Best]
|
||||
Region = NTSC-J
|
||||
Compat = 5
|
||||
VuClipFlagHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SLPM-74278
|
||||
Name = Persona 4 [PlayStation 2 The Best]
|
||||
Region = NTSC-J
|
||||
VuClipFlagHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SLPM-74286
|
||||
Name = Shin Sangoku Musou 5 Special [PlayStation 2 The Best]
|
||||
|
@ -42478,7 +42465,6 @@ Serial = SLUS-21569
|
|||
Name = Shin Megami Tensei: Persona 3
|
||||
Region = NTSC-U
|
||||
Compat = 5
|
||||
VuClipFlagHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SLUS-21570
|
||||
Name = Heatseeker
|
||||
|
@ -42748,7 +42734,6 @@ Serial = SLUS-21621
|
|||
Name = Shin Megami Tensei: Persona 3 FES
|
||||
Region = NTSC-U
|
||||
Compat = 5
|
||||
VuClipFlagHack = 1
|
||||
MemCardFilter = SLUS-21621/SLUS-21569
|
||||
---------------------------------------------
|
||||
Serial = SLUS-21622
|
||||
|
@ -43525,13 +43510,11 @@ Serial = SLUS-21782
|
|||
Name = Shin Megami Tensei: Persona 4
|
||||
Region = NTSC-U
|
||||
Compat = 5
|
||||
VuClipFlagHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SLUS-21782B
|
||||
Name = Shin Megami Tensei: Persona 4
|
||||
Region = NTSC-U
|
||||
Compat = 5
|
||||
VuClipFlagHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SLUS-21783
|
||||
Name = Space Chimps
|
||||
|
|
2
build.sh
2
build.sh
|
@ -126,7 +126,7 @@ run_clangtidy()
|
|||
compile_json=compile_commands.json
|
||||
cpp_list=cpp_file.txt
|
||||
summary=clang_tidy_summary.txt
|
||||
grep '"file"' $compile_json | sed -e 's/"//g' -e 's/^\s*file\s*:\s*//' | grep -v "aVUzerorec.S" | sort -u > $cpp_list
|
||||
grep '"file"' $compile_json | sed -e 's/"//g' -e 's/^\s*file\s*:\s*//' | sort -u > $cpp_list
|
||||
|
||||
# EXAMPLE
|
||||
#
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#-------------------------------------------------------------------------------
|
||||
# Misc option
|
||||
#-------------------------------------------------------------------------------
|
||||
option(DISABLE_SVU "Disable superVU (don't use it)")
|
||||
option(DISABLE_BUILD_DATE "Disable including the binary compile date")
|
||||
|
||||
if(DISABLE_BUILD_DATE OR openSUSE)
|
||||
|
@ -222,11 +221,6 @@ if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "i386")
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Don't bother porting SuperVU
|
||||
if (NOT Linux)
|
||||
set(DISABLE_SVU TRUE)
|
||||
endif()
|
||||
|
||||
add_definitions(-D_ARCH_32=1 -D_M_X86=1 -D_M_X86_32=1)
|
||||
set(_ARCH_32 1)
|
||||
set(_M_X86 1)
|
||||
|
@ -235,9 +229,6 @@ elseif(${PCSX2_TARGET_ARCHITECTURES} MATCHES "x86_64")
|
|||
# x86_64 requires -fPIC
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# SuperVU will not be ported
|
||||
set(DISABLE_SVU TRUE)
|
||||
|
||||
if(NOT DEFINED ARCH_FLAG)
|
||||
if (DISABLE_ADVANCE_SIMD)
|
||||
if (USE_ICC)
|
||||
|
@ -309,9 +300,6 @@ option(USE_PGO_OPTIMIZE "Enable PGO optimization (use profile)")
|
|||
# Note1: Builtin strcmp/memcmp was proved to be slower on Mesa than stdlib version.
|
||||
# Note2: float operation SSE is impacted by the PCSX2 SSE configuration. In particular, flush to zero denormal.
|
||||
set(COMMON_FLAG "-pipe -fvisibility=hidden -pthread -fno-builtin-strcmp -fno-builtin-memcmp -mfpmath=sse")
|
||||
if (DISABLE_SVU)
|
||||
set(COMMON_FLAG "${COMMON_FLAG} -DDISABLE_SVU")
|
||||
endif()
|
||||
|
||||
if(USE_VTUNE)
|
||||
set(COMMON_FLAG "${COMMON_FLAG} -DENABLE_VTUNE")
|
||||
|
|
|
@ -153,7 +153,6 @@ set(pcsx2Headers
|
|||
MTVU.h
|
||||
Memory.h
|
||||
MemoryTypes.h
|
||||
NakedAsm.h
|
||||
Patch.h
|
||||
PathDefs.h
|
||||
Plugins.h
|
||||
|
@ -562,14 +561,6 @@ set(pcsx2x86Sources
|
|||
x86/newVif_Unpack.cpp
|
||||
x86/newVif_UnpackSSE.cpp
|
||||
)
|
||||
if (NOT DISABLE_SVU)
|
||||
set(pcsx2x86Sources ${pcsx2x86Sources}
|
||||
x86/sVU_Lower.cpp
|
||||
x86/sVU_Micro.cpp
|
||||
x86/sVU_Upper.cpp
|
||||
x86/sVU_zerorec.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
# x86 headers
|
||||
set(pcsx2x86Headers
|
||||
|
@ -610,20 +601,8 @@ set(pcsx2x86Headers
|
|||
x86/newVif_HashBucket.h
|
||||
x86/newVif_UnpackSSE.h
|
||||
x86/R5900_Profiler.h
|
||||
x86/sVU_Micro.h
|
||||
x86/sVU_zerorec.h
|
||||
)
|
||||
|
||||
# collect .S files
|
||||
if (NOT DISABLE_SVU)
|
||||
set(pcsx2SSources x86/aVUzerorec.S)
|
||||
# change language of .S-files to c++
|
||||
set_source_files_properties(${pcsx2SSources} PROPERTIES LANGUAGE CXX)
|
||||
else()
|
||||
set(pcsx2SSources "")
|
||||
endif()
|
||||
|
||||
|
||||
# common Sources
|
||||
set(Common
|
||||
${pcsx2Sources}
|
||||
|
@ -647,8 +626,7 @@ set(Common
|
|||
${pcsx2x86Sources}
|
||||
${pcsx2x86Headers}
|
||||
${pcsx2ZipToolsSources}
|
||||
${pcsx2ZipToolsHeaders}
|
||||
${pcsx2SSources})
|
||||
${pcsx2ZipToolsHeaders})
|
||||
|
||||
# platform sources
|
||||
# Linux
|
||||
|
|
|
@ -43,7 +43,6 @@ enum GamefixId
|
|||
GamefixId_FIRST = 0,
|
||||
|
||||
Fix_VuAddSub = GamefixId_FIRST,
|
||||
Fix_VuClipFlag,
|
||||
Fix_FpuCompare,
|
||||
Fix_FpuMultiply,
|
||||
Fix_FpuNegDiv,
|
||||
|
@ -347,7 +346,6 @@ struct Pcsx2Config
|
|||
BITFIELD32()
|
||||
bool
|
||||
VuAddSubHack : 1, // Tri-ace games, they use an encryption algorithm that requires VU ADDI opcode to be bit-accurate.
|
||||
VuClipFlagHack : 1, // Persona games, maybe others. It's to do with the VU clip flag (again).
|
||||
FpuCompareHack : 1, // Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
|
||||
FpuMulHack : 1, // Tales of Destiny hangs.
|
||||
FpuNegDivHack : 1, // Gundam games messed up camera-view.
|
||||
|
@ -537,7 +535,6 @@ TraceLogFilters& SetTraceConfig();
|
|||
//------------ SPECIAL GAME FIXES!!! ---------------
|
||||
#define CHECK_VUADDSUBHACK (EmuConfig.Gamefixes.VuAddSubHack) // Special Fix for Tri-ace games, they use an encryption algorithm that requires VU addi opcode to be bit-accurate.
|
||||
#define CHECK_FPUCOMPAREHACK (EmuConfig.Gamefixes.FpuCompareHack) // Special Fix for Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
|
||||
#define CHECK_VUCLIPFLAGHACK (EmuConfig.Gamefixes.VuClipFlagHack) // Special Fix for Persona games, maybe others. It's to do with the VU clip flag (again).
|
||||
#define CHECK_FPUMULHACK (EmuConfig.Gamefixes.FpuMulHack) // Special Fix for Tales of Destiny hangs.
|
||||
#define CHECK_FPUNEGDIVHACK (EmuConfig.Gamefixes.FpuNegDivHack) // Special Fix for Gundam games messed up camera-view.
|
||||
#define CHECK_XGKICKHACK (EmuConfig.Gamefixes.XgKickHack) // Special Fix for Erementar Gerad, adds more delay to VU XGkick instructions. Corrects the color of some graphics.
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Externs for various routines that are defined in assembly files on Linux.
|
||||
#ifndef NAKED_ASM_H
|
||||
#define NAKED_ASM_H
|
||||
|
||||
#ifdef __POSIX__
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// aVUzerorec.S
|
||||
void* SuperVUGetProgram(u32 startpc, int vuindex);
|
||||
void SuperVUCleanupProgram(u32 startpc, int vuindex);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -316,7 +316,6 @@ void Pcsx2Config::GamefixOptions::Set( GamefixId id, bool enabled )
|
|||
switch(id)
|
||||
{
|
||||
case Fix_VuAddSub: VuAddSubHack = enabled; break;
|
||||
case Fix_VuClipFlag: VuClipFlagHack = enabled; break;
|
||||
case Fix_FpuCompare: FpuCompareHack = enabled; break;
|
||||
case Fix_FpuMultiply: FpuMulHack = enabled; break;
|
||||
case Fix_FpuNegDiv: FpuNegDivHack = enabled; break;
|
||||
|
@ -343,7 +342,6 @@ bool Pcsx2Config::GamefixOptions::Get( GamefixId id ) const
|
|||
switch(id)
|
||||
{
|
||||
case Fix_VuAddSub: return VuAddSubHack;
|
||||
case Fix_VuClipFlag: return VuClipFlagHack;
|
||||
case Fix_FpuCompare: return FpuCompareHack;
|
||||
case Fix_FpuMultiply: return FpuMulHack;
|
||||
case Fix_FpuNegDiv: return FpuNegDivHack;
|
||||
|
@ -370,7 +368,6 @@ void Pcsx2Config::GamefixOptions::LoadSave( IniInterface& ini )
|
|||
ScopedIniGroup path( ini, L"Gamefixes" );
|
||||
|
||||
IniBitBool( VuAddSubHack );
|
||||
IniBitBool( VuClipFlagHack );
|
||||
IniBitBool( FpuCompareHack );
|
||||
IniBitBool( FpuMulHack );
|
||||
IniBitBool( FpuNegDivHack );
|
||||
|
|
|
@ -101,8 +101,7 @@ RecompiledCodeReserve& RecompiledCodeReserve::SetProfilerName( const wxString& s
|
|||
return *this;
|
||||
}
|
||||
|
||||
// This error message is shared by R5900, R3000, and microVU recompilers. It is not used by the
|
||||
// SuperVU recompiler, since it has its own customized message.
|
||||
// This error message is shared by R5900, R3000, and microVU recompilers.
|
||||
void RecompiledCodeReserve::ThrowIfNotOk() const
|
||||
{
|
||||
if (IsOk()) return;
|
||||
|
@ -334,12 +333,6 @@ CpuInitializer< CpuType >::~CpuInitializer()
|
|||
class CpuInitializerSet
|
||||
{
|
||||
public:
|
||||
#ifndef DISABLE_SVU
|
||||
// Note: Allocate sVU first -- it's the most picky.
|
||||
CpuInitializer<recSuperVU0> superVU0;
|
||||
CpuInitializer<recSuperVU1> superVU1;
|
||||
#endif
|
||||
|
||||
CpuInitializer<recMicroVU0> microVU0;
|
||||
CpuInitializer<recMicroVU1> microVU1;
|
||||
|
||||
|
@ -501,14 +494,6 @@ bool SysCpuProviderPack::IsRecAvailable_MicroVU1() const { return CpuProviders->
|
|||
BaseException* SysCpuProviderPack::GetException_MicroVU0() const { return CpuProviders->microVU0.ExThrown.get(); }
|
||||
BaseException* SysCpuProviderPack::GetException_MicroVU1() const { return CpuProviders->microVU1.ExThrown.get(); }
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
bool SysCpuProviderPack::IsRecAvailable_SuperVU0() const { return CpuProviders->superVU0.IsAvailable(); }
|
||||
bool SysCpuProviderPack::IsRecAvailable_SuperVU1() const { return CpuProviders->superVU1.IsAvailable(); }
|
||||
BaseException* SysCpuProviderPack::GetException_SuperVU0() const { return CpuProviders->superVU0.ExThrown.get(); }
|
||||
BaseException* SysCpuProviderPack::GetException_SuperVU1() const { return CpuProviders->superVU1.ExThrown.get(); }
|
||||
#endif
|
||||
|
||||
|
||||
void SysCpuProviderPack::CleanupMess() noexcept
|
||||
{
|
||||
try
|
||||
|
@ -534,15 +519,8 @@ bool SysCpuProviderPack::HadSomeFailures( const Pcsx2Config::RecompilerOptions&
|
|||
{
|
||||
return (recOpts.EnableEE && !IsRecAvailable_EE()) ||
|
||||
(recOpts.EnableIOP && !IsRecAvailable_IOP()) ||
|
||||
#ifndef DISABLE_SVU
|
||||
(recOpts.EnableVU0 && recOpts.UseMicroVU0 && !IsRecAvailable_MicroVU0()) ||
|
||||
(recOpts.EnableVU1 && recOpts.UseMicroVU0 && !IsRecAvailable_MicroVU1()) ||
|
||||
(recOpts.EnableVU0 && !recOpts.UseMicroVU0 && !IsRecAvailable_SuperVU0()) ||
|
||||
(recOpts.EnableVU1 && !recOpts.UseMicroVU1 && !IsRecAvailable_SuperVU1())
|
||||
#else
|
||||
(recOpts.EnableVU0 && !IsRecAvailable_MicroVU0()) ||
|
||||
(recOpts.EnableVU1 && !IsRecAvailable_MicroVU1())
|
||||
#endif
|
||||
;
|
||||
|
||||
}
|
||||
|
@ -559,32 +537,12 @@ void SysCpuProviderPack::ApplyConfig() const
|
|||
CpuVU1 = CpuProviders->interpVU1;
|
||||
|
||||
if( EmuConfig.Cpu.Recompiler.EnableVU0 )
|
||||
#ifndef DISABLE_SVU
|
||||
CpuVU0 = EmuConfig.Cpu.Recompiler.UseMicroVU0 ? (BaseVUmicroCPU*)CpuProviders->microVU0 : (BaseVUmicroCPU*)CpuProviders->superVU0;
|
||||
#else
|
||||
CpuVU0 = (BaseVUmicroCPU*)CpuProviders->microVU0;
|
||||
#endif
|
||||
|
||||
if( EmuConfig.Cpu.Recompiler.EnableVU1 )
|
||||
#ifndef DISABLE_SVU
|
||||
CpuVU1 = EmuConfig.Cpu.Recompiler.UseMicroVU1 ? (BaseVUmicroCPU*)CpuProviders->microVU1 : (BaseVUmicroCPU*)CpuProviders->superVU1;
|
||||
#else
|
||||
CpuVU1 = (BaseVUmicroCPU*)CpuProviders->microVU1;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
// This is a semi-hacky function for convenience
|
||||
BaseVUmicroCPU* SysCpuProviderPack::getVUprovider(int whichProvider, int vuIndex) const {
|
||||
switch (whichProvider) {
|
||||
case 0: return vuIndex ? (BaseVUmicroCPU*)CpuProviders->interpVU1 : (BaseVUmicroCPU*)CpuProviders->interpVU0;
|
||||
case 1: return vuIndex ? (BaseVUmicroCPU*)CpuProviders->superVU1 : (BaseVUmicroCPU*)CpuProviders->superVU0;
|
||||
case 2: return vuIndex ? (BaseVUmicroCPU*)CpuProviders->microVU1 : (BaseVUmicroCPU*)CpuProviders->microVU0;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Resets all PS2 cpu execution caches, which does not affect that actual PS2 state/condition.
|
||||
// This can be called at any time outside the context of a Cpu->Execute() block without
|
||||
// bad things happening (recompilers will slow down for a brief moment since rec code blocks
|
||||
|
|
|
@ -41,11 +41,6 @@ class RecompiledCodeReserve;
|
|||
|
||||
namespace HostMemoryMap
|
||||
{
|
||||
// superVU is OLD SCHOOL, and it requires its allocation to be in the lower 256mb
|
||||
// of the virtual memory space. (8mb each)
|
||||
static const uptr sVU0rec = _256mb - (_8mb*3);
|
||||
static const uptr sVU1rec = _256mb - (_8mb*2);
|
||||
|
||||
#ifdef ASAN_WORKAROUND
|
||||
// address sanitizer uses a shadow memory to monitor the state of the memory. Shadow is computed
|
||||
// as S = (M >> 3) + 0x20000000. So PCSX2 can't use 0x20000000 to 0x3FFFFFFF... Just add another
|
||||
|
@ -141,9 +136,6 @@ public:
|
|||
virtual ~SysCpuProviderPack();
|
||||
|
||||
void ApplyConfig() const;
|
||||
#ifndef DISABLE_SVU
|
||||
BaseVUmicroCPU* getVUprovider(int whichProvider, int vuIndex) const;
|
||||
#endif
|
||||
|
||||
bool HadSomeFailures( const Pcsx2Config::RecompilerOptions& recOpts ) const;
|
||||
|
||||
|
@ -158,11 +150,6 @@ public:
|
|||
BaseException* GetException_MicroVU0() const;
|
||||
BaseException* GetException_MicroVU1() const;
|
||||
|
||||
bool IsRecAvailable_SuperVU0() const;
|
||||
bool IsRecAvailable_SuperVU1() const;
|
||||
BaseException* GetException_SuperVU0() const;
|
||||
BaseException* GetException_SuperVU1() const;
|
||||
|
||||
protected:
|
||||
void CleanupMess() noexcept;
|
||||
};
|
||||
|
|
|
@ -131,7 +131,7 @@ struct __aligned16 VURegs {
|
|||
u32 cycle;
|
||||
u32 flags;
|
||||
|
||||
// Current opcode being interpreted or recompiled (this var is used by Interps and superVU
|
||||
// Current opcode being interpreted or recompiled (this var is used by Interps
|
||||
// but not microVU. Would like to have it local to their respective classes... someday)
|
||||
u32 code;
|
||||
|
||||
|
@ -142,7 +142,7 @@ struct __aligned16 VURegs {
|
|||
u32 delaybranchpc;
|
||||
bool takedelaybranch;
|
||||
|
||||
// MAC/Status flags -- these are used by interpreters and superVU, but are kind of hacky
|
||||
// MAC/Status flags -- these are used by interpreters but are kind of hacky
|
||||
// and shouldn't be relied on for any useful/valid info. Would like to move them out of
|
||||
// this struct eventually.
|
||||
u32 macflag;
|
||||
|
|
|
@ -254,47 +254,6 @@ public:
|
|||
void SetCacheReserve( uint reserveInMegs ) const;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// recSuperVU0 / recSuperVU1
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
class recSuperVU0 : public BaseVUmicroCPU
|
||||
{
|
||||
public:
|
||||
recSuperVU0();
|
||||
|
||||
const char* GetShortName() const { return "sVU0"; }
|
||||
wxString GetLongName() const { return L"SuperVU0 Recompiler"; }
|
||||
|
||||
void Reserve();
|
||||
void Shutdown() noexcept;
|
||||
void Reset();
|
||||
void Execute(u32 cycles);
|
||||
void Clear(u32 Addr, u32 Size);
|
||||
|
||||
uint GetCacheReserve() const;
|
||||
void SetCacheReserve( uint reserveInMegs ) const;
|
||||
};
|
||||
|
||||
class recSuperVU1 : public BaseVUmicroCPU
|
||||
{
|
||||
public:
|
||||
recSuperVU1();
|
||||
|
||||
const char* GetShortName() const { return "sVU1"; }
|
||||
wxString GetLongName() const { return L"SuperVU1 Recompiler"; }
|
||||
|
||||
void Reserve();
|
||||
void Shutdown() noexcept;
|
||||
void Reset();
|
||||
void Execute(u32 cycles);
|
||||
void Clear(u32 Addr, u32 Size);
|
||||
void ResumeXGkick() { Console.Warning("ResumeXGkick() Not implemented!"); }
|
||||
|
||||
uint GetCacheReserve() const;
|
||||
void SetCacheReserve( uint reserveInMegs ) const;
|
||||
};
|
||||
|
||||
extern BaseVUmicroCPU* CpuVU0;
|
||||
extern BaseVUmicroCPU* CpuVU1;
|
||||
|
||||
|
|
|
@ -283,10 +283,6 @@ static int loadGameSettings(Pcsx2Config& dest, const Game_Data& game) {
|
|||
|
||||
if (game.keyExists(key))
|
||||
{
|
||||
// VuClipFlag hack is only used by the SuperVu1 Recompiler.
|
||||
if (id == Fix_VuClipFlag && (!g_Conf->EmuOptions.Cpu.Recompiler.EnableVU1 || g_Conf->EmuOptions.Cpu.Recompiler.UseMicroVU1))
|
||||
continue;
|
||||
|
||||
bool enableIt = game.getBool(key);
|
||||
dest.Gamefixes.Set(id, enableIt);
|
||||
PatchesCon->WriteLn(L"(GameDB) %s Gamefix: " + key, enableIt ? L"Enabled" : L"Disabled");
|
||||
|
|
|
@ -184,40 +184,16 @@ void Pcsx2App::AllocateCoreStuffs()
|
|||
{
|
||||
scrollableTextArea->AppendText( L"* microVU0\n\t" + ex->FormatDisplayMessage() + L"\n\n" );
|
||||
recOps.UseMicroVU0 = false;
|
||||
#ifndef DISABLE_SVU
|
||||
recOps.EnableVU0 = recOps.EnableVU0 && m_CpuProviders->IsRecAvailable_SuperVU0();
|
||||
#else
|
||||
recOps.EnableVU0 = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
if( BaseException* ex = m_CpuProviders->GetException_MicroVU1() )
|
||||
{
|
||||
scrollableTextArea->AppendText( L"* microVU1\n\t" + ex->FormatDisplayMessage() + L"\n\n" );
|
||||
recOps.UseMicroVU1 = false;
|
||||
#ifndef DISABLE_SVU
|
||||
recOps.EnableVU1 = recOps.EnableVU1 && m_CpuProviders->IsRecAvailable_SuperVU1();
|
||||
#else
|
||||
recOps.EnableVU1 = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
if( BaseException* ex = m_CpuProviders->GetException_SuperVU0() )
|
||||
{
|
||||
scrollableTextArea->AppendText( L"* SuperVU0\n\t" + ex->FormatDisplayMessage() + L"\n\n" );
|
||||
recOps.UseMicroVU0 = m_CpuProviders->IsRecAvailable_MicroVU0();
|
||||
recOps.EnableVU0 = recOps.EnableVU0 && recOps.UseMicroVU0;
|
||||
}
|
||||
|
||||
if( BaseException* ex = m_CpuProviders->GetException_SuperVU1() )
|
||||
{
|
||||
scrollableTextArea->AppendText( L"* SuperVU1\n\t" + ex->FormatDisplayMessage() + L"\n\n" );
|
||||
recOps.UseMicroVU1 = m_CpuProviders->IsRecAvailable_MicroVU1();
|
||||
recOps.EnableVU1 = recOps.EnableVU1 && recOps.UseMicroVU1;
|
||||
}
|
||||
#endif
|
||||
|
||||
exconf += exconf.Heading(pxE( L"Note: Recompilers are not necessary for PCSX2 to run, however they typically improve emulation speed substantially. You may have to manually re-enable the recompilers listed above, if you resolve the errors." ));
|
||||
|
||||
pxIssueConfirmation( exconf, MsgButtons().OK() );
|
||||
|
|
|
@ -186,12 +186,7 @@ Panels::CpuPanelVU::CpuPanelVU( wxWindow* parent )
|
|||
.SetToolTip(_("Vector Unit Interpreter. Slow and not very compatible. Only use for diagnostics.")),
|
||||
|
||||
RadioPanelItem(_("microVU Recompiler"))
|
||||
.SetToolTip(_("New Vector Unit recompiler with much improved compatibility. Recommended.")),
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
RadioPanelItem(_("superVU Recompiler [legacy]"))
|
||||
.SetToolTip(_("Useful for diagnosing bugs or clamping issues in the new mVU recompiler."))
|
||||
#endif
|
||||
.SetToolTip(_("New Vector Unit recompiler with much improved compatibility. Recommended."))
|
||||
};
|
||||
|
||||
m_panel_VU0 = &(new pxRadioPanel( this, tbl_CpuTypes_VU )) ->SetDefaultItem( 1 );
|
||||
|
@ -280,11 +275,6 @@ void Panels::CpuPanelVU::Apply()
|
|||
Pcsx2Config::RecompilerOptions& recOps( g_Conf->EmuOptions.Cpu.Recompiler );
|
||||
recOps.EnableVU0 = m_panel_VU0->GetSelection() > 0;
|
||||
recOps.EnableVU1 = m_panel_VU1->GetSelection() > 0;
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
recOps.UseMicroVU0 = m_panel_VU0->GetSelection() == 1;
|
||||
recOps.UseMicroVU1 = m_panel_VU1->GetSelection() == 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Panels::CpuPanelVU::AppStatusEvent_OnSettingsApplied()
|
||||
|
@ -295,24 +285,8 @@ void Panels::CpuPanelVU::AppStatusEvent_OnSettingsApplied()
|
|||
void Panels::CpuPanelVU::ApplyConfigToGui( AppConfig& configToApply, int flags )
|
||||
{
|
||||
Pcsx2Config::RecompilerOptions& recOps( configToApply.EmuOptions.Cpu.Recompiler );
|
||||
#ifndef DISABLE_SVU
|
||||
if( recOps.UseMicroVU0 )
|
||||
m_panel_VU0->SetSelection( recOps.EnableVU0 ? 1 : 0 );
|
||||
else
|
||||
m_panel_VU0->SetSelection( recOps.EnableVU0 ? 2 : 0 );
|
||||
#else
|
||||
m_panel_VU0->SetSelection( recOps.EnableVU0 ? 1 : 0 );
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
if( recOps.UseMicroVU1 )
|
||||
m_panel_VU1->SetSelection( recOps.EnableVU1 ? 1 : 0 );
|
||||
else
|
||||
m_panel_VU1->SetSelection( recOps.EnableVU1 ? 2 : 0 );
|
||||
#else
|
||||
m_panel_VU1->SetSelection( recOps.EnableVU1 ? 1 : 0 );
|
||||
#endif
|
||||
|
||||
m_panel_VU0->Enable(!configToApply.EnablePresets);
|
||||
m_panel_VU1->Enable(!configToApply.EnablePresets);
|
||||
m_button_RestoreDefaults->Enable(!configToApply.EnablePresets);
|
||||
|
|
|
@ -40,10 +40,6 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent )
|
|||
_("VU Add Hack - Fixes Tri-Ace games boot crash."),
|
||||
_("Games that need this hack to boot:\n * Star Ocean 3\n * Radiata Stories\n * Valkyrie Profile 2")
|
||||
},
|
||||
{
|
||||
_("VU Clip Flag Hack - For Persona games (SuperVU recompiler only!)"),
|
||||
wxEmptyString
|
||||
},
|
||||
{
|
||||
_("FPU Compare Hack - For Digimon Rumble Arena 2."),
|
||||
wxEmptyString
|
||||
|
|
|
@ -176,7 +176,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow* parent )
|
|||
m_check_vuThread = new pxCheckBox( vuHacksPanel, _("MTVU (Multi-Threaded microVU1)"),
|
||||
_("Good Speedup and High Compatibility; may cause hanging... [Recommended if 3+ cores]") );
|
||||
|
||||
m_check_vuFlagHack->SetToolTip( pxEt( L"Updates Status Flags only on blocks which will read them, instead of all the time. This is safe most of the time, and Super VU does something similar by default."
|
||||
m_check_vuFlagHack->SetToolTip( pxEt( L"Updates Status Flags only on blocks which will read them, instead of all the time. This is safe most of the time, and Super VU did something similar by default."
|
||||
) );
|
||||
|
||||
m_check_vuThread->SetToolTip( pxEt( L"Runs VU1 on its own thread (microVU1-only). Generally a speedup on CPUs with 3 or more cores. This is safe for most games, but a few games are incompatible and may hang. In the case of GS limited games, it may be a slowdown (especially on dual core CPUs)."
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)/gui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Platform)'=='x64'">DISABLE_SVU;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>PrecompiledHeader.h</PrecompiledHeaderFile>
|
||||
|
@ -70,7 +69,6 @@
|
|||
<ItemGroup>
|
||||
<None Include="..\..\Utilities\folderdesc.txt" />
|
||||
<None Include="..\..\Docs\License.txt" />
|
||||
<None Include="..\..\x86\aVUzerorec.S" />
|
||||
<None Include="..\..\x86\microVU_Alloc.inl" />
|
||||
<None Include="..\..\x86\microVU_Analyze.inl" />
|
||||
<None Include="..\..\x86\microVU_Branch.inl" />
|
||||
|
@ -230,18 +228,6 @@
|
|||
<ClCompile Include="..\..\VUmicro.cpp" />
|
||||
<ClCompile Include="..\..\VUmicroMem.cpp" />
|
||||
<ClCompile Include="..\..\x86\microVU.cpp" />
|
||||
<ClCompile Include="..\..\x86\sVU_Lower.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\x86\sVU_Micro.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\x86\sVU_Upper.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\x86\sVU_zerorec.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\VU0.cpp" />
|
||||
<ClCompile Include="..\..\VU0micro.cpp" />
|
||||
<ClCompile Include="..\..\VU0microInterp.cpp" />
|
||||
|
@ -462,7 +448,6 @@
|
|||
<ClInclude Include="..\..\Config.h" />
|
||||
<ClInclude Include="..\..\Dump.h" />
|
||||
<ClInclude Include="..\..\IopCommon.h" />
|
||||
<ClInclude Include="..\..\NakedAsm.h" />
|
||||
<ClInclude Include="..\..\Plugins.h" />
|
||||
<ClInclude Include="..\..\SaveState.h" />
|
||||
<ClInclude Include="..\..\System.h" />
|
||||
|
@ -482,8 +467,6 @@
|
|||
<ClInclude Include="..\..\x86\microVU_Misc.h" />
|
||||
<ClInclude Include="..\..\x86\microVU_Profiler.h" />
|
||||
<ClInclude Include="..\..\x86\R5900_Profiler.h" />
|
||||
<ClInclude Include="..\..\x86\sVU_Micro.h" />
|
||||
<ClInclude Include="..\..\x86\sVU_zerorec.h" />
|
||||
<ClInclude Include="..\..\VUflags.h" />
|
||||
<ClInclude Include="..\..\VUops.h" />
|
||||
<ClInclude Include="..\..\Sif.h" />
|
||||
|
|
|
@ -162,9 +162,6 @@
|
|||
<None Include="..\..\Docs\License.txt">
|
||||
<Filter>Docs</Filter>
|
||||
</None>
|
||||
<None Include="..\..\x86\aVUzerorec.S">
|
||||
<Filter>System\Linux</Filter>
|
||||
</None>
|
||||
<None Include="..\..\x86\microVU_Alloc.inl">
|
||||
<Filter>System\Ps2\EmotionEngine\VU\Dynarec\microVU</Filter>
|
||||
</None>
|
||||
|
@ -296,18 +293,6 @@
|
|||
<ClCompile Include="..\..\x86\microVU.cpp">
|
||||
<Filter>System\Ps2\EmotionEngine\VU\Dynarec\microVU</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\x86\sVU_Lower.cpp">
|
||||
<Filter>System\Ps2\EmotionEngine\VU\Dynarec\Super VU</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\x86\sVU_Micro.cpp">
|
||||
<Filter>System\Ps2\EmotionEngine\VU\Dynarec\Super VU</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\x86\sVU_Upper.cpp">
|
||||
<Filter>System\Ps2\EmotionEngine\VU\Dynarec\Super VU</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\x86\sVU_zerorec.cpp">
|
||||
<Filter>System\Ps2\EmotionEngine\VU\Dynarec\Super VU</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\VU0.cpp">
|
||||
<Filter>System\Ps2\EmotionEngine\VU\Interpreter</Filter>
|
||||
</ClCompile>
|
||||
|
@ -918,9 +903,6 @@
|
|||
<ClInclude Include="..\..\IopCommon.h">
|
||||
<Filter>System\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\NakedAsm.h">
|
||||
<Filter>System\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Plugins.h">
|
||||
<Filter>System\Include</Filter>
|
||||
</ClInclude>
|
||||
|
@ -972,12 +954,6 @@
|
|||
<ClInclude Include="..\..\x86\microVU_Misc.h">
|
||||
<Filter>System\Ps2\EmotionEngine\VU\Dynarec\microVU</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\x86\sVU_Micro.h">
|
||||
<Filter>System\Ps2\EmotionEngine\VU\Dynarec\Super VU</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\x86\sVU_zerorec.h">
|
||||
<Filter>System\Ps2\EmotionEngine\VU\Dynarec\Super VU</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\VUflags.h">
|
||||
<Filter>System\Ps2\EmotionEngine\VU\Interpreter</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -1,78 +0,0 @@
|
|||
// iVUzerorec.cpp assembly routines
|
||||
// zerofrog(@gmail.com)
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define svudispfntemp _svudispfntemp
|
||||
#define s_TotalVUCycles _s_TotalVUCycles
|
||||
#define s_callstack _s_callstack
|
||||
#define s_vu1ebp _s_vu1ebp
|
||||
#define s_vu1esp _s_vu1esp
|
||||
#define s_vu1esi _s_vu1esi
|
||||
#define s_vuedi _s_vuedi
|
||||
#define s_vuebx _s_vuebx
|
||||
#define s_saveebx _s_saveebx
|
||||
#define s_saveecx _s_saveecx
|
||||
#define s_saveedx _s_saveedx
|
||||
#define s_saveesi _s_saveesi
|
||||
#define s_saveedi _s_saveedi
|
||||
#define s_saveebp _s_saveebp
|
||||
#define s_writeQ _s_writeQ
|
||||
#define s_writeP _s_writeP
|
||||
#define g_curdebugvu _g_curdebugvu
|
||||
#define SuperVUGetProgram _SuperVUGetProgram
|
||||
#define SuperVUCleanupProgram _SuperVUCleanupProgram
|
||||
#define SuperVUExecuteProgram _SuperVUExecuteProgram
|
||||
#define SuperVUEndProgram _SuperVUEndProgram
|
||||
#define g_sseVUMXCSR _g_sseVUMXCSR
|
||||
#define g_sseMXCSR _g_sseMXCSR
|
||||
#endif
|
||||
|
||||
|
||||
.intel_syntax noprefix
|
||||
.extern s_TotalVUCycles
|
||||
.extern s_callstack
|
||||
.extern s_vu1esp
|
||||
.extern s_writeQ
|
||||
.extern s_writeP
|
||||
.extern g_curdebugvu
|
||||
.extern SuperVUGetProgram
|
||||
.extern SuperVUCleanupProgram
|
||||
.extern g_sseVUMXCSR
|
||||
.extern g_sseMXCSR
|
||||
|
||||
// SuperVUExecuteProgram(u32 startpc, int vuindex)
|
||||
.globl SuperVUExecuteProgram
|
||||
SuperVUExecuteProgram:
|
||||
mov eax, [esp]
|
||||
mov dword ptr s_TotalVUCycles, 0
|
||||
add esp, 4
|
||||
mov dword ptr [s_callstack], eax
|
||||
call SuperVUGetProgram
|
||||
mov s_vu1esi, esi
|
||||
mov s_vuedi, edi
|
||||
mov s_vuebx, ebx
|
||||
|
||||
mov s_vu1esp, esp
|
||||
and esp, -16 // align stack for GCC compilance
|
||||
|
||||
ldmxcsr g_sseVUMXCSR
|
||||
mov dword ptr s_writeQ, 0xffffffff
|
||||
mov dword ptr s_writeP, 0xffffffff
|
||||
jmp eax
|
||||
|
||||
.globl SuperVUEndProgram
|
||||
SuperVUEndProgram:
|
||||
// restore cpu state
|
||||
ldmxcsr g_sseMXCSR
|
||||
mov esi, s_vu1esi
|
||||
mov edi, s_vuedi
|
||||
mov ebx, s_vuebx
|
||||
|
||||
mov esp, s_vu1esp
|
||||
|
||||
call SuperVUCleanupProgram
|
||||
jmp [s_callstack] // so returns correctly
|
||||
|
||||
#if defined(__POSIX__) && defined(__ELF__)
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
#endif
|
|
@ -167,62 +167,6 @@ int _allocTempXMMreg(XMMSSEType type, int xmmreg) {
|
|||
return xmmreg;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
int _allocVFtoXMMreg(VURegs *VU, int xmmreg, int vfreg, int mode) {
|
||||
int i;
|
||||
int readfromreg = -1;
|
||||
|
||||
for (i=0; (uint)i<iREGCNT_XMM; i++) {
|
||||
if ((xmmregs[i].inuse == 0) || (xmmregs[i].type != XMMTYPE_VFREG) ||
|
||||
(xmmregs[i].reg != vfreg) || (xmmregs[i].VU != XMM_CONV_VU(VU)))
|
||||
continue;
|
||||
|
||||
if( xmmreg >= 0 ) {
|
||||
// requested specific reg, so return that instead
|
||||
if( i != xmmreg ) {
|
||||
if( xmmregs[i].mode & MODE_READ ) readfromreg = i;
|
||||
//if( xmmregs[i].mode & MODE_WRITE ) mode |= MODE_WRITE;
|
||||
mode |= xmmregs[i].mode&MODE_WRITE;
|
||||
xmmregs[i].inuse = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
xmmregs[i].needed = 1;
|
||||
|
||||
if( !(xmmregs[i].mode & MODE_READ) && (mode&MODE_READ) ) {
|
||||
xMOVAPS(xRegisterSSE(i), ptr[(void*)(VU_VFx_ADDR(vfreg))]);
|
||||
xmmregs[i].mode |= MODE_READ;
|
||||
}
|
||||
|
||||
g_xmmtypes[i] = XMMT_FPS;
|
||||
xmmregs[i].counter = g_xmmAllocCounter++; // update counter
|
||||
xmmregs[i].mode|= mode;
|
||||
return i;
|
||||
}
|
||||
|
||||
if (xmmreg == -1)
|
||||
xmmreg = _getFreeXMMreg();
|
||||
else
|
||||
_freeXMMreg(xmmreg);
|
||||
|
||||
g_xmmtypes[xmmreg] = XMMT_FPS;
|
||||
xmmregs[xmmreg].inuse = 1;
|
||||
xmmregs[xmmreg].type = XMMTYPE_VFREG;
|
||||
xmmregs[xmmreg].reg = vfreg;
|
||||
xmmregs[xmmreg].mode = mode;
|
||||
xmmregs[xmmreg].needed = 1;
|
||||
xmmregs[xmmreg].VU = XMM_CONV_VU(VU);
|
||||
xmmregs[xmmreg].counter = g_xmmAllocCounter++;
|
||||
if (mode & MODE_READ) {
|
||||
if( readfromreg >= 0 ) xMOVAPS(xRegisterSSE(xmmreg), xRegisterSSE(readfromreg));
|
||||
else xMOVAPS(xRegisterSSE(xmmreg), ptr[(void*)(VU_VFx_ADDR(xmmregs[xmmreg].reg))]);
|
||||
}
|
||||
|
||||
return xmmreg;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Search register "reg" of type "type" which is inuse
|
||||
// If register doesn't have the read flag but mode is read
|
||||
// then populate the register from the memory
|
||||
|
@ -258,65 +202,6 @@ int _checkXMMreg(int type, int reg, int mode)
|
|||
return -1;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
int _allocACCtoXMMreg(VURegs *VU, int xmmreg, int mode) {
|
||||
int i;
|
||||
int readfromreg = -1;
|
||||
|
||||
for (i=0; (uint)i<iREGCNT_XMM; i++) {
|
||||
if (xmmregs[i].inuse == 0) continue;
|
||||
if (xmmregs[i].type != XMMTYPE_ACC) continue;
|
||||
if (xmmregs[i].VU != XMM_CONV_VU(VU) ) continue;
|
||||
|
||||
if( xmmreg >= 0 ) {
|
||||
// requested specific reg, so return that instead
|
||||
if( i != xmmreg ) {
|
||||
if( xmmregs[i].mode & MODE_READ ) readfromreg = i;
|
||||
//if( xmmregs[i].mode & MODE_WRITE ) mode |= MODE_WRITE;
|
||||
mode |= xmmregs[i].mode&MODE_WRITE;
|
||||
xmmregs[i].inuse = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( !(xmmregs[i].mode & MODE_READ) && (mode&MODE_READ)) {
|
||||
xMOVAPS(xRegisterSSE(i), ptr[(void*)(VU_ACCx_ADDR)]);
|
||||
xmmregs[i].mode |= MODE_READ;
|
||||
}
|
||||
|
||||
g_xmmtypes[i] = XMMT_FPS;
|
||||
xmmregs[i].counter = g_xmmAllocCounter++; // update counter
|
||||
xmmregs[i].needed = 1;
|
||||
xmmregs[i].mode|= mode;
|
||||
return i;
|
||||
}
|
||||
|
||||
if (xmmreg == -1)
|
||||
xmmreg = _getFreeXMMreg();
|
||||
else
|
||||
_freeXMMreg(xmmreg);
|
||||
|
||||
g_xmmtypes[xmmreg] = XMMT_FPS;
|
||||
xmmregs[xmmreg].inuse = 1;
|
||||
xmmregs[xmmreg].type = XMMTYPE_ACC;
|
||||
xmmregs[xmmreg].mode = mode;
|
||||
xmmregs[xmmreg].needed = 1;
|
||||
xmmregs[xmmreg].VU = XMM_CONV_VU(VU);
|
||||
xmmregs[xmmreg].counter = g_xmmAllocCounter++;
|
||||
xmmregs[xmmreg].reg = 0;
|
||||
|
||||
if (mode & MODE_READ)
|
||||
{
|
||||
if( readfromreg >= 0 )
|
||||
xMOVAPS(xRegisterSSE(xmmreg), xRegisterSSE(readfromreg));
|
||||
else
|
||||
xMOVAPS(xRegisterSSE(xmmreg), ptr[(void*)(VU_ACCx_ADDR)]);
|
||||
}
|
||||
|
||||
return xmmreg;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Fully allocate a FPU register
|
||||
// first trial:
|
||||
// search an already reserved reg then populate it if we read it
|
||||
|
@ -479,21 +364,6 @@ int _allocFPACCtoXMMreg(int xmmreg, int mode)
|
|||
return xmmreg;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
void _addNeededVFtoXMMreg(int vfreg) {
|
||||
int i;
|
||||
|
||||
for (i=0; (uint)i<iREGCNT_XMM; i++) {
|
||||
if (xmmregs[i].inuse == 0) continue;
|
||||
if (xmmregs[i].type != XMMTYPE_VFREG) continue;
|
||||
if (xmmregs[i].reg != vfreg) continue;
|
||||
|
||||
xmmregs[i].counter = g_xmmAllocCounter++; // update counter
|
||||
xmmregs[i].needed = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Mark reserved GPR reg as needed. It won't be evicted anymore.
|
||||
// You must use _clearNeededXMMregs to clear the flag
|
||||
void _addNeededGPRtoXMMreg(int gprreg)
|
||||
|
@ -511,21 +381,6 @@ void _addNeededGPRtoXMMreg(int gprreg)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
void _addNeededACCtoXMMreg() {
|
||||
int i;
|
||||
|
||||
for (i=0; (uint)i<iREGCNT_XMM; i++) {
|
||||
if (xmmregs[i].inuse == 0) continue;
|
||||
if (xmmregs[i].type != XMMTYPE_ACC) continue;
|
||||
|
||||
xmmregs[i].counter = g_xmmAllocCounter++; // update counter
|
||||
xmmregs[i].needed = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Mark reserved FPU reg as needed. It won't be evicted anymore.
|
||||
// You must use _clearNeededXMMregs to clear the flag
|
||||
void _addNeededFPtoXMMreg(int fpreg) {
|
||||
|
@ -578,142 +433,6 @@ void _clearNeededXMMregs() {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
void _deleteVFtoXMMreg(int reg, int vu, int flush)
|
||||
{
|
||||
int i;
|
||||
VURegs *VU = vu ? &VU1 : &VU0;
|
||||
|
||||
for (i=0; (uint)i<iREGCNT_XMM; i++)
|
||||
{
|
||||
if (xmmregs[i].inuse && (xmmregs[i].type == XMMTYPE_VFREG) &&
|
||||
(xmmregs[i].reg == reg) && (xmmregs[i].VU == vu))
|
||||
{
|
||||
switch(flush) {
|
||||
case 0:
|
||||
_freeXMMreg(i);
|
||||
break;
|
||||
case 1:
|
||||
if( xmmregs[i].mode & MODE_WRITE )
|
||||
{
|
||||
pxAssert( reg != 0 );
|
||||
|
||||
if( xmmregs[i].mode & MODE_VUXYZ )
|
||||
{
|
||||
if( xmmregs[i].mode & MODE_VUZ )
|
||||
{
|
||||
// xyz, don't destroy w
|
||||
uint t0reg;
|
||||
|
||||
for (t0reg = 0; t0reg < iREGCNT_XMM; ++t0reg)
|
||||
{
|
||||
if (!xmmregs[t0reg].inuse )
|
||||
break;
|
||||
}
|
||||
|
||||
if (t0reg < iREGCNT_XMM )
|
||||
{
|
||||
xMOVHL.PS(xRegisterSSE(t0reg), xRegisterSSE(i));
|
||||
xMOVL.PS(ptr[(void*)(VU_VFx_ADDR(xmmregs[i].reg))], xRegisterSSE(i));
|
||||
xMOVSS(ptr[(void*)(VU_VFx_ADDR(xmmregs[i].reg)+8)], xRegisterSSE(t0reg));
|
||||
}
|
||||
else
|
||||
{
|
||||
// no free reg
|
||||
xMOVL.PS(ptr[(void*)(VU_VFx_ADDR(xmmregs[i].reg))], xRegisterSSE(i));
|
||||
xSHUF.PS(xRegisterSSE(i), xRegisterSSE(i), 0xc6);
|
||||
xMOVSS(ptr[(void*)(VU_VFx_ADDR(xmmregs[i].reg)+8)], xRegisterSSE(i));
|
||||
xSHUF.PS(xRegisterSSE(i), xRegisterSSE(i), 0xc6);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// xy
|
||||
xMOVL.PS(ptr[(void*)(VU_VFx_ADDR(xmmregs[i].reg))], xRegisterSSE(i));
|
||||
}
|
||||
}
|
||||
else xMOVAPS(ptr[(void*)(VU_VFx_ADDR(xmmregs[i].reg))], xRegisterSSE(i));
|
||||
|
||||
// get rid of MODE_WRITE since don't want to flush again
|
||||
xmmregs[i].mode &= ~MODE_WRITE;
|
||||
xmmregs[i].mode |= MODE_READ;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
xmmregs[i].inuse = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
void _deleteACCtoXMMreg(int vu, int flush)
|
||||
{
|
||||
int i;
|
||||
VURegs *VU = vu ? &VU1 : &VU0;
|
||||
|
||||
for (i=0; (uint)i<iREGCNT_XMM; i++) {
|
||||
if (xmmregs[i].inuse && (xmmregs[i].type == XMMTYPE_ACC) && (xmmregs[i].VU == vu)) {
|
||||
|
||||
switch(flush) {
|
||||
case 0:
|
||||
_freeXMMreg(i);
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
if( xmmregs[i].mode & MODE_WRITE ) {
|
||||
|
||||
if( xmmregs[i].mode & MODE_VUXYZ ) {
|
||||
|
||||
if( xmmregs[i].mode & MODE_VUZ ) {
|
||||
// xyz, don't destroy w
|
||||
uint t0reg;
|
||||
for(t0reg = 0; t0reg < iREGCNT_XMM; ++t0reg ) {
|
||||
if( !xmmregs[t0reg].inuse ) break;
|
||||
}
|
||||
|
||||
if( t0reg < iREGCNT_XMM ) {
|
||||
xMOVHL.PS(xRegisterSSE(t0reg), xRegisterSSE(i));
|
||||
xMOVL.PS(ptr[(void*)(VU_ACCx_ADDR)], xRegisterSSE(i));
|
||||
xMOVSS(ptr[(void*)(VU_ACCx_ADDR+8)], xRegisterSSE(t0reg));
|
||||
}
|
||||
else {
|
||||
// no free reg
|
||||
xMOVL.PS(ptr[(void*)(VU_ACCx_ADDR)], xRegisterSSE(i));
|
||||
xSHUF.PS(xRegisterSSE(i), xRegisterSSE(i), 0xc6);
|
||||
//xMOVHL.PS(xRegisterSSE(i), xRegisterSSE(i));
|
||||
xMOVSS(ptr[(void*)(VU_ACCx_ADDR+8)], xRegisterSSE(i));
|
||||
xSHUF.PS(xRegisterSSE(i), xRegisterSSE(i), 0xc6);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// xy
|
||||
xMOVL.PS(ptr[(void*)(VU_ACCx_ADDR)], xRegisterSSE(i));
|
||||
}
|
||||
}
|
||||
else xMOVAPS(ptr[(void*)(VU_ACCx_ADDR)], xRegisterSSE(i));
|
||||
|
||||
// get rid of MODE_WRITE since don't want to flush again
|
||||
xmmregs[i].mode &= ~MODE_WRITE;
|
||||
xmmregs[i].mode |= MODE_READ;
|
||||
}
|
||||
|
||||
if( flush == 2 )
|
||||
xmmregs[i].inuse = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Flush is 0: _freeXMMreg. Flush in memory if MODE_WRITE. Clear inuse
|
||||
// Flush is 1: Flush in memory. But register is still valid
|
||||
// Flush is 2: like 0 ...
|
||||
|
@ -946,29 +665,6 @@ u8 _hasFreeXMMreg()
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void _moveXMMreg(int xmmreg)
|
||||
{
|
||||
int i;
|
||||
if( !xmmregs[xmmreg].inuse ) return;
|
||||
|
||||
for (i=0; (uint)i<iREGCNT_XMM; i++) {
|
||||
if (xmmregs[i].inuse) continue;
|
||||
break;
|
||||
}
|
||||
|
||||
if( i == iREGCNT_XMM ) {
|
||||
_freeXMMreg(xmmreg);
|
||||
return;
|
||||
}
|
||||
|
||||
// move
|
||||
xmmregs[i] = xmmregs[xmmreg];
|
||||
xmmregs[xmmreg].inuse = 0;
|
||||
xMOVDQA(xRegisterSSE(i), xRegisterSSE(xmmreg));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Flush in memory all inuse registers but registers are still valid
|
||||
void _flushXMMregs()
|
||||
{
|
||||
|
@ -1093,27 +789,6 @@ u32 _recIsRegWritten(EEINST* pinst, int size, u8 xmmtype, u8 reg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
u32 _recIsRegUsed(EEINST* pinst, int size, u8 xmmtype, u8 reg)
|
||||
{
|
||||
u32 i, inst = 1;
|
||||
while(size-- > 0) {
|
||||
for(i = 0; i < ArraySize(pinst->writeType); ++i) {
|
||||
if( pinst->writeType[i] == xmmtype && pinst->writeReg[i] == reg )
|
||||
return inst;
|
||||
}
|
||||
for(i = 0; i < ArraySize(pinst->readType); ++i) {
|
||||
if( pinst->readType[i] == xmmtype && pinst->readReg[i] == reg )
|
||||
return inst;
|
||||
}
|
||||
++inst;
|
||||
pinst++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void _recFillRegister(EEINST& pinst, int type, int reg, int write)
|
||||
{
|
||||
u32 i = 0;
|
||||
|
|
|
@ -50,9 +50,6 @@
|
|||
|
||||
// used in VU recs
|
||||
#define PROCESS_VU_UPDATEFLAGS 0x10
|
||||
#ifndef DISABLE_SVU
|
||||
#define PROCESS_VU_SUPER 0x40 // set if using supervu recompilation
|
||||
#endif
|
||||
#define PROCESS_VU_COP2 0x80 // simple cop2
|
||||
|
||||
#define EEREC_S (((info)>>8)&0xf)
|
||||
|
@ -180,14 +177,6 @@ void _flushXMMregs();
|
|||
u8 _hasFreeXMMreg();
|
||||
void _freeXMMregs();
|
||||
int _getNumXMMwrite();
|
||||
#ifndef DISABLE_SVU
|
||||
int _allocVFtoXMMreg(VURegs *VU, int xmmreg, int vfreg, int mode);
|
||||
int _allocACCtoXMMreg(VURegs *VU, int xmmreg, int mode);
|
||||
void _addNeededVFtoXMMreg(int vfreg);
|
||||
void _addNeededACCtoXMMreg();
|
||||
void _deleteVFtoXMMreg(int reg, int vu, int flush);
|
||||
#endif
|
||||
|
||||
void _signExtendSFtoM(uptr mem);
|
||||
|
||||
// returns new index of reg, lower 32 bits already in mmx
|
||||
|
|
|
@ -21,10 +21,6 @@
|
|||
#include "iR5900.h"
|
||||
#include "iFPU.h"
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
#include "sVU_Micro.h"
|
||||
#endif
|
||||
|
||||
using namespace x86Emitter;
|
||||
|
||||
const __aligned16 u32 g_minvals[4] = {0xff7fffff, 0xff7fffff, 0xff7fffff, 0xff7fffff};
|
||||
|
|
|
@ -22,10 +22,6 @@
|
|||
#include "iR5900.h"
|
||||
#include "iFPU.h"
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
#include "sVU_Micro.h"
|
||||
#endif
|
||||
|
||||
/* This is a version of the FPU that emulates an exponent of 0xff and overflow/underflow flags */
|
||||
|
||||
/* Can be made faster by not converting stuff back and forth between instructions. */
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "IopCommon.h"
|
||||
#include "iCore.h"
|
||||
|
||||
#include "NakedAsm.h"
|
||||
#include "AppConfig.h"
|
||||
|
||||
#include "Utilities/Perf.h"
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#include "R5900_Profiler.h"
|
||||
|
||||
extern u32 maxrecmem;
|
||||
extern u32 pc; // recompiler pc (also used by the SuperVU! .. why? (air))
|
||||
extern int g_branch; // set for branch (also used by the SuperVU! .. why? (air))
|
||||
extern u32 pc; // recompiler pc
|
||||
extern int g_branch; // set for branch
|
||||
extern u32 target; // branch target
|
||||
extern u32 s_nBlockCycles; // cycles of current block recompiling
|
||||
|
||||
|
|
|
@ -1951,12 +1951,6 @@ StartRecomp:
|
|||
g_pCurInstInfo = s_pInstCache;
|
||||
|
||||
for(i = startpc; i < s_nEndBlock; i += 4) {
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
// superVU hack: it needs vucycles, for some reason. >_<
|
||||
extern int vucycle;
|
||||
#endif
|
||||
|
||||
g_pCurInstInfo++;
|
||||
cpuRegs.code = *(u32*)PSM(i);
|
||||
|
||||
|
@ -1965,9 +1959,6 @@ StartRecomp:
|
|||
|
||||
if( !usecop2 ) {
|
||||
// init
|
||||
#ifndef DISABLE_SVU
|
||||
vucycle = 0;
|
||||
#endif
|
||||
usecop2 = 1;
|
||||
}
|
||||
|
||||
|
@ -1975,13 +1966,6 @@ StartRecomp:
|
|||
_vuRegsCOP22( &VU0, &g_pCurInstInfo->vuregs );
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
// fixme - This should be based on the cycle count of the current EE
|
||||
// instruction being analyzed.
|
||||
if( usecop2 ) vucycle++;
|
||||
#endif
|
||||
|
||||
}
|
||||
// This *is* important because g_pCurInstInfo is checked a bit later on and
|
||||
// if it's not equal to s_pInstCache it handles recompilation differently.
|
||||
|
|
|
@ -573,10 +573,6 @@ void recSWC1()
|
|||
|
||||
void recLQC2()
|
||||
{
|
||||
#ifndef DISABLE_SVU
|
||||
_deleteVFtoXMMreg(_Ft_, 0, 2);
|
||||
#endif
|
||||
|
||||
if (_Rt_)
|
||||
xMOV(edx, (uptr)&VU0.VF[_Ft_].UD[0]);
|
||||
else
|
||||
|
@ -606,10 +602,6 @@ void recLQC2()
|
|||
|
||||
void recSQC2()
|
||||
{
|
||||
#ifndef DISABLE_SVU
|
||||
_deleteVFtoXMMreg(_Ft_, 0, 1); //Want to flush it but not clear it
|
||||
#endif
|
||||
|
||||
xMOV(edx, (uptr)&VU0.VF[_Ft_].UD[0]);
|
||||
|
||||
if (GPR_IS_CONST1(_Rs_))
|
||||
|
|
|
@ -25,11 +25,6 @@
|
|||
#include "VU.h"
|
||||
#include "VUmicro.h"
|
||||
|
||||
#ifndef DISABLE_SVU
|
||||
#include "sVU_Micro.h"
|
||||
#include "sVU_zerorec.h"
|
||||
#endif
|
||||
|
||||
#include "vtlb.h"
|
||||
|
||||
using namespace x86Emitter;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,267 +0,0 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VUmicro.h"
|
||||
|
||||
extern u32 vudump;
|
||||
|
||||
u32 GetVIAddr(VURegs * VU, int reg, int read, int info); // returns the correct VI addr
|
||||
void recUpdateFlags(VURegs * VU, int reg, int info);
|
||||
|
||||
void _recvuTestPipes(VURegs * VU);
|
||||
void _recvuFlushFDIV(VURegs * VU);
|
||||
void _recvuTestUpperStalls(VURegs * VU, _VURegsNum *VUregsn);
|
||||
void _recvuTestLowerStalls(VURegs * VU, _VURegsNum *VUregsn);
|
||||
void _recvuAddUpperStalls(VURegs * VU, _VURegsNum *VUregsn);
|
||||
void _recvuAddLowerStalls(VURegs * VU, _VURegsNum *VUregsn);
|
||||
|
||||
#define VUOP_READ 2
|
||||
#define VUOP_WRITE 4
|
||||
|
||||
// save on mem
|
||||
struct _vuopinfo {
|
||||
int cycle;
|
||||
int cycles;
|
||||
u8 statusflag;
|
||||
u8 macflag;
|
||||
u8 clipflag;
|
||||
u8 dummy;
|
||||
u8 q;
|
||||
u8 p;
|
||||
u16 pqinst; // bit of instruction specifying index (srec only)
|
||||
};
|
||||
|
||||
void SuperVUAnalyzeOp(VURegs *VU, _vuopinfo *info, _VURegsNum* pCodeRegs);
|
||||
int eeVURecompileCode(VURegs *VU, _VURegsNum* regs); // allocates all the necessary regs and returns the indices
|
||||
void __fastcall VU1XGKICK_MTGSTransfer(u32 addr); // used for MTGS in XGKICK
|
||||
|
||||
extern int vucycle;
|
||||
typedef void (*vFloat)(int regd, int regTemp);
|
||||
extern vFloat vFloats1[16];
|
||||
extern vFloat vFloats1_useEAX[16];
|
||||
extern vFloat vFloats2[16];
|
||||
extern vFloat vFloats4[16];
|
||||
extern vFloat vFloats4_useEAX[16];
|
||||
extern const __aligned16 float s_fones[8];
|
||||
extern const __aligned16 u32 s_mask[4];
|
||||
extern const __aligned16 u32 s_expmask[4];
|
||||
extern const __aligned16 u32 const_clip[8];
|
||||
|
||||
u32 GetVIAddr(VURegs * VU, int reg, int read, int info);
|
||||
int _vuGetTempXMMreg(int info);
|
||||
void vuFloat(int info, int regd, int XYZW);
|
||||
void vuFloat_useEAX(int regd, int regTemp, int XYZW);
|
||||
void vuFloat2(int regd, int regTemp, int XYZW);
|
||||
void vuFloat3(uptr x86ptr);
|
||||
void vuFloat4(int regd, int regTemp, int XYZW);
|
||||
void vuFloat4_useEAX(int regd, int regTemp, int XYZW);
|
||||
void vuFloat5(int regd, int regTemp, int XYZW);
|
||||
void vuFloat5_useEAX(int regd, int regTemp, int XYZW);
|
||||
void _vuFlipRegSS(VURegs * VU, int reg);
|
||||
void _vuFlipRegSS_xyzw(int reg, int xyzw);
|
||||
void _vuMoveSS(VURegs * VU, int dstreg, int srcreg);
|
||||
void _unpackVF_xyzw(int dstreg, int srcreg, int xyzw);
|
||||
void _unpackVFSS_xyzw(int dstreg, int srcreg, int xyzw);
|
||||
void VU_MERGE_REGS_CUSTOM(int dest, int src, int xyzw);
|
||||
void VU_MERGE_REGS_SAFE(int dest, int src, int xyzw);
|
||||
#define VU_MERGE_REGS(dest, src) { \
|
||||
VU_MERGE_REGS_CUSTOM(dest, src, _X_Y_Z_W); \
|
||||
}
|
||||
|
||||
// use for allocating vi regs
|
||||
#define ALLOCTEMPX86(mode) _allocX86reg(xEmptyReg, X86TYPE_TEMP, 0, ((info&PROCESS_VU_SUPER)?0:MODE_NOFRAME)|mode)
|
||||
#define ALLOCVI(vi, mode) _allocX86reg(xEmptyReg, X86TYPE_VI|((VU==&VU1)?X86TYPE_VU1:0), vi, ((info&PROCESS_VU_SUPER)?0:MODE_NOFRAME)|mode)
|
||||
#define ADD_VI_NEEDED(vi) _addNeededX86reg(X86TYPE_VI|(VU==&VU1?X86TYPE_VU1:0), vi);
|
||||
|
||||
#define SWAP(x, y) *(u32*)&y ^= *(u32*)&x ^= *(u32*)&y ^= *(u32*)&x;
|
||||
|
||||
/*****************************************
|
||||
VU Micromode Upper instructions
|
||||
*****************************************/
|
||||
|
||||
void recVUMI_ABS(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADD(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDi(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDq(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDx(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDy(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDz(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDw(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDA(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDAi(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDAq(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDAx(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDAy(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDAz(VURegs *vuRegs, int info);
|
||||
void recVUMI_ADDAw(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUB(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBi(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBq(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBx(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBy(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBz(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBw(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBA(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBAi(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBAq(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBAx(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBAy(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBAz(VURegs *vuRegs, int info);
|
||||
void recVUMI_SUBAw(VURegs *vuRegs, int info);
|
||||
void recVUMI_MUL(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULi(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULq(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULx(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULy(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULz(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULw(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULA(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULAi(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULAq(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULAx(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULAy(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULAz(VURegs *vuRegs, int info);
|
||||
void recVUMI_MULAw(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADD(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDi(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDq(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDx(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDy(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDz(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDw(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDA(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDAi(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDAq(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDAx(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDAy(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDAz(VURegs *vuRegs, int info);
|
||||
void recVUMI_MADDAw(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUB(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBi(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBq(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBx(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBy(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBz(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBw(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBA(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBAi(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBAq(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBAx(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBAy(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBAz(VURegs *vuRegs, int info);
|
||||
void recVUMI_MSUBAw(VURegs *vuRegs, int info);
|
||||
void recVUMI_MAX(VURegs *vuRegs, int info);
|
||||
void recVUMI_MAXi(VURegs *vuRegs, int info);
|
||||
void recVUMI_MAXx(VURegs *vuRegs, int info);
|
||||
void recVUMI_MAXy(VURegs *vuRegs, int info);
|
||||
void recVUMI_MAXz(VURegs *vuRegs, int info);
|
||||
void recVUMI_MAXw(VURegs *vuRegs, int info);
|
||||
void recVUMI_MINI(VURegs *vuRegs, int info);
|
||||
void recVUMI_MINIi(VURegs *vuRegs, int info);
|
||||
void recVUMI_MINIx(VURegs *vuRegs, int info);
|
||||
void recVUMI_MINIy(VURegs *vuRegs, int info);
|
||||
void recVUMI_MINIz(VURegs *vuRegs, int info);
|
||||
void recVUMI_MINIw(VURegs *vuRegs, int info);
|
||||
void recVUMI_OPMULA(VURegs *vuRegs, int info);
|
||||
void recVUMI_OPMSUB(VURegs *vuRegs, int info);
|
||||
void recVUMI_NOP(VURegs *vuRegs, int info);
|
||||
void recVUMI_FTOI0(VURegs *vuRegs, int info);
|
||||
void recVUMI_FTOI4(VURegs *vuRegs, int info);
|
||||
void recVUMI_FTOI12(VURegs *vuRegs, int info);
|
||||
void recVUMI_FTOI15(VURegs *vuRegs, int info);
|
||||
void recVUMI_ITOF0(VURegs *vuRegs, int info);
|
||||
void recVUMI_ITOF4(VURegs *vuRegs, int info);
|
||||
void recVUMI_ITOF12(VURegs *vuRegs, int info);
|
||||
void recVUMI_ITOF15(VURegs *vuRegs, int info);
|
||||
void recVUMI_CLIP(VURegs *vuRegs, int info);
|
||||
|
||||
/*****************************************
|
||||
VU Micromode Lower instructions
|
||||
*****************************************/
|
||||
|
||||
void recVUMI_DIV(VURegs *vuRegs, int info);
|
||||
void recVUMI_SQRT(VURegs *vuRegs, int info);
|
||||
void recVUMI_RSQRT(VURegs *vuRegs, int info);
|
||||
void recVUMI_IADD(VURegs *vuRegs, int info);
|
||||
void recVUMI_IADDI(VURegs *vuRegs, int info);
|
||||
void recVUMI_IADDIU(VURegs *vuRegs, int info);
|
||||
void recVUMI_IAND(VURegs *vuRegs, int info);
|
||||
void recVUMI_IOR(VURegs *vuRegs, int info);
|
||||
void recVUMI_ISUB(VURegs *vuRegs, int info);
|
||||
void recVUMI_ISUBIU(VURegs *vuRegs, int info);
|
||||
void recVUMI_MOVE(VURegs *vuRegs, int info);
|
||||
void recVUMI_MFIR(VURegs *vuRegs, int info);
|
||||
void recVUMI_MTIR(VURegs *vuRegs, int info);
|
||||
void recVUMI_MR32(VURegs *vuRegs, int info);
|
||||
void recVUMI_LQ(VURegs *vuRegs, int info);
|
||||
void recVUMI_LQD(VURegs *vuRegs, int info);
|
||||
void recVUMI_LQI(VURegs *vuRegs, int info);
|
||||
void recVUMI_SQ(VURegs *vuRegs, int info);
|
||||
void recVUMI_SQD(VURegs *vuRegs, int info);
|
||||
void recVUMI_SQI(VURegs *vuRegs, int info);
|
||||
void recVUMI_ILW(VURegs *vuRegs, int info);
|
||||
void recVUMI_ISW(VURegs *vuRegs, int info);
|
||||
void recVUMI_ILWR(VURegs *vuRegs, int info);
|
||||
void recVUMI_ISWR(VURegs *vuRegs, int info);
|
||||
void recVUMI_LOI(VURegs *vuRegs, int info);
|
||||
void recVUMI_RINIT(VURegs *vuRegs, int info);
|
||||
void recVUMI_RGET(VURegs *vuRegs, int info);
|
||||
void recVUMI_RNEXT(VURegs *vuRegs, int info);
|
||||
void recVUMI_RXOR(VURegs *vuRegs, int info);
|
||||
void recVUMI_WAITQ(VURegs *vuRegs, int info);
|
||||
void recVUMI_FSAND(VURegs *vuRegs, int info);
|
||||
void recVUMI_FSEQ(VURegs *vuRegs, int info);
|
||||
void recVUMI_FSOR(VURegs *vuRegs, int info);
|
||||
void recVUMI_FSSET(VURegs *vuRegs, int info);
|
||||
void recVUMI_FMAND(VURegs *vuRegs, int info);
|
||||
void recVUMI_FMEQ(VURegs *vuRegs, int info);
|
||||
void recVUMI_FMOR(VURegs *vuRegs, int info);
|
||||
void recVUMI_FCAND(VURegs *vuRegs, int info);
|
||||
void recVUMI_FCEQ(VURegs *vuRegs, int info);
|
||||
void recVUMI_FCOR(VURegs *vuRegs, int info);
|
||||
void recVUMI_FCSET(VURegs *vuRegs, int info);
|
||||
void recVUMI_FCGET(VURegs *vuRegs, int info);
|
||||
void recVUMI_IBEQ(VURegs *vuRegs, int info);
|
||||
void recVUMI_IBGEZ(VURegs *vuRegs, int info);
|
||||
void recVUMI_IBGTZ(VURegs *vuRegs, int info);
|
||||
void recVUMI_IBLTZ(VURegs *vuRegs, int info);
|
||||
void recVUMI_IBLEZ(VURegs *vuRegs, int info);
|
||||
void recVUMI_IBNE(VURegs *vuRegs, int info);
|
||||
void recVUMI_B(VURegs *vuRegs, int info);
|
||||
void recVUMI_BAL(VURegs *vuRegs, int info);
|
||||
void recVUMI_JR(VURegs *vuRegs, int info);
|
||||
void recVUMI_JALR(VURegs *vuRegs, int info);
|
||||
void recVUMI_MFP(VURegs *vuRegs, int info);
|
||||
void recVUMI_WAITP(VURegs *vuRegs, int info);
|
||||
void recVUMI_ESADD(VURegs *vuRegs, int info);
|
||||
void recVUMI_ERSADD(VURegs *vuRegs, int info);
|
||||
void recVUMI_ELENG(VURegs *vuRegs, int info);
|
||||
void recVUMI_ERLENG(VURegs *vuRegs, int info);
|
||||
void recVUMI_EATANxy(VURegs *vuRegs, int info);
|
||||
void recVUMI_EATANxz(VURegs *vuRegs, int info);
|
||||
void recVUMI_ESUM(VURegs *vuRegs, int info);
|
||||
void recVUMI_ERCPR(VURegs *vuRegs, int info);
|
||||
void recVUMI_ESQRT(VURegs *vuRegs, int info);
|
||||
void recVUMI_ERSQRT(VURegs *vuRegs, int info);
|
||||
void recVUMI_ESIN(VURegs *vuRegs, int info);
|
||||
void recVUMI_EATAN(VURegs *vuRegs, int info);
|
||||
void recVUMI_EEXP(VURegs *vuRegs, int info);
|
||||
void recVUMI_XGKICK(VURegs *vuRegs, int info);
|
||||
void recVUMI_XTOP(VURegs *vuRegs, int info);
|
||||
void recVUMI_XITOP(VURegs *vuRegs, int info);
|
||||
void recVUMI_XTOP( VURegs *VU , int info);
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,42 +0,0 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Super VU recompiler - author: zerofrog(@gmail.com)
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sVU_Micro.h"
|
||||
|
||||
//Using assembly code from an external file.
|
||||
#ifdef __POSIX__
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void SuperVUExecuteProgram(u32 startpc, int vuindex);
|
||||
extern void SuperVUEndProgram();
|
||||
extern void svudispfntemp();
|
||||
#ifdef __POSIX__
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void SuperVUDestroy(int vuindex);
|
||||
extern void SuperVUReset(int vuindex);
|
||||
|
||||
// read = 0, will write to reg
|
||||
// read = 1, will read from reg
|
||||
// read = 2, addr of previously written reg (used for status and clip flags)
|
||||
extern u32 SuperVUGetVIAddr(int reg, int read);
|
||||
|
||||
// if p == 0, flush q else flush p; if wait is != 0, waits for p/q
|
||||
extern void SuperVUFlush(int p, int wait);
|
Loading…
Reference in New Issue