Trying to add the "pxor" instruction

This commit is contained in:
Pierre Pronchery 2011-04-18 22:54:55 +00:00
parent cd05aec823
commit e0b1faf4c4
6 changed files with 41 additions and 10 deletions

View File

@ -72,7 +72,7 @@ i486.o: i486.c common.ins null.ins i386.h i386.ins i386.reg i486.ins
i586.o: i586.c common.ins null.ins i386.h i386.ins i386.reg i486.ins i586.ins
$(CC) $(i586_CFLAGS) -c i586.c
i686.o: i686.c common.ins null.ins i386.h i386.ins i386.reg i486.ins i686.reg
i686.o: i686.c common.ins null.ins i386.h i386.ins i386.reg i486.ins i686.ins i686.reg
$(CC) $(i686_CFLAGS) -c i686.c
sparc.o: sparc.c common.ins null.ins sparc.ins sparc.reg

View File

@ -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 },
/* RCL */
/* FIXME implement */
/* RCR */
/* FIXME implement */
/* ROL */
/* FIXME implement */
/* ROR */
/* FIXME implement */
/* REP */
/* FIXME implement */
/* RET 0xc2 1 imm16 */

View File

@ -15,6 +15,23 @@
/* helpers */
/* mod r/m byte */
#define OP_R64 AO_REGISTER(0, 64, 0)
#define OP_R64_R AO_REGISTER(AOF_I386_MODRM, 64, 8)
#define OP_RM64_D0_R AO_DREGISTER(AOF_I386_MODRM, 0, W, 8)
#define OP_RM64_D8_R AO_DREGISTER(AOF_I386_MODRM, 8, W, 8)
#define OP_RM64_DW_R AO_DREGISTER(AOF_I386_MODRM, W, W, 8)
#define OP_RM64_R64_R AO_REGISTER(AOF_I386_MODRM, 64, 8)
/* instructions */
/* EMMS 0x0f77 2 */
{ "emms", 0x0f77, OP2F, AOT_NONE, AOT_NONE, AOT_NONE },
/* PXOR 0x0fef /r 2 mm mm/m64 */
#if 1 /* FIXME doesn't work properly */
{ "pxor", 0x0fef, OP2F, OP_R64_R, OP_RM64_D0_R,AOT_NONE},
{ "pxor", 0x0fef, OP2F, OP_R64_R, OP_RM64_D8_R,AOT_NONE},
{ "pxor", 0x0fef, OP2F, OP_R64_R, OP_RM64_DW_R,AOT_NONE},
{ "pxor", 0x0fef, OP2F, OP_R64_R, OP_RM64_R64_R,AOT_NONE},
#endif

View File

@ -1,9 +1,9 @@
/* $Id$ */
REG(mm0, 64, 0x08)
REG(mm1, 64, 0x09)
REG(mm2, 64, 0x0a)
REG(mm3, 64, 0x0b)
REG(mm4, 64, 0x0c)
REG(mm5, 64, 0x0d)
REG(mm6, 64, 0x0e)
REG(mm7, 64, 0x0f)
REG(mm0, 64, 0x00)
REG(mm1, 64, 0x01)
REG(mm2, 64, 0x02)
REG(mm3, 64, 0x03)
REG(mm4, 64, 0x04)
REG(mm5, 64, 0x05)
REG(mm6, 64, 0x06)
REG(mm7, 64, 0x07)

View File

@ -42,7 +42,7 @@ sources=i686.c
install=$(LIBDIR)/asm/arch
[i686.c]
depends=common.ins,null.ins,i386.h,i386.ins,i386.reg,i486.ins,i686.reg
depends=common.ins,null.ins,i386.h,i386.ins,i386.reg,i486.ins,i686.ins,i686.reg
[sparc]
type=plugin

View File

@ -1,3 +1,9 @@
/* $Id$ */
.text
emms /* 0f 77 */
#if 1 /* FIXME doesn't work properly */
pxor %mm1, [%edx]
pxor %mm2, [%edx + $0x56]
pxor %mm3, [%edx + $0x789abc]
pxor %mm4, %mm5
#endif