From 83a78072dfd47c67ebe4e951fe400cb91a7b4873 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 17 Aug 2009 18:23:33 -0700 Subject: X86: Implement POR, ORPD and ORPS. --- src/arch/x86/isa/decoder/two_byte_opcodes.isa | 8 ++-- .../insts/simd128/floating_point/logical/orp.py | 45 +++++++++++++++++++++- .../x86/isa/insts/simd128/integer/logical/por.py | 22 ++++++++++- .../x86/isa/insts/simd64/integer/logical/por.py | 15 +++++++- 4 files changed, 82 insertions(+), 8 deletions(-) (limited to 'src/arch') diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index 8c49f02f5..10b0bb0e3 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -470,7 +470,7 @@ 0x3: rcpps_Vo_Wo(); 0x4: andps_Vo_Wo(); 0x5: andnps_Vo_Wo(); - 0x6: orps_Vo_Wo(); + 0x6: Inst::ORPS(Vo,Wo); 0x7: Inst::XORPS(Vo,Wo); } // repe (0xF3) @@ -486,7 +486,7 @@ 0x1: sqrtpd_Vo_Wo(); 0x4: andpd_Vo_Wo(); 0x5: andnpd_Vo_Wo(); - 0x6: orpd_Vo_Wo(); + 0x6: Inst::ORPD(Vo,Wo); //This really should be type o, but it works on q sized //chunks at a time. 0x7: Inst::XORPD(Vq,Wq); @@ -1046,7 +1046,7 @@ 0x0: psubsb_Pq_Qq(); 0x1: psubsw_Pq_Qq(); 0x2: pminsw_Pq_Qq(); - 0x3: por_Pq_Qq(); + 0x3: Inst::POR(Pq,Qq); 0x4: paddsb_Pq_Qq(); 0x5: paddsw_Pq_Qq(); 0x6: pmaxsw_Pq_Qq(); @@ -1057,7 +1057,7 @@ 0x0: psubsb_Vo_Wo(); 0x1: psubsw_Vo_Wo(); 0x2: pminsw_Vo_Wo(); - 0x3: por_Vo_Wo(); + 0x3: Inst::POR(Vo,Wo); 0x4: paddsb_Vo_Wo(); 0x5: paddsw_Vo_Wo(); 0x6: pmaxsw_Vo_Wo(); diff --git a/src/arch/x86/isa/insts/simd128/floating_point/logical/orp.py b/src/arch/x86/isa/insts/simd128/floating_point/logical/orp.py index fba71c899..c99a713aa 100644 --- a/src/arch/x86/isa/insts/simd128/floating_point/logical/orp.py +++ b/src/arch/x86/isa/insts/simd128/floating_point/logical/orp.py @@ -54,6 +54,47 @@ # Authors: Gabe Black microcode = ''' -# ORPS -# ORPD +def macroop ORPS_XMM_XMM { + mor xmml, xmml, xmmlm + mor xmmh, xmmh, xmmhm +}; + +def macroop ORPS_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 + mor xmml, xmml, ufp1 + mor xmmh, xmmh, ufp2 +}; + +def macroop ORPS_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 + mor xmml, xmml, ufp1 + mor xmmh, xmmh, ufp2 +}; + +def macroop ORPD_XMM_XMM { + mor xmml, xmml, xmmlm + mor xmmh, xmmh, xmmhm +}; + +def macroop ORPD_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 + mor xmml, xmml, ufp1 + mor xmmh, xmmh, ufp2 +}; + +def macroop ORPD_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 + mor xmml, xmml, ufp1 + mor xmmh, xmmh, ufp2 +}; ''' diff --git a/src/arch/x86/isa/insts/simd128/integer/logical/por.py b/src/arch/x86/isa/insts/simd128/integer/logical/por.py index addb28a60..dc0d7575b 100644 --- a/src/arch/x86/isa/insts/simd128/integer/logical/por.py +++ b/src/arch/x86/isa/insts/simd128/integer/logical/por.py @@ -54,5 +54,25 @@ # Authors: Gabe Black microcode = ''' -# POR +def macroop POR_XMM_XMM { + mor xmml, xmml, xmmlm + mor xmmh, xmmh, xmmhm +}; + +def macroop POR_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 + mor xmml, xmml, ufp1 + mor xmmh, xmmh, ufp2 +}; + +def macroop POR_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 + mor xmml, xmml, ufp1 + mor xmmh, xmmh, ufp2 +}; ''' diff --git a/src/arch/x86/isa/insts/simd64/integer/logical/por.py b/src/arch/x86/isa/insts/simd64/integer/logical/por.py index addb28a60..701ac95b5 100644 --- a/src/arch/x86/isa/insts/simd64/integer/logical/por.py +++ b/src/arch/x86/isa/insts/simd64/integer/logical/por.py @@ -54,5 +54,18 @@ # Authors: Gabe Black microcode = ''' -# POR +def macroop POR_MMX_MMX { + mor mmx, mmx, mmxm +}; + +def macroop POR_MMX_M { + ldfp ufp1, seg, sib, disp, dataSize=8 + mor mmx, mmx, ufp1 +}; + +def macroop POR_MMX_P { + rdip t7 + ldfp ufp1, seg, riprel, disp, dataSize=8 + mor mmx, mmx, ufp1 +}; ''' -- cgit v1.2.3