Refactor: Seperate executor cases to categories.

This commit is contained in:
0x221E
2026-02-05 00:42:25 +01:00
parent fe1370359e
commit ac6bf8cb46
15 changed files with 127 additions and 69 deletions

View File

@@ -26,8 +26,8 @@ void CPU::FetchDecode() {
Opcode opcode = static_cast<Opcode>(opcode_raw);
switch(opcode_raw) {
case Opcode::MOV_R_IMM32 ... 0xBF: // 0xB8 to 0xBF
m_Instruction.m_Opcode = Opcode::MOV_R_IMM32;
case Opcode::MOV_R32_IMM32 ... 0xBF: // 0xB8 to 0xBF
m_Instruction.m_Opcode = Opcode::MOV_R32_IMM32;
m_Instruction.m_Operand1 = opcode_raw - 0xB8;
m_Instruction.m_Operand2 = m_Bus->AccessX<uint32_t>(m_InstructionPointer + 1);
m_Instruction.m_Length = 5;