diff --git a/src/arch/Makefile b/src/arch/Makefile index ae43986..3765a34 100644 --- a/src/arch/Makefile +++ b/src/arch/Makefile @@ -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 diff --git a/src/arch/i386.ins b/src/arch/i386.ins index cf29bf4..09a93c1 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 }, +/* RCL */ +/* FIXME implement */ +/* RCR */ +/* FIXME implement */ +/* ROL */ +/* FIXME implement */ +/* ROR */ +/* FIXME implement */ /* REP */ /* FIXME implement */ /* RET 0xc2 1 imm16 */ diff --git a/src/arch/i686.ins b/src/arch/i686.ins index 505c936..f8359d8 100644 --- a/src/arch/i686.ins +++ b/src/arch/i686.ins @@ -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 diff --git a/src/arch/i686.reg b/src/arch/i686.reg index 107227f..40911d9 100644 --- a/src/arch/i686.reg +++ b/src/arch/i686.reg @@ -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) diff --git a/src/arch/project.conf b/src/arch/project.conf index 6d9f21a..dadf05b 100644 --- a/src/arch/project.conf +++ b/src/arch/project.conf @@ -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 diff --git a/test/i686.S b/test/i686.S index aa6c30a..c051421 100644 --- a/test/i686.S +++ b/test/i686.S @@ -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