From feb1ec53dcbefa75d3846b63ece65c6aaa5df4e3 Mon Sep 17 00:00:00 2001 From: tuz358 Date: Mon, 5 Mar 2018 10:09:50 +0900 Subject: [PATCH] Revert "Add dec_r32(0x48~0x4f) instruction" This reverts commit 6a06934dde2a21353a7f6e6e8229c5c7ac5d6e19. --- include/instructions.h | 1 - instructions.cpp | 12 ------------ 2 files changed, 13 deletions(-) diff --git a/include/instructions.h b/include/instructions.h index db875a3..2373cc4 100644 --- a/include/instructions.h +++ b/include/instructions.h @@ -25,7 +25,6 @@ public: void add_rm32_r32(); // 0x01 void xor_rm32_r32(); // 0x31 - void dec_r32(); // 0x48 ~ 0x4f void mov_rm32_r32(); // 0x89 void nop(); // 0x90 void mov_ecx_imm32(); // 0xb9 diff --git a/instructions.cpp b/instructions.cpp index c023449..511be6d 100644 --- a/instructions.cpp +++ b/instructions.cpp @@ -22,12 +22,6 @@ void Instructions::init_instructions(){ this->instructions[0x01] = &Instructions::add_rm32_r32; this->instructions[0x31] = &Instructions::xor_rm32_r32; - - for(int i = 0;i < 8;i++){ - // 0x48 ~ 0x4f : dec_r32 - this->instructions[0x48+i] = &Instructions::dec_r32; - } - this->instructions[0x89] = &Instructions::mov_rm32_r32; this->instructions[0x90] = &Instructions::nop; this->instructions[0xb9] = &Instructions::mov_ecx_imm32; @@ -152,12 +146,6 @@ void Instructions::xor_rm32_r32(){ } } -void Instructions::dec_r32(){ - printf("dec_r32 called.\n"); - uint8_t opcode = memory.read_uint8(this->eip-1); - this->registers[opcode - 0x48]--; -} - void Instructions::mov_rm32_r32(){ printf("mov_rm32_r32 called.\n"); uint32_t addr, imm32;