X86: Implement the media sqrt instructions.
This commit is contained in:
parent
6a923c1c79
commit
449db8a370
2 changed files with 61 additions and 10 deletions
|
@ -465,7 +465,7 @@
|
|||
// no prefix
|
||||
0x0: decode OPCODE_OP_BOTTOM3 {
|
||||
0x0: movmskps_Gd_VRo();
|
||||
0x1: sqrtps_Vo_Wo();
|
||||
0x1: Inst::SQRTPS(Vo,Wo);
|
||||
0x2: rqsrtps_Vo_Wo();
|
||||
0x3: rcpps_Vo_Wo();
|
||||
0x4: Inst::ANDPS(Vo,Wo);
|
||||
|
@ -475,7 +475,7 @@
|
|||
}
|
||||
// repe (0xF3)
|
||||
0x4: decode OPCODE_OP_BOTTOM3 {
|
||||
0x1: sqrtss_Vd_Wd();
|
||||
0x1: Inst::SQRTSS(Vd,Wd);
|
||||
0x2: rsqrtss_Vd_Wd();
|
||||
0x3: rcpss_Vd_Wd();
|
||||
default: Inst::UD2();
|
||||
|
@ -483,7 +483,7 @@
|
|||
// operand size (0x66)
|
||||
0x1: decode OPCODE_OP_BOTTOM3 {
|
||||
0x0: movmskpd_Gd_VRo();
|
||||
0x1: sqrtpd_Vo_Wo();
|
||||
0x1: Inst::SQRTPD(Vo,Wo);
|
||||
0x4: Inst::ANDPD(Vo,Wo);
|
||||
0x5: Inst::ANDNPD(Vo,Wo);
|
||||
0x6: Inst::ORPD(Vo,Wo);
|
||||
|
@ -495,7 +495,7 @@
|
|||
format Inst {
|
||||
// repne (0xF2)
|
||||
0x8: decode OPCODE_OP_BOTTOM3 {
|
||||
0x1: SQRTSD(Vq,Wq);
|
||||
0x1: Inst::SQRTSD(Vq,Wq);
|
||||
default: UD2();
|
||||
}
|
||||
default: UD2();
|
||||
|
|
|
@ -54,22 +54,73 @@
|
|||
# Authors: Gabe Black
|
||||
|
||||
microcode = '''
|
||||
# SQRTPS
|
||||
# SQRTPD
|
||||
# SQRTSS
|
||||
def macroop SQRTSS_XMM_XMM {
|
||||
msqrt xmml, xmmlm, size=4, ext=1
|
||||
};
|
||||
|
||||
def macroop SQRTSS_XMM_M {
|
||||
ldfp ufp1, seg, sib, disp, dataSize=8
|
||||
msqrt xmml, ufp1, size=4, ext=1
|
||||
};
|
||||
|
||||
def macroop SQRTSS_XMM_P {
|
||||
rdip t7
|
||||
ldfp ufp1, seg, riprel, disp, dataSize=8
|
||||
msqrt xmml, ufp1, size=4, ext=1
|
||||
};
|
||||
|
||||
def macroop SQRTPS_XMM_XMM {
|
||||
msqrt xmml, xmmlm, size=4, ext=0
|
||||
msqrt xmmh, xmmhm, size=4, ext=0
|
||||
};
|
||||
|
||||
def macroop SQRTPS_XMM_M {
|
||||
ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
|
||||
ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
|
||||
msqrt xmml, ufp1, size=4, ext=0
|
||||
msqrt xmmh, ufp2, size=4, ext=0
|
||||
};
|
||||
|
||||
def macroop SQRTPS_XMM_P {
|
||||
rdip t7
|
||||
ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
|
||||
ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
|
||||
msqrt xmml, ufp1, size=4, ext=0
|
||||
msqrt xmmh, ufp2, size=4, ext=0
|
||||
};
|
||||
|
||||
def macroop SQRTSD_XMM_XMM {
|
||||
sqrtfp xmml, xmml, xmmlm
|
||||
msqrt xmml, xmmlm, size=8, ext=1
|
||||
};
|
||||
|
||||
def macroop SQRTSD_XMM_M {
|
||||
ldfp ufp1, seg, sib, disp, dataSize=8
|
||||
sqrtfp xmml, xmml, ufp1
|
||||
msqrt xmml, ufp1, size=8, ext=1
|
||||
};
|
||||
|
||||
def macroop SQRTSD_XMM_P {
|
||||
rdip t7
|
||||
ldfp ufp1, seg, riprel, disp, dataSize=8
|
||||
sqrtfp xmml, xmml, ufp1
|
||||
msqrt xmml, ufp1, size=8, ext=1
|
||||
};
|
||||
|
||||
def macroop SQRTPD_XMM_XMM {
|
||||
msqrt xmml, xmmlm, size=8, ext=0
|
||||
msqrt xmmh, xmmhm, size=8, ext=0
|
||||
};
|
||||
|
||||
def macroop SQRTPD_XMM_M {
|
||||
ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
|
||||
ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
|
||||
msqrt xmml, ufp1, size=8, ext=0
|
||||
msqrt xmmh, ufp2, size=8, ext=0
|
||||
};
|
||||
|
||||
def macroop SQRTPD_XMM_P {
|
||||
rdip t7
|
||||
ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
|
||||
ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
|
||||
msqrt xmml, ufp1, size=8, ext=0
|
||||
msqrt xmmh, ufp2, size=8, ext=0
|
||||
};
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue