summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-17 18:27:19 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-17 18:27:19 -0700
commit63403bd5628e722aa51045b86176a035ddd9eb75 (patch)
treefc028237f21f97008fdf9e2007971a4df706bb4c /src
parent7b18f8a06297b741a60d50ddb7de811bb3afd824 (diff)
downloadgem5-63403bd5628e722aa51045b86176a035ddd9eb75.tar.xz
X86: Implement the remaining unpack instructions.
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/isa/decoder/two_byte_opcodes.isa8
-rw-r--r--src/arch/x86/isa/insts/simd128/floating_point/data_reordering/unpack_and_interleave.py74
2 files changed, 74 insertions, 8 deletions
diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
index 5a6a17b17..2c58798b3 100644
--- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa
+++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
@@ -295,8 +295,8 @@
default: movlps_Vq_Mq();
}
0x3: movlps_Mq_Vq();
- 0x4: unpcklps();
- 0x5: unpckhps();
+ 0x4: Inst::UNPCKLPS(Vps,Wq);
+ 0x5: Inst::UNPCKHPS(Vpd,Wq);
0x6: decode MODRM_MOD {
0x3: movlhps_Vq_VRq();
default: movhps_Vq_Mq();
@@ -317,8 +317,8 @@
0x1: movupd_Wo_Vo();
0x2: Inst::MOVLPD(Vq,Mq);
0x3: Inst::MOVLPD(Mq,Vq);
- 0x4: unpcklpd_Vo_Wq();
- 0x5: unpckhpd_Vo_Wo();
+ 0x4: Inst::UNPCKLPD(Vo,Wq);
+ 0x5: Inst::UNPCKHPD(Vo,Wo);
0x6: movhpd_Vq_Mq();
0x7: movhpd_Mq_Vq();
}
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/data_reordering/unpack_and_interleave.py b/src/arch/x86/isa/insts/simd128/floating_point/data_reordering/unpack_and_interleave.py
index 93112f7d6..9244f5e6d 100644
--- a/src/arch/x86/isa/insts/simd128/floating_point/data_reordering/unpack_and_interleave.py
+++ b/src/arch/x86/isa/insts/simd128/floating_point/data_reordering/unpack_and_interleave.py
@@ -54,8 +54,74 @@
# Authors: Gabe Black
microcode = '''
-# UNPCKHPS
-# UNPCKHPD
-# UNPCKLPS
-# UNPCKLPD
+def macroop UNPCKLPS_XMM_XMM {
+ unpack xmmh, xmml, xmmlm, sel=1, size=4
+ unpack xmml, xmml, xmmlm, sel=0, size=4
+};
+
+def macroop UNPCKLPS_XMM_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ unpack xmmh, xmml, ufp1, sel=1, size=4
+ unpack xmml, xmml, ufp1, sel=0, size=4
+};
+
+def macroop UNPCKLPS_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ unpack xmmh, xmml, ufp1, sel=1, size=4
+ unpack xmml, xmml, ufp1, sel=0, size=4
+};
+
+def macroop UNPCKLPD_XMM_XMM {
+ movfp xmmh, xmmlm
+};
+
+def macroop UNPCKLPD_XMM_M {
+ ldfp xmmh, seg, sib, disp, dataSize=8
+};
+
+def macroop UNPCKLPD_XMM_P {
+ rdip t7
+ ldfp xmmh, seg, riprel, disp, dataSize=8
+};
+
+def macroop UNPCKHPS_XMM_XMM {
+ unpack xmml, xmmh, xmmhm, sel=0, size=4
+ unpack xmmh, xmmh, xmmhm, sel=1, size=4
+};
+
+def macroop UNPCKHPS_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=4
+ unpack xmmh, xmmh, ufp1, sel=1, size=4
+};
+
+def macroop UNPCKHPS_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=4
+ unpack xmmh, xmmh, ufp1, sel=1, size=4
+};
+
+def macroop UNPCKHPD_XMM_XMM {
+ movfp xmml, xmmh
+ movfp xmmh, xmmhm
+};
+
+def macroop UNPCKHPD_XMM_M {
+ lea t1, seg, sib, disp, dataSize=asz
+ ldfp ufp1, seg, [1, t0, t1], 8, dataSize=8
+ movfp xmml, xmmh
+ movfp xmmh, ufp1
+};
+
+def macroop UNPCKHPD_XMM_P {
+ rdip t7
+ lea t1, seg, riprel, disp, dataSize=asz
+ ldfp ufp1, seg, [1, t0, t1], 8, dataSize=8
+ movfp xmml, xmmh
+ movfp xmmh, ufp1
+};
'''