Last active
March 26, 2017 19:11
-
-
Save stryku/f49ac6d95fff28e7fa4ee168f747b01b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename state_t, size_t reg1, size_t val, size_t ...rest_of_opcodes> | |
struct ex_instruction<state_t, inst::to_size<inst::id_t::MOV_REG_VAL>, reg1, val, rest_of_opcodes...> | |
{ | |
using state = to_machine_state<state_t>; | |
using new_regs_state = set_reg<typename state::registers_state_t, regs::to_id<reg1>, static_cast<uint32_t>(val)>; | |
using final_regs_state = adjust_eip<new_regs_state, inst::id_t::MOV_REG_VAL>; | |
using next_machine_state = machine_state<typename state::stack_t, typename state::flags_t, final_regs_state>; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment