summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-17 18:24:18 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-17 18:24:18 -0700
commit3633392ec4e7e3dade7501f31751aef54a471ee5 (patch)
tree76414fe2eda7b1d6740da2f1e3afe1af400a831b /src/arch/x86/isa/insts
parentab49a34a4ef8bea1235433437e27eaf50c427336 (diff)
downloadgem5-3633392ec4e7e3dade7501f31751aef54a471ee5.tar.xz
X86: Implement PAND, ANDPS, and ANDPD.
Diffstat (limited to 'src/arch/x86/isa/insts')
-rw-r--r--src/arch/x86/isa/insts/simd128/floating_point/logical/andp.py47
-rw-r--r--src/arch/x86/isa/insts/simd128/integer/logical/pand.py24
-rw-r--r--src/arch/x86/isa/insts/simd64/integer/logical/pand.py17
3 files changed, 81 insertions, 7 deletions
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/logical/andp.py b/src/arch/x86/isa/insts/simd128/floating_point/logical/andp.py
index 8d7d3ba25..104af8fa3 100644
--- a/src/arch/x86/isa/insts/simd128/floating_point/logical/andp.py
+++ b/src/arch/x86/isa/insts/simd128/floating_point/logical/andp.py
@@ -54,8 +54,49 @@
# Authors: Gabe Black
microcode = '''
-# ANDPS
-# ANDPD
+def macroop ANDPS_XMM_XMM {
+ mand xmml, xmml, xmmlm
+ mand xmmh, xmmh, xmmhm
+};
+
+def macroop ANDPS_XMM_M {
+ lea t1, seg, sib, disp, dataSize=asz
+ ldfp ufp1, seg, [1, t0, t1], dataSize=8
+ ldfp ufp2, seg, [1, t0, t1], 8, dataSize=8
+ mand xmml, xmml, ufp1
+ mand xmmh, xmmh, ufp2
+};
+
+def macroop ANDPS_XMM_P {
+ rdip t7
+ lea t1, seg, riprel, disp, dataSize=asz
+ ldfp ufp1, seg, [1, t0, t1], dataSize=8
+ ldfp ufp2, seg, [1, t0, t1], 8, dataSize=8
+ mand xmml, xmml, ufp1
+ mand xmmh, xmmh, ufp2
+};
+
+def macroop ANDPD_XMM_XMM {
+ mand xmml, xmml, xmmlm
+ mand xmmh, xmmh, xmmhm
+};
+
+def macroop ANDPD_XMM_M {
+ lea t1, seg, sib, disp, dataSize=asz
+ ldfp ufp1, seg, [1, t0, t1], dataSize=8
+ ldfp ufp2, seg, [1, t0, t1], 8, dataSize=8
+ mand xmml, xmml, ufp1
+ mand xmmh, xmmh, ufp2
+};
+
+def macroop ANDPD_XMM_P {
+ rdip t7
+ lea t1, seg, riprel, disp, dataSize=asz
+ ldfp ufp1, seg, [1, t0, t1], dataSize=8
+ ldfp ufp2, seg, [1, t0, t1], 8, dataSize=8
+ mand xmml, xmml, ufp1
+ mand xmmh, xmmh, ufp2
+};
+'''
# ANDNPS
# ANDNPD
-'''
diff --git a/src/arch/x86/isa/insts/simd128/integer/logical/pand.py b/src/arch/x86/isa/insts/simd128/integer/logical/pand.py
index 055b7c5f6..aae80c8b5 100644
--- a/src/arch/x86/isa/insts/simd128/integer/logical/pand.py
+++ b/src/arch/x86/isa/insts/simd128/integer/logical/pand.py
@@ -54,6 +54,26 @@
# Authors: Gabe Black
microcode = '''
-# PAND
-# PANDN
+def macroop PAND_XMM_XMM {
+ mand xmml, xmml, xmmlm
+ mand xmmh, xmmh, xmmhm
+};
+
+def macroop PAND_XMM_M {
+ lea t1, seg, sib, disp, dataSize=asz
+ ldfp ufp1, seg, [1, t0, t1], dataSize=8
+ ldfp ufp2, seg, [1, t0, t1], 8, dataSize=8
+ mand xmml, xmml, ufp1
+ mand xmmh, xmmh, ufp2
+};
+
+def macroop PAND_XMM_P {
+ rdip t7
+ lea t1, seg, riprel, disp, dataSize=asz
+ ldfp ufp1, seg, [1, t0, t1], dataSize=8
+ ldfp ufp2, seg, [1, t0, t1], 8, dataSize=8
+ mand xmml, xmml, ufp1
+ mand xmmh, xmmh, ufp2
+};
'''
+# PANDN
diff --git a/src/arch/x86/isa/insts/simd64/integer/logical/pand.py b/src/arch/x86/isa/insts/simd64/integer/logical/pand.py
index 055b7c5f6..15513ef98 100644
--- a/src/arch/x86/isa/insts/simd64/integer/logical/pand.py
+++ b/src/arch/x86/isa/insts/simd64/integer/logical/pand.py
@@ -54,6 +54,19 @@
# Authors: Gabe Black
microcode = '''
-# PAND
-# PANDN
+def macroop PAND_MMX_MMX {
+ mand mmx, mmx, mmxm
+};
+
+def macroop PAND_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ mand mmx, mmx, ufp1
+};
+
+def macroop PAND_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ mand mmx, mmx, ufp1
+};
'''
+# PANDN