X86: Implement the floating point media instructions.
This commit is contained in:
parent
af3a53726b
commit
b34b507fd8
2 changed files with 62 additions and 11 deletions
|
@ -510,7 +510,7 @@
|
|||
0x3: cvtdq2ps_Vo_Wo();
|
||||
0x4: Inst::SUBPS(Vo,Wo);
|
||||
0x5: Inst::MINPS(Vo,Wo);
|
||||
0x6: divps_Vo_Wo();
|
||||
0x6: Inst::DIVPS(Vo,Wo);
|
||||
0x7: Inst::MAXPS(Vo,Wo);
|
||||
}
|
||||
// repe (0xF3)
|
||||
|
@ -521,7 +521,7 @@
|
|||
0x3: cvttps2dq_Vo_Wo();
|
||||
0x4: Inst::SUBSS(Vd,Wd);
|
||||
0x5: Inst::MINSS(Vd,Wd);
|
||||
0x6: divss_Vd_Wd();
|
||||
0x6: Inst::DIVSS(Vd,Wd);
|
||||
0x7: Inst::MAXSS(Vd,Wd);
|
||||
}
|
||||
// operand size (0x66)
|
||||
|
@ -532,7 +532,7 @@
|
|||
0x3: cvtps2dq_Vo_Wo();
|
||||
0x4: Inst::SUBPD(Vo,Wo);
|
||||
0x5: Inst::MINPD(Vo,Wo);
|
||||
0x6: divpd_Vo_Wo();
|
||||
0x6: Inst::DIVPD(Vo,Wo);
|
||||
0x7: Inst::MAXPD(Vo,Wo);
|
||||
}
|
||||
// repne (0xF2)
|
||||
|
@ -917,7 +917,7 @@
|
|||
0x3: cvtdq2ps_Vo_Wo();
|
||||
0x4: Inst::SUBPS(Vo,Wo);
|
||||
0x5: Inst::MINPS(Vo,Wo);
|
||||
0x6: divps_Vo_Wo();
|
||||
0x6: Inst::DIVPS(Vo,Wo);
|
||||
}
|
||||
// repe (0xF3)
|
||||
0x4: decode OPCODE_OP_BOTTOM3 {
|
||||
|
@ -929,7 +929,7 @@
|
|||
0x2: cmpccpd_Vo_Wo_Ib();
|
||||
0x4: Inst::SUBPD(Vo,Wo);
|
||||
0x5: Inst::MINPD(Vo,Wo);
|
||||
0x6: divpd_Vo_Wo();
|
||||
0x6: Inst::DIVPD(Vo,Wo);
|
||||
default: Inst::UD2();
|
||||
}
|
||||
// repne (0xF2)
|
||||
|
|
|
@ -54,22 +54,73 @@
|
|||
# Authors: Gabe Black
|
||||
|
||||
microcode = '''
|
||||
# DIVPS
|
||||
# DIVPD
|
||||
# DIVSS
|
||||
def macroop DIVSS_XMM_XMM {
|
||||
mdivf xmml, xmml, xmmlm, size=4, ext=1
|
||||
};
|
||||
|
||||
def macroop DIVSS_XMM_M {
|
||||
ldfp ufp1, seg, sib, disp, dataSize=8
|
||||
mdivf xmml, xmml, ufp1, size=4, ext=1
|
||||
};
|
||||
|
||||
def macroop DIVSS_XMM_P {
|
||||
rdip t7
|
||||
ldfp ufp1, seg, riprel, disp, dataSize=8
|
||||
mdivf xmml, xmml, ufp1, size=4, ext=1
|
||||
};
|
||||
|
||||
def macroop DIVSD_XMM_XMM {
|
||||
divfp xmml, xmml, xmmlm
|
||||
mdivf xmml, xmml, xmmlm, size=8, ext=1
|
||||
};
|
||||
|
||||
def macroop DIVSD_XMM_M {
|
||||
ldfp ufp1, seg, sib, disp, dataSize=8
|
||||
divfp xmml, xmml, ufp1
|
||||
mdivf xmml, xmml, ufp1, size=8, ext=1
|
||||
};
|
||||
|
||||
def macroop DIVSD_XMM_P {
|
||||
rdip t7
|
||||
ldfp ufp1, seg, riprel, disp, dataSize=8
|
||||
divfp xmml, xmml, ufp1
|
||||
mdivf xmml, xmml, ufp1, size=8, ext=1
|
||||
};
|
||||
|
||||
def macroop DIVPS_XMM_XMM {
|
||||
mdivf xmml, xmml, xmmlm, size=4, ext=0
|
||||
mdivf xmmh, xmmh, xmmhm, size=4, ext=0
|
||||
};
|
||||
|
||||
def macroop DIVPS_XMM_M {
|
||||
ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
|
||||
ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
|
||||
mdivf xmml, xmml, ufp1, size=4, ext=0
|
||||
mdivf xmmh, xmmh, ufp2, size=4, ext=0
|
||||
};
|
||||
|
||||
def macroop DIVPS_XMM_P {
|
||||
rdip t7
|
||||
ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
|
||||
ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
|
||||
mdivf xmml, xmml, ufp1, size=4, ext=0
|
||||
mdivf xmmh, xmmh, ufp2, size=4, ext=0
|
||||
};
|
||||
|
||||
def macroop DIVPD_XMM_XMM {
|
||||
mdivf xmml, xmml, xmmlm, size=8, ext=0
|
||||
mdivf xmmh, xmmh, xmmhm, size=8, ext=0
|
||||
};
|
||||
|
||||
def macroop DIVPD_XMM_M {
|
||||
ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
|
||||
ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
|
||||
mdivf xmml, xmml, ufp1, size=8, ext=0
|
||||
mdivf xmmh, xmmh, ufp2, size=8, ext=0
|
||||
};
|
||||
|
||||
def macroop DIVPD_XMM_P {
|
||||
rdip t7
|
||||
ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
|
||||
ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
|
||||
mdivf xmml, xmml, ufp1, size=8, ext=0
|
||||
mdivf xmmh, xmmh, ufp2, size=8, ext=0
|
||||
};
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue