summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-17 20:22:56 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-17 20:22:56 -0700
commit4c23e631f26f4195212df94684b347fe3639d3fe (patch)
tree4bf091ab09b148198efadb0da7dc8697db3c59cb /src/arch/x86/isa/insts
parentc0e850c77a905f69d99353780357cc1e0fe54148 (diff)
downloadgem5-4c23e631f26f4195212df94684b347fe3639d3fe.tar.xz
X86: Implement the insert/extract instructions.
Diffstat (limited to 'src/arch/x86/isa/insts')
-rw-r--r--src/arch/x86/isa/insts/simd128/integer/data_reordering/extract_and_insert.py24
-rw-r--r--src/arch/x86/isa/insts/simd64/integer/data_reordering/extract_and_insert.py20
2 files changed, 40 insertions, 4 deletions
diff --git a/src/arch/x86/isa/insts/simd128/integer/data_reordering/extract_and_insert.py b/src/arch/x86/isa/insts/simd128/integer/data_reordering/extract_and_insert.py
index 80f7a3e71..f4f06ca67 100644
--- a/src/arch/x86/isa/insts/simd128/integer/data_reordering/extract_and_insert.py
+++ b/src/arch/x86/isa/insts/simd128/integer/data_reordering/extract_and_insert.py
@@ -54,6 +54,26 @@
# Authors: Gabe Black
microcode = '''
-# PEXTRW
-# PINSRW
+def macroop PEXTRW_R_XMM_I {
+ mov2int reg, xmmlm, "IMMEDIATE & mask(3)", size=2, ext=1
+ mov2int reg, xmmhm, "IMMEDIATE & mask(3)", size=2, ext=1
+};
+
+def macroop PINSRW_XMM_R_I {
+ mov2fp xmml, regm, "IMMEDIATE & mask(3)", size=2, ext=1
+ mov2fp xmmh, regm, "IMMEDIATE & mask(3)", size=2, ext=1
+};
+
+def macroop PINSRW_XMM_M_I {
+ ld t1, seg, sib, disp, dataSize=2
+ mov2fp xmml, t1, "IMMEDIATE & mask(3)", size=2, ext=1
+ mov2fp xmmh, t1, "IMMEDIATE & mask(3)", size=2, ext=1
+};
+
+def macroop PINSRW_XMM_P_I {
+ rdip t7
+ ld t1, seg, riprel, disp, dataSize=2
+ mov2fp xmml, t1, "IMMEDIATE & mask(3)", size=2, ext=1
+ mov2fp xmmh, t1, "IMMEDIATE & mask(3)", size=2, ext=1
+};
'''
diff --git a/src/arch/x86/isa/insts/simd64/integer/data_reordering/extract_and_insert.py b/src/arch/x86/isa/insts/simd64/integer/data_reordering/extract_and_insert.py
index 80f7a3e71..c9ebbcf14 100644
--- a/src/arch/x86/isa/insts/simd64/integer/data_reordering/extract_and_insert.py
+++ b/src/arch/x86/isa/insts/simd64/integer/data_reordering/extract_and_insert.py
@@ -54,6 +54,22 @@
# Authors: Gabe Black
microcode = '''
-# PEXTRW
-# PINSRW
+def macroop PEXTRW_R_MMX_I {
+ mov2int reg, mmxm, "IMMEDIATE & mask(2)", size=2, ext=0
+};
+
+def macroop PINSRW_MMX_R_I {
+ mov2fp mmx, regm, "IMMEDIATE & mask(2)", size=2, ext=0
+};
+
+def macroop PINSRW_MMX_M_I {
+ ld t1, seg, sib, disp, dataSize=2
+ mov2fp mmx, t1, "IMMEDIATE & mask(2)", size=2, ext=0
+};
+
+def macroop PINSRW_MMX_P_I {
+ rdip t7
+ ld t1, seg, riprel, disp, dataSize=2
+ mov2fp mmx, t1, "IMMEDIATE & mask(2)", size=2, ext=0
+};
'''