From: Gabe Black Date: Tue, 18 Aug 2009 01:40:40 +0000 (-0700) Subject: X86: Implement the floating point media instructions. X-Git-Tag: Calvin_Submission~92 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b34b507fd848db1ddf59fc024790f93ef5f4ad09;p=gem5.git X86: Implement the floating point media instructions. --- diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index aedf6bcfa..eccfee1b3 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -510,7 +510,7 @@ 0x3: cvtdq2ps_Vo_Wo(); 0x4: Inst::SUBPS(Vo,Wo); 0x5: Inst::MINPS(Vo,Wo); - 0x6: divps_Vo_Wo(); + 0x6: Inst::DIVPS(Vo,Wo); 0x7: Inst::MAXPS(Vo,Wo); } // repe (0xF3) @@ -521,7 +521,7 @@ 0x3: cvttps2dq_Vo_Wo(); 0x4: Inst::SUBSS(Vd,Wd); 0x5: Inst::MINSS(Vd,Wd); - 0x6: divss_Vd_Wd(); + 0x6: Inst::DIVSS(Vd,Wd); 0x7: Inst::MAXSS(Vd,Wd); } // operand size (0x66) @@ -532,7 +532,7 @@ 0x3: cvtps2dq_Vo_Wo(); 0x4: Inst::SUBPD(Vo,Wo); 0x5: Inst::MINPD(Vo,Wo); - 0x6: divpd_Vo_Wo(); + 0x6: Inst::DIVPD(Vo,Wo); 0x7: Inst::MAXPD(Vo,Wo); } // repne (0xF2) @@ -917,7 +917,7 @@ 0x3: cvtdq2ps_Vo_Wo(); 0x4: Inst::SUBPS(Vo,Wo); 0x5: Inst::MINPS(Vo,Wo); - 0x6: divps_Vo_Wo(); + 0x6: Inst::DIVPS(Vo,Wo); } // repe (0xF3) 0x4: decode OPCODE_OP_BOTTOM3 { @@ -929,7 +929,7 @@ 0x2: cmpccpd_Vo_Wo_Ib(); 0x4: Inst::SUBPD(Vo,Wo); 0x5: Inst::MINPD(Vo,Wo); - 0x6: divpd_Vo_Wo(); + 0x6: Inst::DIVPD(Vo,Wo); default: Inst::UD2(); } // repne (0xF2) diff --git a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/division.py b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/division.py index 0f4b14a81..3e565278c 100644 --- a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/division.py +++ b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/division.py @@ -54,22 +54,73 @@ # Authors: Gabe Black microcode = ''' -# DIVPS -# DIVPD -# DIVSS +def macroop DIVSS_XMM_XMM { + mdivf xmml, xmml, xmmlm, size=4, ext=1 +}; + +def macroop DIVSS_XMM_M { + ldfp ufp1, seg, sib, disp, dataSize=8 + mdivf xmml, xmml, ufp1, size=4, ext=1 +}; + +def macroop DIVSS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, disp, dataSize=8 + mdivf xmml, xmml, ufp1, size=4, ext=1 +}; def macroop DIVSD_XMM_XMM { - divfp xmml, xmml, xmmlm + mdivf xmml, xmml, xmmlm, size=8, ext=1 }; def macroop DIVSD_XMM_M { ldfp ufp1, seg, sib, disp, dataSize=8 - divfp xmml, xmml, ufp1 + mdivf xmml, xmml, ufp1, size=8, ext=1 }; def macroop DIVSD_XMM_P { rdip t7 ldfp ufp1, seg, riprel, disp, dataSize=8 - divfp xmml, xmml, ufp1 + mdivf xmml, xmml, ufp1, size=8, ext=1 +}; + +def macroop DIVPS_XMM_XMM { + mdivf xmml, xmml, xmmlm, size=4, ext=0 + mdivf xmmh, xmmh, xmmhm, size=4, ext=0 +}; + +def macroop DIVPS_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mdivf xmml, xmml, ufp1, size=4, ext=0 + mdivf xmmh, xmmh, ufp2, size=4, ext=0 +}; + +def macroop DIVPS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mdivf xmml, xmml, ufp1, size=4, ext=0 + mdivf xmmh, xmmh, ufp2, size=4, ext=0 +}; + +def macroop DIVPD_XMM_XMM { + mdivf xmml, xmml, xmmlm, size=8, ext=0 + mdivf xmmh, xmmh, xmmhm, size=8, ext=0 +}; + +def macroop DIVPD_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mdivf xmml, xmml, ufp1, size=8, ext=0 + mdivf xmmh, xmmh, ufp2, size=8, ext=0 +}; + +def macroop DIVPD_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mdivf xmml, xmml, ufp1, size=8, ext=0 + mdivf xmmh, xmmh, ufp2, size=8, ext=0 }; '''