From 8fa2c99d098cb105caab628f392f551588a1daca Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 17 Apr 2011 07:13:08 +0000 Subject: [PATCH] Still adding instructions to the i386 architecture --- src/arch/i386.ins | 15 ++++++++++++++- test/i386.S | 11 +++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/arch/i386.ins b/src/arch/i386.ins index bba02ca..4fa3e45 100644 --- a/src/arch/i386.ins +++ b/src/arch/i386.ins @@ -250,7 +250,7 @@ { "bts", 0x0fba, OP2F, OP_RMW_RW+5,OP_S8, AOT_NONE }, /* CALL */ /* FIXME implement */ -#if defined(ARCH_i386_real) /* i386 in real mode */ +#if defined(ARCH_i386_real) /* CBW 0x98 1 */ { "cbw", 0x98, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, #else @@ -267,5 +267,18 @@ { "clts", 0x0f06, OP2F, AOT_NONE, AOT_NONE, AOT_NONE }, /* CMC 0xf5 1 */ { "cmc", 0xf5, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, +/* CMOVcc */ +/* FIXME implement */ +/* CMP */ +/* FIXME implement */ +/* CPUID 0x0fa2 2 */ +{ "cpuid", 0x0fa2, OP2F, AOT_NONE, AOT_NONE, AOT_NONE }, +#if defined(ARCH_i386_real) +/* CWD 0x99 1 */ +{ "cwd", 0x99, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, +#else +/* CDQ 0x99 1 */ +{ "cdq", 0x99, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, +#endif /* NOP */ { "nop", 0x90, OP1F, AOT_NONE, AOT_NONE, AOT_NONE }, diff --git a/test/i386.S b/test/i386.S index 944f643..f04339d 100644 --- a/test/i386.S +++ b/test/i386.S @@ -74,17 +74,12 @@ bts [%eax], %ecx /* 0f ab 08 */ bts %eax, $0x42 /* 0f ba e8 42 */ bts [%eax], $0x42 /* 0f ba 28 42 */ - /* CWDE */ cwde /* 98 */ - /* CLC */ clc /* f8 */ - /* CLD */ cld /* fc */ - /* CLI */ cli /* fa */ - /* CLTS */ clts /* 0f 06 */ - /* CMC */ cmc /* f5 */ - /* NOP */ - nop + cpuid /* 0f a2 */ + cdq /* 0x99 */ + nop /* 0x90 */