changeset 17414b661543 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=17414b661543
description:
        X86: Implement PAND, ANDPS, and ANDPD.

diffstat:

4 files changed, 85 insertions(+), 11 deletions(-)
src/arch/x86/isa/decoder/two_byte_opcodes.isa                 |    8 -
src/arch/x86/isa/insts/simd128/floating_point/logical/andp.py |   47 +++++++++-
src/arch/x86/isa/insts/simd128/integer/logical/pand.py        |   24 ++++-
src/arch/x86/isa/insts/simd64/integer/logical/pand.py         |   17 +++

diffs (152 lines):

diff -r df1ebe278239 -r 17414b661543 
src/arch/x86/isa/decoder/two_byte_opcodes.isa
--- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa     Mon Aug 17 18:24:16 
2009 -0700
+++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa     Mon Aug 17 18:24:18 
2009 -0700
@@ -468,7 +468,7 @@
                     0x1: sqrtps_Vo_Wo();
                     0x2: rqsrtps_Vo_Wo();
                     0x3: rcpps_Vo_Wo();
-                    0x4: andps_Vo_Wo();
+                    0x4: Inst::ANDPS(Vo,Wo);
                     0x5: andnps_Vo_Wo();
                     0x6: Inst::ORPS(Vo,Wo);
                     0x7: Inst::XORPS(Vo,Wo);
@@ -484,7 +484,7 @@
                 0x1: decode OPCODE_OP_BOTTOM3 {
                     0x0: movmskpd_Gd_VRo();
                     0x1: sqrtpd_Vo_Wo();
-                    0x4: andpd_Vo_Wo();
+                    0x4: Inst::ANDPD(Vo,Wo);
                     0x5: andnpd_Vo_Wo();
                     0x6: Inst::ORPD(Vo,Wo);
                     //This really should be type o, but it works on q sized
@@ -986,7 +986,7 @@
                     0x0: psubusb_Pq_Qq();
                     0x1: psubusw_Pq_Qq();
                     0x2: pminub_Pq_Qq();
-                    0x3: pand_Pq_Qq();
+                    0x3: Inst::PAND(Pq,Qq);
                     0x4: paddusb_Pq_Qq();
                     0x5: paddusw_Pq_Qq();
                     0x6: pmaxub_Pq_Qq();
@@ -997,7 +997,7 @@
                     0x0: psubusb_Vo_Wo();
                     0x1: psubusw_Vo_Wo();
                     0x2: pminub_Vo_Wo();
-                    0x3: pand_Vo_Wo();
+                    0x3: Inst::PAND(Vo,Wo);
                     0x4: paddusb_Vo_Wo();
                     0x5: paddusw_Vo_Wo();
                     0x6: pmaxub_Vo_Wo();
diff -r df1ebe278239 -r 17414b661543 
src/arch/x86/isa/insts/simd128/floating_point/logical/andp.py
--- a/src/arch/x86/isa/insts/simd128/floating_point/logical/andp.py     Mon Aug 
17 18:24:16 2009 -0700
+++ b/src/arch/x86/isa/insts/simd128/floating_point/logical/andp.py     Mon Aug 
17 18:24:18 2009 -0700
@@ -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 -r df1ebe278239 -r 17414b661543 
src/arch/x86/isa/insts/simd128/integer/logical/pand.py
--- a/src/arch/x86/isa/insts/simd128/integer/logical/pand.py    Mon Aug 17 
18:24:16 2009 -0700
+++ b/src/arch/x86/isa/insts/simd128/integer/logical/pand.py    Mon Aug 17 
18:24:18 2009 -0700
@@ -54,6 +54,26 @@
 # Authors: Gabe Black
 
 microcode = '''
-# PAND
+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 -r df1ebe278239 -r 17414b661543 
src/arch/x86/isa/insts/simd64/integer/logical/pand.py
--- a/src/arch/x86/isa/insts/simd64/integer/logical/pand.py     Mon Aug 17 
18:24:16 2009 -0700
+++ b/src/arch/x86/isa/insts/simd64/integer/logical/pand.py     Mon Aug 17 
18:24:18 2009 -0700
@@ -54,6 +54,19 @@
 # Authors: Gabe Black
 
 microcode = '''
-# PAND
+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
-'''
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to