diff --git a/src/arch/i386.ins b/src/arch/i386.ins index 03bce00..c709896 100644 --- a/src/arch/i386.ins +++ b/src/arch/i386.ins @@ -415,6 +415,39 @@ { "fclex", 0x9bdbe2, OP3F, AOT_NONE, AOT_NONE, AOT_NONE }, /* FCMOVcc */ /* FIXME implement */ +/* FDIV 0xd8 /6 1 m32real */ +/* FIXME implement */ +/* FDIV 0xdc /6 1 m64real */ +/* FIXME implement */ +/* FDIV 0xd8f0 +i 2 st(0) st(i) */ +{ "fdiv", 0xd8f0, OP2F, OP_st0, OP_st0, AOT_NONE }, +{ "fdiv", 0xd8f1, OP2F, OP_st0, OP_st1, AOT_NONE }, +{ "fdiv", 0xd8f2, OP2F, OP_st0, OP_st2, AOT_NONE }, +{ "fdiv", 0xd8f3, OP2F, OP_st0, OP_st3, AOT_NONE }, +{ "fdiv", 0xd8f4, OP2F, OP_st0, OP_st4, AOT_NONE }, +{ "fdiv", 0xd8f5, OP2F, OP_st0, OP_st5, AOT_NONE }, +{ "fdiv", 0xd8f6, OP2F, OP_st0, OP_st6, AOT_NONE }, +{ "fdiv", 0xd8f7, OP2F, OP_st0, OP_st7, AOT_NONE }, +/* FDIV 0xdcf8 +i 2 st(0) st(i) */ +{ "fdiv", 0xdcf8, OP2F, OP_st0, OP_st0, AOT_NONE }, +{ "fdiv", 0xdcf9, OP2F, OP_st1, OP_st0, AOT_NONE }, +{ "fdiv", 0xdcfa, OP2F, OP_st2, OP_st0, AOT_NONE }, +{ "fdiv", 0xdcfb, OP2F, OP_st3, OP_st0, AOT_NONE }, +{ "fdiv", 0xdcfc, OP2F, OP_st4, OP_st0, AOT_NONE }, +{ "fdiv", 0xdcfd, OP2F, OP_st5, OP_st0, AOT_NONE }, +{ "fdiv", 0xdcfe, OP2F, OP_st6, OP_st0, AOT_NONE }, +{ "fdiv", 0xdcff, OP2F, OP_st7, OP_st0, AOT_NONE }, +/* FDIVP 0xdef9 2 */ +{ "fdivp", 0xdef9, OP2F, AOT_NONE, AOT_NONE, AOT_NONE }, +/* FDIVP 0xdef8 +i 2 st(0) st(i) */ +{ "fdivp", 0xdef8, OP2F, OP_st0, OP_st0, AOT_NONE }, +{ "fdivp", 0xdef9, OP2F, OP_st1, OP_st0, AOT_NONE }, +{ "fdivp", 0xdefa, OP2F, OP_st2, OP_st0, AOT_NONE }, +{ "fdivp", 0xdefb, OP2F, OP_st3, OP_st0, AOT_NONE }, +{ "fdivp", 0xdefc, OP2F, OP_st4, OP_st0, AOT_NONE }, +{ "fdivp", 0xdefd, OP2F, OP_st5, OP_st0, AOT_NONE }, +{ "fdivp", 0xdefe, OP2F, OP_st6, OP_st0, AOT_NONE }, +{ "fdivp", 0xdeff, OP2F, OP_st7, OP_st0, AOT_NONE }, /* FDIVR 0xd8 /7 1 m32real */ /* FIXME implement */ /* FDIVR 0xdc /7 1 m64real */ diff --git a/test/i386.S b/test/i386.S index 082ae88..178d7cc 100644 --- a/test/i386.S +++ b/test/i386.S @@ -142,6 +142,31 @@ faddp %st7, %st0 fchs fclex + fdiv %st0, %st0 + fdiv %st0, %st1 + fdiv %st0, %st2 + fdiv %st0, %st3 + fdiv %st0, %st4 + fdiv %st0, %st5 + fdiv %st0, %st6 + fdiv %st0, %st7 + fdiv %st0, %st0 + fdiv %st1, %st0 + fdiv %st2, %st0 + fdiv %st3, %st0 + fdiv %st4, %st0 + fdiv %st5, %st0 + fdiv %st6, %st0 + fdiv %st7, %st0 + fdivp + fdivp %st0, %st0 + fdivp %st1, %st0 + fdivp %st2, %st0 + fdivp %st3, %st0 + fdivp %st4, %st0 + fdivp %st5, %st0 + fdivp %st6, %st0 + fdivp %st7, %st0 fdivr %st0, %st0 fdivr %st0, %st1 fdivr %st0, %st2