From a3402c25d7026ae74c83664a1ec6a682516d6ca4 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 20 Apr 2011 00:05:00 +0000 Subject: [PATCH] Added the "int", "into", "invd", "iret", "iretd", "lahf" and "leave" instructions --- src/arch/i386.ins | 19 +++++++++++++++++++ test/i386.S | 9 +++++++++ 2 files changed, 28 insertions(+) diff --git a/src/arch/i386.ins b/src/arch/i386.ins index 2f59ee0..23c12b8 100644 --- a/src/arch/i386.ins +++ b/src/arch/i386.ins @@ -102,6 +102,9 @@ #define OP_RMW_DW_R AO_DREGISTER(AOF_I386_MODRM, W, W, 8) /* 0x80 */ #define OP_RMW_RW_R AO_REGISTER(AOF_I386_MODRM, W, 8) /* 0xc0 */ +/* constant values */ +#define OP_C3 AO_CONSTANT(AOF_IMPLICIT, 8, 3) + /* immediate values */ #define OP_S8 AO_IMMEDIATE(AOF_SIGNED, 0, 8) #define OP_SW AO_IMMEDIATE(AOF_SIGNED, 0, W) @@ -586,6 +589,22 @@ { "fnop", 0xd9d0, OP2F, AOT_NONE, AOT_NONE, AOT_NONE }, /* FWAIT 0x9b 1 */ { "fwait", 0x9b, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, +/* INT 0xcc 1 3 */ +{ "int", 0xcc, OP1F, OP_C3, AOT_NONE, AOT_NONE }, +/* INT 0xcd 1 imm8 */ +{ "int", 0xcd, OP1F, OP_U8, AOT_NONE, AOT_NONE }, +/* INTO 0xce 1 */ +{ "into", 0xce, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, +/* INVD 0x0f08 2 */ +{ "invd", 0x0f08, OP2F, AOT_NONE, AOT_NONE, AOT_NONE }, +/* IRET 0xcf 1 */ +{ "iret", 0xcf, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, +/* IRETD 0xcf 1 */ +{ "iretd", 0xcf, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, +/* LAHF 0x9f 1 */ +{ "lahf", 0x9f, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, +/* LEAVE 0xc9 1 */ +{ "leave", 0xc9, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, /* LOCK 0xf0 1 */ { "lock", 0xf0, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, /* LODSB 0xac 1 */ diff --git a/test/i386.S b/test/i386.S index 4b7641e..19d3be2 100644 --- a/test/i386.S +++ b/test/i386.S @@ -240,6 +240,15 @@ fnclex fninit fwait + int $0x3 + int $0x4 + int $0x42 + into + invd + iret + iretd + lahf + leave lock lodsb /* ac */ lodsd /* ad */