0x0E: decode LEGACY_DECODEVAL {
// no prefix
0x0: decode OPCODE_OP_BOTTOM3 {
- 0x0: WarnUnimpl::pshufw_Pq_Qq_Ib();
+ 0x0: PSHUFW(Pq,Qq,Ib);
//0x1: group13_pshimw();
0x1: decode MODRM_REG {
0x2: decode LEGACY_OP {
}
// repe (0xF3)
0x4: decode OPCODE_OP_BOTTOM3 {
- 0x0: WarnUnimpl::pshufhw_Vo_Wo_Ib();
+ 0x0: PSHUFHW(Vo,Wo,Ib);
default: UD2();
}
// operand size (0x66)
0x1: decode OPCODE_OP_BOTTOM3 {
- 0x0: WarnUnimpl::pshufd_Vo_Wo_Ib();
+ 0x0: PSHUFD(Vo,Wo,Ib);
//0x1: group13_pshimw();
0x1: decode MODRM_REG {
0x2: decode LEGACY_OP {
}
// repne (0xF2)
0x8: decode OPCODE_OP_BOTTOM3 {
- 0x0: WarnUnimpl::pshuflw_Vo_Wo_Ib();
+ 0x0: PSHUFLW(Vo,Wo,Ib);
default: UD2();
}
default: UD2();
0x3: WarnUnimpl::movnti_Mdq_Gdq();
0x4: PINSRW(Pq,Ew,Ib);
0x5: PEXTRW(Gd,PRq,Ib);
- 0x6: WarnUnimpl::shufps_Vps_Wps_Ib();
+ 0x6: SHUFPS(Vps,Wps,Ib);
}
// repe (0xF3)
0x4: decode OPCODE_OP_BOTTOM3 {
0x2: WarnUnimpl::cmpccpd_Vo_Wo_Ib();
0x4: PINSRW(Vdw,Ew,Ib);
0x5: PEXTRW(Gd,VRdq,Ib);
- 0x6: WarnUnimpl::shufpd_Vpd_Wpd_Ib();
+ 0x6: SHUFPD(Vpd,Wpd,Ib);
default: UD2();
}
// repne (0xF2)
# Authors: Gabe Black
microcode = '''
-# SHUFPS
-# SHUFPD
+def macroop SHUFPS_XMM_XMM_I {
+ shuffle ufp1, xmml, xmmh, size=4, ext="IMMEDIATE"
+ shuffle xmmh, xmmlm, xmmhm, size=4, ext="IMMEDIATE >> 4"
+ movfp xmml, ufp1, dataSize=8
+};
+
+def macroop SHUFPS_XMM_M_I {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ shuffle xmml, xmml, xmmh, size=4, ext="IMMEDIATE"
+ shuffle xmmh, ufp1, ufp2, size=4, ext="IMMEDIATE >> 4"
+};
+
+def macroop SHUFPS_XMM_P_I {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ shuffle xmml, xmml, xmmh, size=4, ext="IMMEDIATE"
+ shuffle xmmh, ufp1, ufp2, size=4, ext="IMMEDIATE >> 4"
+};
+
+def macroop SHUFPD_XMM_XMM_I {
+ shuffle ufp1, xmml, xmmh, size=8, ext="IMMEDIATE"
+ shuffle xmmh, xmmlm, xmmhm, size=8, ext="IMMEDIATE >> 1"
+ movfp xmml, ufp1, dataSize=8
+};
+
+def macroop SHUFPD_XMM_M_I {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ shuffle xmml, xmml, xmmh, size=8, ext="IMMEDIATE"
+ shuffle xmmh, ufp1, ufp2, size=8, ext="IMMEDIATE >> 1"
+};
+
+def macroop SHUFPD_XMM_P_I {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ shuffle xmml, xmml, xmmh, size=8, ext="IMMEDIATE"
+ shuffle xmmh, ufp1, ufp2, size=8, ext="IMMEDIATE >> 1"
+};
'''
# Authors: Gabe Black
microcode = '''
-# PSHUFD
-# PSHUFHW
-# PSHUFLW
+def macroop PSHUFD_XMM_XMM_I {
+ shuffle ufp1, xmmlm, xmmhm, size=4, ext="IMMEDIATE"
+ shuffle xmmh, xmmlm, xmmhm, size=4, ext="IMMEDIATE >> 4"
+ movfp xmml, ufp1, dataSize=8
+};
+
+def macroop PSHUFD_XMM_M_I {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ shuffle xmml, ufp1, ufp2, size=4, ext="IMMEDIATE"
+ shuffle xmmh, ufp1, ufp2, size=4, ext="IMMEDIATE >> 4"
+};
+
+def macroop PSHUFD_XMM_P_I {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ shuffle xmml, ufp1, ufp2, size=4, ext="IMMEDIATE"
+ shuffle xmmh, ufp1, ufp2, size=4, ext="IMMEDIATE >> 4"
+};
+
+def macroop PSHUFHW_XMM_XMM_I {
+ shuffle xmmh, xmmhm, xmmhm, size=2, ext=imm
+};
+
+def macroop PSHUFHW_XMM_M_I {
+ ldfp ufp1, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ shuffle xmmh, ufp1, ufp1, size=2, ext=imm
+};
+
+def macroop PSHUFHW_XMM_P_I {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ shuffle xmmh, ufp1, ufp1, size=2, ext=imm
+};
+
+def macroop PSHUFLW_XMM_XMM_I {
+ shuffle xmml, xmmlm, xmmlm, size=2, ext=imm
+};
+
+def macroop PSHUFLW_XMM_M_I {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ shuffle xmml, ufp1, ufp1, size=2, ext=imm
+};
+
+def macroop PSHUFLW_XMM_P_I {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ shuffle xmml, ufp1, ufp1, size=2, ext=imm
+};
'''
# Authors: Gabe Black
microcode = '''
-# PSHUFW
-# PSWAPD
+def macroop PSHUFW_MMX_MMX_I {
+ shuffle mmx, mmxm, mmxm, size=2, ext=imm
+};
+
+def macroop PSHUFW_MMX_M_I {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ shuffle mmx, ufp1, ufp1, size=2, ext=imm
+};
+
+def macroop PSHUFW_MMX_P_I {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ shuffle mmx, ufp1, ufp1, size=2, ext=imm
+};
+
'''
+# PSWAPD