summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-17 18:19:43 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-17 18:19:43 -0700
commit535ba241f8fa655c99afb0978fdd7e63c33dbe74 (patch)
tree068b2672f44098000cc1ee1ce0292569e49cadbb /src/arch/x86
parent093b5b3274a8650798956827fbfb6c98fa7e17b8 (diff)
downloadgem5-535ba241f8fa655c99afb0978fdd7e63c33dbe74.tar.xz
X86: Implement PUNPCKHWD.
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/isa/decoder/two_byte_opcodes.isa4
-rw-r--r--src/arch/x86/isa/insts/simd128/integer/data_reordering/unpack_and_interleave.py21
-rw-r--r--src/arch/x86/isa/insts/simd64/integer/data_reordering/unpack_and_interleave.py16
3 files changed, 37 insertions, 4 deletions
diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
index 8aec89abf..6a31ea164 100644
--- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa
+++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
@@ -577,7 +577,7 @@
// no prefix
0x0: decode OPCODE_OP_BOTTOM3 {
0x0: Inst::PUNPCKHBW(Pq,Qq);
- 0x1: punpckhwd_Pq_Qq();
+ 0x1: Inst::PUNPCKHWD(Pq,Qq);
0x2: punpckhdq_Pq_Qq();
0x3: packssdw_Pq_Qq();
0x6: Inst::MOVD(Pq,Edp);
@@ -592,7 +592,7 @@
// operand size (0x66)
0x1: decode OPCODE_OP_BOTTOM3 {
0x0: Inst::PUNPCKHBW(Vo,Wo);
- 0x1: punpckhwd_Vo_Wo();
+ 0x1: Inst::PUNPCKHWD(Vo,Wo);
0x2: punpckhdq_Vo_Wo();
0x3: packssdw_Vo_Wo();
0x4: punpcklqdq_Vo_Wq();
diff --git a/src/arch/x86/isa/insts/simd128/integer/data_reordering/unpack_and_interleave.py b/src/arch/x86/isa/insts/simd128/integer/data_reordering/unpack_and_interleave.py
index defa76a6a..0869c42f9 100644
--- a/src/arch/x86/isa/insts/simd128/integer/data_reordering/unpack_and_interleave.py
+++ b/src/arch/x86/isa/insts/simd128/integer/data_reordering/unpack_and_interleave.py
@@ -127,8 +127,27 @@ def macroop PUNPCKHBW_XMM_P {
unpack xmml, xmmh, ufp1, sel=0, size=1
unpack xmmh, xmmh, ufp1, sel=1, size=1
};
+
+def macroop PUNPCKHWD_XMM_XMM {
+ unpack xmml, xmmh, xmmhm, sel=0, size=2
+ unpack xmmh, xmmh, xmmhm, sel=1, size=2
+};
+
+def macroop PUNPCKHWD_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=2
+ unpack xmmh, xmmh, ufp1, sel=1, size=2
+};
+
+def macroop PUNPCKHWD_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=2
+ unpack xmmh, xmmh, ufp1, sel=1, size=2
+};
'''
-# PUNPCKHWD
# PUNPCKHDQ
# PUNPCKHQDQ
# PUNPCKLQDQ
diff --git a/src/arch/x86/isa/insts/simd64/integer/data_reordering/unpack_and_interleave.py b/src/arch/x86/isa/insts/simd64/integer/data_reordering/unpack_and_interleave.py
index 53c4dc81e..b01f008e1 100644
--- a/src/arch/x86/isa/insts/simd64/integer/data_reordering/unpack_and_interleave.py
+++ b/src/arch/x86/isa/insts/simd64/integer/data_reordering/unpack_and_interleave.py
@@ -113,6 +113,20 @@ def macroop PUNPCKHBW_MMX_P {
ldfp ufp1, seg, riprel, disp, dataSize=8
unpack mmx, mmx, ufp1, sel=1, size=1
};
+
+def macroop PUNPCKHWD_MMX_MMX {
+ unpack mmx, mmx, mmxm, sel=1, size=2
+};
+
+def macroop PUNPCKHWD_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ unpack mmx, mmx, ufp1, sel=1, size=2
+};
+
+def macroop PUNPCKHWD_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ unpack mmx, mmx, ufp1, sel=1, size=2
+};
'''
-# PUNPCKHWD
# PUNPCKHDQ