From 09eed9ff621b6101289bde78f8cda6f360f6ef52 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 17 Aug 2009 18:33:28 -0700 Subject: X86: Implement the media floating point max instructions. --- .../compare_and_write_minimum_or_maximum.py | 74 ++++++++++++++++++++-- 1 file changed, 70 insertions(+), 4 deletions(-) (limited to 'src/arch/x86/isa/insts/simd128/floating_point/compare') diff --git a/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py b/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py index 5c4db2b69..17c97662c 100644 --- a/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py +++ b/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py @@ -123,8 +123,74 @@ def macroop MINSD_XMM_P { ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 mminf xmml, xmml, ufp1, ext=1, size=8 }; + +def macroop MAXPS_XMM_XMM { + mmaxf xmml, xmml, xmmlm, ext=0, size=4 + mmaxf xmmh, xmmh, xmmhm, ext=0, size=4 +}; + +def macroop MAXPS_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mmaxf xmml, xmml, ufp1, ext=0, size=4 + mmaxf xmmh, xmmh, ufp2, ext=0, size=4 +}; + +def macroop MAXPS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mmaxf xmml, xmml, ufp1, ext=0, size=4 + mmaxf xmmh, xmmh, ufp2, ext=0, size=4 +}; + +def macroop MAXPD_XMM_XMM { + mmaxf xmml, xmml, xmmlm, ext=0, size=8 + mmaxf xmmh, xmmh, xmmhm, ext=0, size=8 +}; + +def macroop MAXPD_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mmaxf xmml, xmml, ufp1, ext=0, size=8 + mmaxf xmmh, xmmh, ufp2, ext=0, size=8 +}; + +def macroop MAXPD_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mmaxf xmml, xmml, ufp1, ext=0, size=8 + mmaxf xmmh, xmmh, ufp2, ext=0, size=8 +}; + +def macroop MAXSS_XMM_XMM { + mmaxf xmml, xmml, xmmlm, ext=1, size=4 +}; + +def macroop MAXSS_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + mmaxf xmml, xmml, ufp1, ext=1, size=4 +}; + +def macroop MAXSS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + mmaxf xmml, xmml, ufp1, ext=1, size=4 +}; + +def macroop MAXSD_XMM_XMM { + mmaxf xmml, xmml, xmmlm, ext=1, size=8 +}; + +def macroop MAXSD_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + mmaxf xmml, xmml, ufp1, ext=1, size=8 +}; + +def macroop MAXSD_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + mmaxf xmml, xmml, ufp1, ext=1, size=8 +}; ''' -# MAXPS -# MAXPD -# MAXSS -# MAXSD -- cgit v1.2.3