This commit is contained in:
Jean-Philip Desjardins 2022-12-07 14:45:20 -05:00
parent 856ee23e83
commit e283a2fc79
6 changed files with 5 additions and 23 deletions

View file

@ -448,10 +448,8 @@ MIPS_BRANCH_TYPE CCOP_FPU::IsBranch(uint32 nOpcode)
uint32 CCOP_FPU::GetEffectiveAddress(uint32 nAddress, uint32 nOpcode) uint32 CCOP_FPU::GetEffectiveAddress(uint32 nAddress, uint32 nOpcode)
{ {
if(nOpcode == 0) return 0;
INSTRUCTION Instr; INSTRUCTION Instr;
Instr.pGetEffectiveAddress = SubTableEffAddr; Instr.pGetEffectiveAddress = SubTableEffAddr;
Instr.pSubTable = &m_reflGeneralTable; Instr.pSubTable = &m_reflGeneralTable;
return Instr.pGetEffectiveAddress(&Instr, NULL, nAddress, nOpcode); return Instr.pGetEffectiveAddress(&Instr, nullptr, nAddress, nOpcode);
} }

View file

@ -443,10 +443,8 @@ MIPS_BRANCH_TYPE CCOP_SCU::IsBranch(uint32 nOpcode)
uint32 CCOP_SCU::GetEffectiveAddress(uint32 nAddress, uint32 nOpcode) uint32 CCOP_SCU::GetEffectiveAddress(uint32 nAddress, uint32 nOpcode)
{ {
if(nOpcode == 0) return 0;
INSTRUCTION Instr; INSTRUCTION Instr;
Instr.pGetEffectiveAddress = SubTableEffAddr; Instr.pGetEffectiveAddress = SubTableEffAddr;
Instr.pSubTable = &m_ReflGeneralTable; Instr.pSubTable = &m_ReflGeneralTable;
return Instr.pGetEffectiveAddress(&Instr, NULL, nAddress, nOpcode); return Instr.pGetEffectiveAddress(&Instr, nullptr, nAddress, nOpcode);
} }

View file

@ -498,9 +498,6 @@ MIPS_BRANCH_TYPE CMA_MIPSIV::IsInstructionBranch(CMIPS* pCtx, uint32 nAddress, u
uint32 CMA_MIPSIV::GetInstructionEffectiveAddress(CMIPS* pCtx, uint32 nAddress, uint32 nOpcode) uint32 CMA_MIPSIV::GetInstructionEffectiveAddress(CMIPS* pCtx, uint32 nAddress, uint32 nOpcode)
{ {
INSTRUCTION Instr; INSTRUCTION Instr;
if(nOpcode == 0) return 0;
Instr.pGetEffectiveAddress = SubTableEffAddr; Instr.pGetEffectiveAddress = SubTableEffAddr;
Instr.pSubTable = &m_ReflGeneralTable; Instr.pSubTable = &m_ReflGeneralTable;
return Instr.pGetEffectiveAddress(&Instr, pCtx, nAddress, nOpcode); return Instr.pGetEffectiveAddress(&Instr, pCtx, nAddress, nOpcode);

View file

@ -4,7 +4,3 @@ CMIPSCoprocessor::CMIPSCoprocessor(MIPS_REGSIZE nRegSize)
: CMIPSInstructionFactory(nRegSize) : CMIPSInstructionFactory(nRegSize)
{ {
} }
CMIPSCoprocessor::~CMIPSCoprocessor()
{
}

View file

@ -1,5 +1,4 @@
#ifndef _MIPSCOPROCESSOR_H_ #pragma once
#define _MIPSCOPROCESSOR_H_
#include "MIPSInstructionFactory.h" #include "MIPSInstructionFactory.h"
@ -7,11 +6,9 @@ class CMIPSCoprocessor : public CMIPSInstructionFactory
{ {
public: public:
CMIPSCoprocessor(MIPS_REGSIZE); CMIPSCoprocessor(MIPS_REGSIZE);
virtual ~CMIPSCoprocessor(); virtual ~CMIPSCoprocessor() = default;
virtual void GetInstruction(uint32, char*) = 0; virtual void GetInstruction(uint32, char*) = 0;
virtual void GetArguments(uint32, uint32, char*) = 0; virtual void GetArguments(uint32, uint32, char*) = 0;
virtual uint32 GetEffectiveAddress(uint32, uint32) = 0; virtual uint32 GetEffectiveAddress(uint32, uint32) = 0;
virtual MIPS_BRANCH_TYPE IsBranch(uint32) = 0; virtual MIPS_BRANCH_TYPE IsBranch(uint32) = 0;
}; };
#endif

View file

@ -560,12 +560,8 @@ MIPS_BRANCH_TYPE CCOP_VU::IsBranch(uint32 nOpcode)
uint32 CCOP_VU::GetEffectiveAddress(uint32 nAddress, uint32 nOpcode) uint32 CCOP_VU::GetEffectiveAddress(uint32 nAddress, uint32 nOpcode)
{ {
if(nOpcode == 0) return 0;
CMIPS* pCtx = NULL;
INSTRUCTION Instr; INSTRUCTION Instr;
Instr.pGetEffectiveAddress = SubTableEffAddr; Instr.pGetEffectiveAddress = SubTableEffAddr;
Instr.pSubTable = &m_ReflGeneralTable; Instr.pSubTable = &m_ReflGeneralTable;
return Instr.pGetEffectiveAddress(&Instr, pCtx, nAddress, nOpcode); return Instr.pGetEffectiveAddress(&Instr, nullptr, nAddress, nOpcode);
} }