Add or_eax_imm32(0x0d) instruction

This commit is contained in:
tuz358
2018-03-06 11:10:36 +09:00
parent ca0a55eeaf
commit 980902ad17
2 changed files with 9 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ public:
void add_eax_imm32(); // 0x05
void or_rm32_r32(); // 0x09
void or_r32_rm32(); // 0x0b
void or_eax_imm32(); // 0x0d
void and_rm32_r32(); // 0x21
void and_r32_rm32(); // 0x23
void and_eax_imm32(); // 0x25

View File

@@ -25,6 +25,7 @@ void Instructions::init_instructions(){
this->instructions[0x05] = &Instructions::add_eax_imm32;
this->instructions[0x09] = &Instructions::or_rm32_r32;
this->instructions[0x0b] = &Instructions::or_r32_rm32;
this->instructions[0x0d] = &Instructions::or_eax_imm32;
this->instructions[0x21] = &Instructions::and_rm32_r32;
this->instructions[0x23] = &Instructions::and_r32_rm32;
this->instructions[0x25] = &Instructions::and_eax_imm32;
@@ -308,6 +309,13 @@ void Instructions::or_r32_rm32(){
}
}
void Instructions::or_eax_imm32(){
this->eip++;
uint32_t imm32 = memory.read_uint32(this->eip);
imm32 = swap_endian32(imm32);
this->registers[0] |= imm32;
}
void Instructions::and_rm32_r32(){
//printf("and_rm32_r32 called.\n");
uint32_t addr, dst, imm32;