diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 18:32:12 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 18:32:12 -0700 |
commit | 34f528bd95685e8675bd28d02c51ae3eb549c196 (patch) | |
tree | 259da5f55400c7d179087911f39c06fcfb3e75cc /src/arch/x86 | |
parent | 1d706c04348383e7af62dbf975e7f05552d54b77 (diff) | |
download | gem5-34f528bd95685e8675bd28d02c51ae3eb549c196.tar.xz |
X86: Implement the media floating point min instructions.
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/isa/decoder/two_byte_opcodes.isa | 12 | ||||
-rw-r--r-- | src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py | 75 |
2 files changed, 76 insertions, 11 deletions
diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index 39d56212d..6a18e6c62 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -509,7 +509,7 @@ 0x2: cvtps2pd_Vo_Wq(); 0x3: cvtdq2ps_Vo_Wo(); 0x4: subps_Vo_Wo(); - 0x5: minps_Vo_Wo(); + 0x5: Inst::MINPS(Vo,Wo); 0x6: divps_Vo_Wo(); 0x7: maxps_Vo_Wo(); } @@ -520,7 +520,7 @@ 0x2: cvtss2sd_Vq_Wd(); 0x3: cvttps2dq_Vo_Wo(); 0x4: subss_Vd_Wd(); - 0x5: minss_Vd_Wd(); + 0x5: Inst::MINSS(Vd,Wd); 0x6: divss_Vd_Wd(); 0x7: maxss_Vd_Wd(); } @@ -531,7 +531,7 @@ 0x2: cvtpd2ps_Vo_Wo(); 0x3: cvtps2dq_Vo_Wo(); 0x4: subpd_Vo_Wo(); - 0x5: minpd_Vo_Wo(); + 0x5: Inst::MINPD(Vo,Wo); 0x6: divpd_Vo_Wo(); 0x7: maxpd_Vo_Wo(); } @@ -541,7 +541,7 @@ 0x1: Inst::MULSD(Vq,Wq); 0x2: cvtsd2ss_Vd_Wq(); 0x4: Inst::SUBSD(Vq,Wq); - 0x5: minsd_Vq_Wq(); + 0x5: Inst::MINSD(Vq,Wq); 0x6: Inst::DIVSD(Vq,Wq); 0x7: maxsd_Vq_Wq(); default: Inst::UD2(); @@ -916,7 +916,7 @@ 0x2: cmpccps_Vo_Wo_Ib(); 0x3: cvtdq2ps_Vo_Wo(); 0x4: subps_Vo_Wo(); - 0x5: minps_Vo_Wo(); + 0x5: Inst::MINPS(Vo,Wo); 0x6: divps_Vo_Wo(); } // repe (0xF3) @@ -928,7 +928,7 @@ 0x1: decode OPCODE_OP_BOTTOM3 { 0x2: cmpccpd_Vo_Wo_Ib(); 0x4: subpd_Vo_Wo(); - 0x5: minpd_Vo_Wo(); + 0x5: Inst::MINPD(Vo,Wo); 0x6: divpd_Vo_Wo(); default: Inst::UD2(); } 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 8ef363333..5c4db2b69 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 @@ -54,12 +54,77 @@ # Authors: Gabe Black microcode = ''' +def macroop MINPS_XMM_XMM { + mminf xmml, xmml, xmmlm, ext=0, size=4 + mminf xmmh, xmmh, xmmhm, ext=0, size=4 +}; + +def macroop MINPS_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mminf xmml, xmml, ufp1, ext=0, size=4 + mminf xmmh, xmmh, ufp2, ext=0, size=4 +}; + +def macroop MINPS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mminf xmml, xmml, ufp1, ext=0, size=4 + mminf xmmh, xmmh, ufp2, ext=0, size=4 +}; + +def macroop MINPD_XMM_XMM { + mminf xmml, xmml, xmmlm, ext=0, size=8 + mminf xmmh, xmmh, xmmhm, ext=0, size=8 +}; + +def macroop MINPD_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mminf xmml, xmml, ufp1, ext=0, size=8 + mminf xmmh, xmmh, ufp2, ext=0, size=8 +}; + +def macroop MINPD_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mminf xmml, xmml, ufp1, ext=0, size=8 + mminf xmmh, xmmh, ufp2, ext=0, size=8 +}; + +def macroop MINSS_XMM_XMM { + mminf xmml, xmml, xmmlm, ext=1, size=4 +}; + +def macroop MINSS_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + mminf xmml, xmml, ufp1, ext=1, size=4 +}; + +def macroop MINSS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + mminf xmml, xmml, ufp1, ext=1, size=4 +}; + +def macroop MINSD_XMM_XMM { + mminf xmml, xmml, xmmlm, ext=1, size=8 +}; + +def macroop MINSD_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + mminf xmml, xmml, ufp1, ext=1, size=8 +}; + +def macroop MINSD_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + mminf xmml, xmml, ufp1, ext=1, size=8 +}; +''' # MAXPS # MAXPD # MAXSS # MAXSD -# MINPS -# MINPD -# MINSS -# MINSD -''' |