From 883c719e89cd56023845c4e3271fae75e724f5e4 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 18 Apr 2011 21:18:59 +0000 Subject: [PATCH] Added the "sgdt" and "sidt" instructions --- src/arch/i386.ins | 8 ++++++++ test/i386.S | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/arch/i386.ins b/src/arch/i386.ins index 06ece98..2bfa67a 100644 --- a/src/arch/i386.ins +++ b/src/arch/i386.ins @@ -419,6 +419,14 @@ { "fwait", 0x9b, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, /* NOP 0x90 1 */ { "nop", 0x90, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, +/* SGDT 0x0f01 /0 2 m */ +{ "sgdt", 0x0f01, OP2F, OP_RMW_D0+0,AOT_NONE, AOT_NONE }, +{ "sgdt", 0x0f01, OP2F, OP_RMW_D8+0,AOT_NONE, AOT_NONE }, +{ "sgdt", 0x0f01, OP2F, OP_RMW_DW+0,AOT_NONE, AOT_NONE }, +/* SIDT 0x0f01 /1 2 m */ +{ "sidt", 0x0f01, OP2F, OP_RMW_D0+1,AOT_NONE, AOT_NONE }, +{ "sidt", 0x0f01, OP2F, OP_RMW_D8+1,AOT_NONE, AOT_NONE }, +{ "sidt", 0x0f01, OP2F, OP_RMW_DW+1,AOT_NONE, AOT_NONE }, /* SHLD 0x0fa4 2 r/mW rW imm8 */ { "shld", 0x0fa4, OP2F, OP_RMW_D0_R,OP_RW, OP_U8 }, { "shld", 0x0fa4, OP2F, OP_RMW_D8_R,OP_RW, OP_U8 }, diff --git a/test/i386.S b/test/i386.S index bc16213..5995490 100644 --- a/test/i386.S +++ b/test/i386.S @@ -145,6 +145,8 @@ fnclex fwait nop /* 90 */ + sgdt [%ecx] + sidt [%edx - $0x79] shld %ecx, %edx, $0x31 shld %eax, %eax, %cl shrd %eax, %eax, $0x31