Add mov_edi_imm32(0xbf) instruction

This commit is contained in:
tuz358
2018-03-05 18:02:01 +09:00
parent e4d737dadf
commit 602c77d570
2 changed files with 11 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ void Instructions::init_instructions(){
this->instructions[0xbc] = &Instructions::mov_esp_imm32;
this->instructions[0xbd] = &Instructions::mov_ebp_imm32;
this->instructions[0xbe] = &Instructions::mov_esi_imm32;
this->instructions[0xbf] = &Instructions::mov_edi_imm32;
this->instructions[0xeb] = &Instructions::jmp_imm8;
this->instructions[0xf4] = &Instructions::hlt;
this->instructions[0xff] = &Instructions::opcode_ff;
@@ -300,6 +301,15 @@ void Instructions::mov_esi_imm32(){
this->eip += 4;
}
void Instructions::mov_edi_imm32(){
//printf("mov_edi_imm32 called.\n");
uint32_t imm32 = memory.read_uint32(this->eip);
imm32 = swap_endian32(imm32);
this->registers[7] = imm32;
this->eip += 4;
}
void Instructions::jmp_imm8() {
//printf("jmp_imm8 called.\n");