summaryrefslogtreecommitdiff
path: root/src/arch/x86/instruction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/instruction.c')
-rw-r--r--src/arch/x86/instruction.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/arch/x86/instruction.c b/src/arch/x86/instruction.c
index 72143ee..3e47d13 100644
--- a/src/arch/x86/instruction.c
+++ b/src/arch/x86/instruction.c
@@ -112,6 +112,7 @@ static x86_instruction _instructions[XOP_COUNT] = {
[XOP_MOVZX_R1632_RM8] = { false, 0xb6, IDX_TO_EXT(-1), "movzx", XPX_TWO_BYTES | XPX_OPERAND_SIZE_OVERRIDE },
[XOP_MOVSX_R1632_RM8] = { false, 0xbe, IDX_TO_EXT(-1), "movsx", XPX_TWO_BYTES | XPX_OPERAND_SIZE_OVERRIDE },
+ [XOP_MOVSX_R1632_RM1632] = { false, 0xbf, IDX_TO_EXT(-1), "movsx", XPX_TWO_BYTES | XPX_OPERAND_SIZE_OVERRIDE },
[XOP_ADC_RM8_R8] = { false, 0x10, IDX_TO_EXT(-1), "adc", XPX_NONE },
@@ -266,9 +267,12 @@ static x86_instruction _instructions[XOP_COUNT] = {
[XOP_MOV_MOFFS1632_E_AX] = { false, 0xa3, IDX_TO_EXT(-1), "mov", XPX_OPERAND_SIZE_OVERRIDE },
+ [XOP_MOVS_M1632_M1632] = { false, 0xa5, IDX_TO_EXT(-1), "movs", XPX_OPERAND_SIZE_OVERRIDE },
+
[XOP_TEST_AL_IMM8] = { false, 0xa8, IDX_TO_EXT(-1), "test", XPX_NONE },
[XOP_TEST_E_AX_IMM1632] = { false, 0xa9, IDX_TO_EXT(-1), "test", XPX_OPERAND_SIZE_OVERRIDE },
+ [XOP_STOS_M1632_E_AX] = { false, 0xab, IDX_TO_EXT(-1), "stos", XPX_OPERAND_SIZE_OVERRIDE },
[XOP_SCAS_AL_M8] = { false, 0xae, IDX_TO_EXT(-1), "scas", XPX_NONE },
@@ -521,6 +525,7 @@ X86Opcodes x86_guess_next_instruction(const bin_t *data, off_t pos, off_t len, X
*prefix |= XPX_OPERAND_SIZE_OVERRIDE;
break;
case 0xf2:
+ case 0xf3:
pos++;
extra |= XPX_REPEAT_STRING_OPERATION;
break;
@@ -583,8 +588,11 @@ static const char *x86_get_instruction_text(const GX86Instruction *instr, const
result = strdup(_instructions[instr->type].keyword);
+ /* FIXME :
+ http://www.intel.com/software/products/documentation/vlin/mergedprojects/analyzer_ec/mergedprojects/reference_olh/mergedProjects/instructions/instruct32_hh/vc276.htm
+ */
if (instr->prefixes & XPX_REPEAT_STRING_OPERATION)
- result = strprep(result, "repnz ");
+ result = strprep(result, "rep "/*"repnz "*/);
return result;