X86: Implement many of the media mov instructions.

This commit is contained in:
Gabe Black 2009-08-17 18:44:44 -07:00
parent ae64377afe
commit cf9634a43f
2 changed files with 156 additions and 24 deletions

View file

@ -288,20 +288,20 @@
0x02: decode LEGACY_DECODEVAL { 0x02: decode LEGACY_DECODEVAL {
// no prefix // no prefix
0x0: decode OPCODE_OP_BOTTOM3 { 0x0: decode OPCODE_OP_BOTTOM3 {
0x0: movups_Vo_Wo(); 0x0: Inst::MOVUPS(Vo,Wo);
0x1: movups_Wo_Vo(); 0x1: Inst::MOVUPS(Wo,Vo);
0x2: decode MODRM_MOD { 0x2: decode MODRM_MOD {
0x3: movhlps_Vq_VRq(); 0x3: Inst::MOVHLPS(Vq,VRq);
default: movlps_Vq_Mq(); default: Inst::MOVLPS(Vq,Mq);
} }
0x3: movlps_Mq_Vq(); 0x3: Inst::MOVLPS(Mq,Vq);
0x4: Inst::UNPCKLPS(Vps,Wq); 0x4: Inst::UNPCKLPS(Vps,Wq);
0x5: Inst::UNPCKHPS(Vpd,Wq); 0x5: Inst::UNPCKHPS(Vpd,Wq);
0x6: decode MODRM_MOD { 0x6: decode MODRM_MOD {
0x3: movlhps_Vq_VRq(); 0x3: Inst::MOVLHPS(Vq,VRq);
default: movhps_Vq_Mq(); default: Inst::MOVHPS(Vq,Mq);
} }
0x7: movhps_Mq_Vq(); 0x7: Inst::MOVHPS(Mq,Vq);
} }
// repe (0xF3) // repe (0xF3)
0x4: decode OPCODE_OP_BOTTOM3 { 0x4: decode OPCODE_OP_BOTTOM3 {
@ -313,14 +313,14 @@
} }
// operand size (0x66) // operand size (0x66)
0x1: decode OPCODE_OP_BOTTOM3 { 0x1: decode OPCODE_OP_BOTTOM3 {
0x0: movupd_Vo_Wo(); 0x0: Inst::MOVUPD(Vo,Wo);
0x1: movupd_Wo_Vo(); 0x1: Inst::MOVUPD(Wo,Vo);
0x2: Inst::MOVLPD(Vq,Mq); 0x2: Inst::MOVLPD(Vq,Mq);
0x3: Inst::MOVLPD(Mq,Vq); 0x3: Inst::MOVLPD(Mq,Vq);
0x4: Inst::UNPCKLPD(Vo,Wq); 0x4: Inst::UNPCKLPD(Vo,Wq);
0x5: Inst::UNPCKHPD(Vo,Wo); 0x5: Inst::UNPCKHPD(Vo,Wo);
0x6: movhpd_Vq_Mq(); 0x6: Inst::MOVHPD(Vq,Mq);
0x7: movhpd_Mq_Vq(); 0x7: Inst::MOVHPD(Mq,Vq);
} }
// repne (0xF2) // repne (0xF2)
0x8: decode OPCODE_OP_BOTTOM3 { 0x8: decode OPCODE_OP_BOTTOM3 {
@ -389,8 +389,8 @@
} }
// operand size (0x66) // operand size (0x66)
0x1: decode OPCODE_OP_BOTTOM3 { 0x1: decode OPCODE_OP_BOTTOM3 {
0x0: movapd_Vo_Wo(); 0x0: Inst::MOVAPD(Vo,Wo);
0x1: movapd_Wo_Vo(); 0x1: Inst::MOVAPD(Wo,Vo);
0x2: Inst::CVTPI2PD(Vo,Qq); 0x2: Inst::CVTPI2PD(Vo,Qq);
0x3: movntpd_Mo_Vo(); 0x3: movntpd_Mo_Vo();
0x4: cvttpd2pi_Pq_Wo(); 0x4: cvttpd2pi_Pq_Wo();

View file

@ -86,12 +86,142 @@ def macroop MOVAPS_XMM_XMM {
movfp xmmh, xmmhm, dataSize=8 movfp xmmh, xmmhm, dataSize=8
}; };
# MOVAPD def macroop MOVAPD_XMM_XMM {
# MOVUPS movfp xmml, xmmlm, dataSize=8
# MOVUPD movfp xmmh, xmmhm, dataSize=8
# MOVHPS };
# MOVHPD
# MOVLPS def macroop MOVAPD_XMM_M {
ldfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVAPD_XMM_P {
rdip t7
ldfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
ldfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVAPD_M_XMM {
stfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
stfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVAPD_P_XMM {
rdip t7
stfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
stfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVUPS_XMM_XMM {
movfp xmml, xmmlm, dataSize=8
movfp xmmh, xmmhm, dataSize=8
};
def macroop MOVUPS_XMM_M {
ldfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVUPS_XMM_P {
rdip t7
ldfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
ldfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVUPS_M_XMM {
stfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
stfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVUPS_P_XMM {
rdip t7
stfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
stfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVUPD_XMM_XMM {
movfp xmml, xmmlm, dataSize=8
movfp xmmh, xmmhm, dataSize=8
};
def macroop MOVUPD_XMM_M {
ldfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVUPD_XMM_P {
rdip t7
ldfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
ldfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVUPD_M_XMM {
stfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
stfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVUPD_P_XMM {
rdip t7
stfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
stfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVHPS_XMM_M {
ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVHPS_XMM_P {
rdip t7
ldfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVHPS_M_XMM {
stfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVHPS_P_XMM {
rdip t7
stfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
stfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVHPD_XMM_M {
ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVHPD_XMM_P {
rdip t7
ldfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVHPD_M_XMM {
stfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVHPD_P_XMM {
rdip t7
stfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
stfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
};
def macroop MOVLPS_XMM_M {
ldfp xmml, seg, sib, disp, dataSize=8
};
def macroop MOVLPS_XMM_P {
rdip t7
ldfp xmml, seg, riprel, disp, dataSize=8
};
def macroop MOVLPS_M_XMM {
stfp xmml, seg, sib, disp, dataSize=8
};
def macroop MOVLPS_P_XMM {
rdip t7
stfp xmml, seg, riprel, disp, dataSize=8
};
def macroop MOVLPD_XMM_M { def macroop MOVLPD_XMM_M {
ldfp xmml, seg, sib, disp, dataSize=8 ldfp xmml, seg, sib, disp, dataSize=8
@ -111,12 +241,14 @@ def macroop MOVLPD_P_XMM {
stfp xmml, seg, riprel, disp, dataSize=8 stfp xmml, seg, riprel, disp, dataSize=8
}; };
def macroop MOVLPD_XMM_XMM { def macroop MOVHLPS_XMM_XMM {
movfp xmml, xmmlm, dataSize=8 movfp xmml, xmmhm, dataSize=8
};
def macroop MOVLHPS_XMM_XMM {
movfp xmmh, xmmlm, dataSize=8
}; };
# MOVHLPS
# MOVLHPS
# MOVSS # MOVSS
def macroop MOVSD_XMM_M { def macroop MOVSD_XMM_M {