1#include "core/cpu/cpu.hpp"
12 for(
int i = 1; i < 32; i++)
std::map< uint8_t, std::string > lookup_mnemonic_op
Lookup table for the mnemonics of instructions.
void COP1()
Looks up and executes the appropriate coprocessor 1 instruction. (UNUSED)
void SLTIU()
Set on Less Than Immediate Unsigned.
void BEQ()
Branch on Equal.
void BLGE()
Choose between BLTZAL, BGEZAL, BLTZ, BGEZ.
std::map< uint8_t, void(CPU::*)()> lookup_op
Lookup table for instructions.
void SLTU()
Set on Less Than Unsigned.
void LUI()
Load Upper Immediate.
std::map< uint8_t, void(CPU::*)()> lookup_cop0
Lookup table for cop0 instructions (opcode = 0b010000)
void SRA()
Shift Right Arithmetic.
void COP2()
Looks up and executes the appropriate coprocessor 2 (Graphics) instruction.
void SUBU()
Subtract Unsigned.
std::map< uint8_t, std::string > lookup_mnemonic_special
Lookup table for the mnemonics of special instructions.
uint32_t cop0_bdam
Bitmask applied to COP0 breakpoint exception register (data)
uint32_t cop0_bpc
COP0 breakpoint exception register.
void conf_mnemonic_lookup()
Configures the mnemonic lookup table. (for debugging)
void BLEZ()
Branch on Less Than or Equal to Zero.
uint32_t ir
Instruction register.
void SLL()
Shift Left Logical.
void SLTI()
Set on Less Than Immediate.
void reset()
Resets the CPU to its initial state.
void MFC0()
Move From Coprocessor 0.
void conf_ins_lookup()
Configures the instruction lookup table.
uint32_t ir_next
Instruction immediately after the current instruction in the memory.
void SLT()
Set on Less Than.
void SRL()
Shift Right Logical.
std::map< uint8_t, void(CPU::*)()> lookup_special
Lookup table for special instructions (opcode = 0b000000)
void LBU()
Load Byte Unsigned.
void J()
Unconditional Jump.
Instruction ins
Instruction in the form of the Instruction structure.
uint32_t cop0_status
COP0 status register.
void JALR()
Jump and Link Register.
uint32_t regs[32]
General purpose registers.
uint32_t cop0_dcic
COP0 breakpoint exception register (hardware)
void DIVU()
Divide Unsigned.
uint32_t cop0_bda
COP0 breakpoint exception register (data)
void ORI()
Bitwise OR Immediate.
uint32_t pc
Program counter.
void ADDIU()
Add Immediate Unsigned.
void BNE()
Branch on Not Equal.
void ADDI()
Add Immediate.
uint32_t cop0_cause
COP0 cause register.
void SPECIAL()
Looks up and executes the appropriate SPECIAL instruction.
void ANDI()
Bitwise AND Immediate.
void COP0()
Looks up and executes the appropriate coprocessor 1 instruction.
void COP3()
Looks up and executes the appropriate coprocessor 3 instruction. (UNUSED)
void MTC0()
Move to Coprocessor 0.
void BGTZ()
Branch on Greater Than Zero.
uint32_t cop0_bpcm
Bitmask applied on COP0 breakpoint exception register.
Structure to access different parts of an instruction by value.