From 640c4fe9e1253047abd7ca33e9320330f7583a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 5 May 2023 23:44:19 +0200 Subject: [PATCH] GPU: Remove JumpFast/CallFast. They only avoid a very quick check and not worth the unsafety. --- GPU/GPUCommon.cpp | 13 ------------- GPU/GPUCommon.h | 2 -- GPU/GPUCommonHW.cpp | 8 -------- 3 files changed, 23 deletions(-) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 5091c4350d..97611a7617 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -953,12 +953,6 @@ void GPUCommon::Execute_Jump(u32 op, u32 diff) { currentList->pc = target - 4; // pc will be increased after we return, counteract that } -void GPUCommon::Execute_JumpFast(u32 op, u32 diff) { - const u32 target = gstate_c.getRelativeAddress(op & 0x00FFFFFC); - UpdatePC(currentList->pc, target - 4); - currentList->pc = target - 4; // pc will be increased after we return, counteract that -} - void GPUCommon::Execute_BJump(u32 op, u32 diff) { if (!currentList->bboxResult) { // bounding box jump. @@ -985,13 +979,6 @@ void GPUCommon::Execute_Call(u32 op, u32 diff) { DoExecuteCall(target); } -void GPUCommon::Execute_CallFast(u32 op, u32 diff) { - PROFILE_THIS_SCOPE("gpu_call"); - - const u32 target = gstate_c.getRelativeAddress(op & 0x00FFFFFC); - DoExecuteCall(target); -} - void GPUCommon::DoExecuteCall(u32 target) { // Saint Seiya needs correct support for relative calls. const u32 retval = currentList->pc + 4; diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index e8dc1abd99..0e70b2ab9e 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -140,10 +140,8 @@ public: void Execute_Iaddr(u32 op, u32 diff); void Execute_Origin(u32 op, u32 diff); void Execute_Jump(u32 op, u32 diff); - void Execute_JumpFast(u32 op, u32 diff); void Execute_BJump(u32 op, u32 diff); void Execute_Call(u32 op, u32 diff); - void Execute_CallFast(u32 op, u32 diff); void Execute_Ret(u32 op, u32 diff); void Execute_End(u32 op, u32 diff); diff --git a/GPU/GPUCommonHW.cpp b/GPU/GPUCommonHW.cpp index 51cd770fe6..d86200b991 100644 --- a/GPU/GPUCommonHW.cpp +++ b/GPU/GPUCommonHW.cpp @@ -442,14 +442,6 @@ void GPUCommonHW::UpdateCmdInfo() { cmdInfo_[GE_CMD_VERTEXTYPE].func = &GPUCommonHW::Execute_VertexType; } - if (g_Config.bFastMemory) { - cmdInfo_[GE_CMD_JUMP].func = &GPUCommon::Execute_JumpFast; - cmdInfo_[GE_CMD_CALL].func = &GPUCommon::Execute_CallFast; - } else { - cmdInfo_[GE_CMD_JUMP].func = &GPUCommon::Execute_Jump; - cmdInfo_[GE_CMD_CALL].func = &GPUCommon::Execute_Call; - } - // Reconfigure for light ubershader or not. for (int i = 0; i < 4; i++) { if (gstate_c.Use(GPU_USE_LIGHT_UBERSHADER)) {