#pragma once #include #include #include #include #include "CPUContext.h" #include "Instruction.h" namespace executor_cases { template void Mov_rX_immX(CPUContext& cc) { static_assert(std::is_unsigned_v, "Mov_rX_immX requires an unsigned type!"); uint8_t reg = cc.m_Instruction.m_Opcode - O; std::cout << "[Instruction] mov " << x86::Register2Str((x86::Register)reg) << ", " << std::hex << cc.m_Instruction.m_Operand1 << std::endl; std::memcpy(&cc.m_Registers[reg], &cc.m_Instruction.m_Operand1, sizeof(T)); } void Mov_rm32_r32(CPUContext& cc); }