Refactor: Fetch-Decode phase is instruction-agnostic and operand-encoding dependant

This commit is contained in:
0x221E
2026-02-07 00:16:48 +01:00
parent 71f516b564
commit 3e1e19023d
7 changed files with 123 additions and 57 deletions

View File

@@ -8,11 +8,7 @@
#include <iostream>
namespace executor_cases {
void Mov_r32_imm32(CPUContext& cc) {
std::cout << "[Instruction] mov " << x86::Register2Str((x86::Register)cc.m_Instruction.m_Operand1) << ", " << std::hex << cc.m_Instruction.m_Operand2 << std::endl;
cc.m_Registers[cc.m_Instruction.m_Operand1] = cc.m_Instruction.m_Operand2;
}
void Mov_rm32_r32(CPUContext& cc) {
x86::ModRM modrm = cc.m_Instruction.optional.m_ModRM;