summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-17 18:25:00 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-17 18:25:00 -0700
commit7b18f8a06297b741a60d50ddb7de811bb3afd824 (patch)
tree066fcff74845c8f48811a56a6d8f4d5868736a83 /src/arch/x86
parent458521f055f54f2e79df18ddf52243ad26ed64fc (diff)
downloadgem5-7b18f8a06297b741a60d50ddb7de811bb3afd824.tar.xz
X86: Implement PANDN, ANDNPS, and ANDNPD.
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/isa/decoder/two_byte_opcodes.isa8
-rw-r--r--src/arch/x86/isa/insts/simd128/floating_point/logical/andp.py46
-rw-r--r--src/arch/x86/isa/insts/simd128/integer/logical/pand.py23
-rw-r--r--src/arch/x86/isa/insts/simd64/integer/logical/pand.py16
4 files changed, 85 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 4fd1fa4fc..5a6a17b17 100644
--- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa
+++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
@@ -469,7 +469,7 @@
0x2: rqsrtps_Vo_Wo();
0x3: rcpps_Vo_Wo();
0x4: Inst::ANDPS(Vo,Wo);
- 0x5: andnps_Vo_Wo();
+ 0x5: Inst::ANDNPS(Vo,Wo);
0x6: Inst::ORPS(Vo,Wo);
0x7: Inst::XORPS(Vo,Wo);
}
@@ -485,7 +485,7 @@
0x0: movmskpd_Gd_VRo();
0x1: sqrtpd_Vo_Wo();
0x4: Inst::ANDPD(Vo,Wo);
- 0x5: andnpd_Vo_Wo();
+ 0x5: Inst::ANDNPD(Vo,Wo);
0x6: Inst::ORPD(Vo,Wo);
//This really should be type o, but it works on q sized
//chunks at a time.
@@ -990,7 +990,7 @@
0x4: paddusb_Pq_Qq();
0x5: paddusw_Pq_Qq();
0x6: pmaxub_Pq_Qq();
- 0x7: pandn_Pq_Qq();
+ 0x7: Inst::PANDN(Pq,Qq);
}
// operand size (0x66)
0x1: decode OPCODE_OP_BOTTOM3 {
@@ -1001,7 +1001,7 @@
0x4: paddusb_Vo_Wo();
0x5: paddusw_Vo_Wo();
0x6: pmaxub_Vo_Wo();
- 0x7: pandn_Vo_Wo();
+ 0x7: Inst::PANDN(Vo,Wo);
}
default: Inst::UD2();
}
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 104af8fa3..e3eaf16a0 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
@@ -97,6 +97,48 @@ def macroop ANDPD_XMM_P {
mand xmml, xmml, ufp1
mand xmmh, xmmh, ufp2
};
+
+def macroop ANDNPS_XMM_XMM {
+ mandn xmml, xmml, xmmlm
+ mandn xmmh, xmmh, xmmhm
+};
+
+def macroop ANDNPS_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
+ mandn xmml, xmml, ufp1
+ mandn xmmh, xmmh, ufp2
+};
+
+def macroop ANDNPS_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
+ mandn xmml, xmml, ufp1
+ mandn xmmh, xmmh, ufp2
+};
+
+def macroop ANDNPD_XMM_XMM {
+ mandn xmml, xmml, xmmlm
+ mandn xmmh, xmmh, xmmhm
+};
+
+def macroop ANDNPD_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
+ mandn xmml, xmml, ufp1
+ mandn xmmh, xmmh, ufp2
+};
+
+def macroop ANDNPD_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
+ mandn xmml, xmml, ufp1
+ mandn 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 aae80c8b5..69699454d 100644
--- a/src/arch/x86/isa/insts/simd128/integer/logical/pand.py
+++ b/src/arch/x86/isa/insts/simd128/integer/logical/pand.py
@@ -75,5 +75,26 @@ def macroop PAND_XMM_P {
mand xmml, xmml, ufp1
mand xmmh, xmmh, ufp2
};
+
+def macroop PANDN_XMM_XMM {
+ mandn xmml, xmml, xmmlm
+ mandn xmmh, xmmh, xmmhm
+};
+
+def macroop PANDN_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
+ mandn xmml, xmml, ufp1
+ mandn xmmh, xmmh, ufp2
+};
+
+def macroop PANDN_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
+ mandn xmml, xmml, ufp1
+ mandn 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 15513ef98..181c26a62 100644
--- a/src/arch/x86/isa/insts/simd64/integer/logical/pand.py
+++ b/src/arch/x86/isa/insts/simd64/integer/logical/pand.py
@@ -68,5 +68,19 @@ def macroop PAND_MMX_P {
ldfp ufp1, seg, riprel, disp, dataSize=8
mand mmx, mmx, ufp1
};
+
+def macroop PANDN_MMX_MMX {
+ mandn mmx, mmx, mmxm
+};
+
+def macroop PANDN_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ mandn mmx, mmx, ufp1
+};
+
+def macroop PANDN_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ mandn mmx, mmx, ufp1
+};
'''
-# PANDN