Skip to content

Commit

Permalink
GPU: Remove JumpFast/CallFast. They only avoid a very quick check and…
Browse files Browse the repository at this point in the history
… not worth the unsafety.
  • Loading branch information
hrydgard committed May 5, 2023
1 parent fea78f9 commit 640c4fe
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 23 deletions.
13 changes: 0 additions & 13 deletions GPU/GPUCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions GPU/GPUCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,8 @@ class GPUCommon : public GPUInterface, public GPUDebugInterface {
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);

Expand Down
8 changes: 0 additions & 8 deletions GPU/GPUCommonHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 640c4fe

Please sign in to comment.