Refactor: Seperate executor cases to categories.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user