X86: Implement PUNPCKHBW.

This commit is contained in:
Gabe Black 2009-08-17 18:19:19 -07:00
parent 3ae2f03927
commit 093b5b3274
3 changed files with 37 additions and 4 deletions

View file

@ -576,7 +576,7 @@
0x0D: decode LEGACY_DECODEVAL {
// no prefix
0x0: decode OPCODE_OP_BOTTOM3 {
0x0: punpckhbw_Pq_Qq();
0x0: Inst::PUNPCKHBW(Pq,Qq);
0x1: punpckhwd_Pq_Qq();
0x2: punpckhdq_Pq_Qq();
0x3: packssdw_Pq_Qq();
@ -591,7 +591,7 @@
}
// operand size (0x66)
0x1: decode OPCODE_OP_BOTTOM3 {
0x0: punpckhbw_Vo_Wo();
0x0: Inst::PUNPCKHBW(Vo,Wo);
0x1: punpckhwd_Vo_Wo();
0x2: punpckhdq_Vo_Wo();
0x3: packssdw_Vo_Wo();

View file

@ -107,8 +107,27 @@ def macroop PUNPCKLDQ_XMM_P {
unpack xmmh, xmml, ufp1, sel=1, size=4
unpack xmml, xmml, ufp1, sel=0, size=4
};
def macroop PUNPCKHBW_XMM_XMM {
unpack xmml, xmmh, xmmhm, sel=0, size=1
unpack xmmh, xmmh, xmmhm, sel=1, size=1
};
def macroop PUNPCKHBW_XMM_M {
lea t1, seg, sib, disp, dataSize=asz
ldfp ufp1, seg, [1, t0, t1], 8, dataSize=8
unpack xmml, xmmh, ufp1, sel=0, size=1
unpack xmmh, xmmh, ufp1, sel=1, size=1
};
def macroop PUNPCKHBW_XMM_P {
rdip t7
lea t1, seg, riprel, disp, dataSize=asz
ldfp ufp1, seg, [1, t0, t1], 8, dataSize=8
unpack xmml, xmmh, ufp1, sel=0, size=1
unpack xmmh, xmmh, ufp1, sel=1, size=1
};
'''
# PUNPCKHBW
# PUNPCKHWD
# PUNPCKHDQ
# PUNPCKHQDQ

View file

@ -98,7 +98,21 @@ def macroop PUNPCKLDQ_MMX_P {
ldfp ufp1, seg, riprel, disp, dataSize=8
unpack mmx, mmx, ufp1, sel=0, size=4
};
def macroop PUNPCKHBW_MMX_MMX {
unpack mmx, mmx, mmxm, sel=1, size=1
};
def macroop PUNPCKHBW_MMX_M {
ldfp ufp1, seg, sib, disp, dataSize=8
unpack mmx, mmx, ufp1, sel=1, size=1
};
def macroop PUNPCKHBW_MMX_P {
rdip t7
ldfp ufp1, seg, riprel, disp, dataSize=8
unpack mmx, mmx, ufp1, sel=1, size=1
};
'''
# PUNPCKHBW
# PUNPCKHWD
# PUNPCKHDQ