}
default: UD2();
}
- }
- 0x1C: decode LEGACY_DECODEVAL {
- // no prefix
- 0x0: decode OPCODE_OP_BOTTOM3 {
- 0x0: pavgb_Pq_Qq();
- 0x1: Inst::PSRAW(Pq,Qq);
- 0x2: Inst::PSRAD(Pq,Qq);
- 0x3: pavgw_Pq_Qq();
- 0x4: Inst::PMULHUW(Pq,Qq);
- 0x5: Inst::PMULHW(Pq,Qq);
- 0x7: movntq_Mq_Pq();
- default: Inst::UD2();
- }
- // repe (0xF3)
- 0x4: decode OPCODE_OP_BOTTOM3 {
- 0x6: Inst::CVTDQ2PD(Vo,Wq);
- default: Inst::UD2();
- }
- // operand size (0x66)
- 0x1: decode OPCODE_OP_BOTTOM3 {
- 0x0: pavgb_Vo_Wo();
- 0x1: Inst::PSRAW(Vo,Wo);
- 0x2: Inst::PSRAD(Vo,Wo);
- 0x3: pavgw_Vo_Wo();
- 0x4: Inst::PMULHUW(Vo,Wo);
- 0x5: Inst::PMULHW(Vo,Wo);
- 0x6: cvttpd2dq_Vo_Wo();
- 0x7: movntdq_Mo_Vo();
- }
- // repne (0xF2)
- 0x8: decode OPCODE_OP_BOTTOM3 {
- 0x6: cvtpd2dq_Vo_Wo();
- default: Inst::UD2();
+ 0x1C: decode LEGACY_DECODEVAL {
+ // no prefix
+ 0x0: decode OPCODE_OP_BOTTOM3 {
+ 0x0: PAVGB(Pq,Qq);
+ 0x1: PSRAW(Pq,Qq);
+ 0x2: PSRAD(Pq,Qq);
+ 0x3: PAVGW(Pq,Qq);
+ 0x4: PMULHUW(Pq,Qq);
+ 0x5: PMULHW(Pq,Qq);
+ 0x7: WarnUnimpl::movntq_Mq_Pq();
+ default: UD2();
+ }
+ // repe (0xF3)
+ 0x4: decode OPCODE_OP_BOTTOM3 {
+ 0x6: CVTDQ2PD(Vo,Wq);
+ default: UD2();
+ }
+ // operand size (0x66)
+ 0x1: decode OPCODE_OP_BOTTOM3 {
+ 0x0: PAVGB(Vo,Wo);
+ 0x1: PSRAW(Vo,Wo);
+ 0x2: PSRAD(Vo,Wo);
+ 0x3: PAVGW(Vo,Wo);
+ 0x4: PMULHUW(Vo,Wo);
+ 0x5: PMULHW(Vo,Wo);
+ 0x6: WarnUnimpl::cvttpd2dq_Vo_Wo();
+ 0x7: WarnUnimpl::movntdq_Mo_Vo();
+ }
+ // repne (0xF2)
+ 0x8: decode OPCODE_OP_BOTTOM3 {
+ 0x6: WarnUnimpl::cvtpd2dq_Vo_Wo();
+ default: UD2();
+ }
+ default: UD2();
}
- default: Inst::UD2();
- }
- format Inst {
0x1D: decode LEGACY_DECODEVAL {
// no prefix
0x0: decode OPCODE_OP_BOTTOM3 {
# Authors: Gabe Black
microcode = '''
-# PAVGB
-# PAVGW
+def macroop PAVGB_XMM_XMM {
+ mavg xmml, xmml, xmmlm, size=1, ext=0
+ mavg xmmh, xmmh, xmmhm, size=1, ext=0
+};
+
+def macroop PAVGB_XMM_M {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ mavg xmml, xmml, ufp1, size=1, ext=0
+ mavg xmmh, xmmh, ufp2, size=1, ext=0
+};
+
+def macroop PAVGB_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ mavg xmml, xmml, ufp1, size=1, ext=0
+ mavg xmmh, xmmh, ufp2, size=1, ext=0
+};
+
+def macroop PAVGUSB_XMM_XMM {
+ mavg xmml, xmml, xmmlm, size=1, ext=0
+ mavg xmmh, xmmh, xmmhm, size=1, ext=0
+};
+
+def macroop PAVGUSB_XMM_M {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ mavg xmml, xmml, ufp1, size=1, ext=0
+ mavg xmmh, xmmh, ufp2, size=1, ext=0
+};
+
+def macroop PAVGUSB_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ mavg xmml, xmml, ufp1, size=1, ext=0
+ mavg xmmh, xmmh, ufp2, size=1, ext=0
+};
+
+def macroop PAVGW_XMM_XMM {
+ mavg xmml, xmml, xmmlm, size=2, ext=0
+ mavg xmmh, xmmh, xmmhm, size=2, ext=0
+};
+
+def macroop PAVGW_XMM_M {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ mavg xmml, xmml, ufp1, size=2, ext=0
+ mavg xmmh, xmmh, ufp2, size=2, ext=0
+};
+
+def macroop PAVGW_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ mavg xmml, xmml, ufp1, size=2, ext=0
+ mavg xmmh, xmmh, ufp2, size=2, ext=0
+};
'''
# Authors: Gabe Black
microcode = '''
-# PAVGB
-# PAVGW
+def macroop PAVGB_MMX_MMX {
+ mavg mmx, mmx, mmxm, size=1, ext=0
+};
+
+def macroop PAVGB_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ mavg mmx, mmx, ufp1, size=1, ext=0
+};
+
+def macroop PAVGB_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ mavg mmx, mmx, ufp1, size=1, ext=0
+};
+
+def macroop PAVGW_MMX_MMX {
+ mavg mmx, mmx, mmxm, size=2, ext=0
+};
+
+def macroop PAVGW_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ mavg mmx, mmx, ufp1, size=2, ext=0
+};
+
+def macroop PAVGW_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ mavg mmx, mmx, ufp1, size=2, ext=0
+};
# PAVGUSB
'''