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.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/arch/x86/instruction.c b/src/arch/x86/instruction.c
index 67a1fe0..5f6e7ee 100644
--- a/src/arch/x86/instruction.c
+++ b/src/arch/x86/instruction.c
@@ -90,6 +90,14 @@ static x86_instruction _instructions[XOP_COUNT] = {
[XOP_OR_R8_RM8] = { false, 0x0a, IDX_TO_EXT(-1), "or", XPX_NONE },
[XOP_OR_AL_IMM8] = { false, 0x0c, IDX_TO_EXT(-1), "or", XPX_NONE },
+
+ [XOP_JLE_REL1632] = { false, 0x8e, IDX_TO_EXT(-1), "jle", XPX_TWO_BYTES | XPX_OPERAND_SIZE_OVERRIDE },
+
+
+ [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_ADC_RM8_R8] = { false, 0x10, IDX_TO_EXT(-1), "adc", XPX_NONE },
[XOP_AND_RM8_R8] = { false, 0x20, IDX_TO_EXT(-1), "and", XPX_NONE },
@@ -152,6 +160,8 @@ static x86_instruction _instructions[XOP_COUNT] = {
[XOP_PUSH_IMM1632] = { false, 0x68, IDX_TO_EXT(-1), "push", XPX_OPERAND_SIZE_OVERRIDE },
+ [XOP_IMUL_RM1632_IMM8] = { false, 0x6b, IDX_TO_EXT(-1), "imul", XPX_OPERAND_SIZE_OVERRIDE },
+
[XOP_JO_REL8] = { false, 0x70, IDX_TO_EXT(-1), "jo", XPX_NONE },
[XOP_JNO_REL8] = { false, 0x71, IDX_TO_EXT(-1), "jno", XPX_NONE },
@@ -445,6 +455,10 @@ X86Opcodes x86_guess_next_instruction(const bin_t *data, off_t pos, off_t len, X
while (pos < len)
switch (data[pos])
{
+ case 0x0f:
+ pos++;
+ *prefix |= XPX_TWO_BYTES;
+ break;
case 0x66:
pos++;
*prefix |= XPX_OPERAND_SIZE_OVERRIDE;
@@ -535,6 +549,12 @@ static InstructionLinkType x86_get_instruction_link(const GX86Instruction *instr
switch (instr->type)
{
+ case XOP_JLE_REL1632:
+ relative = G_X86_RELATIVE_OPERAND(g_arch_instruction_get_operand(G_ARCH_INSTRUCTION(instr), 0));
+ if (g_imm_operand_to_vmpa_t(g_x86_relative_operand_get_value(relative), addr)) result = ILT_CALL;
+ else result = ILT_NONE;
+ break;
+
case XOP_JO_REL8:
case XOP_JNO_REL8:
case XOP_JB_REL8: