From: Gabe Black Date: Tue, 18 Aug 2009 03:25:14 +0000 (-0700) Subject: X86: Implement the instructions that compare fp values and write to rflags. X-Git-Tag: Calvin_Submission~51 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87ad6772094170cf92e8de385e1dea47a31924dc;p=gem5.git X86: Implement the instructions that compare fp values and write to rflags. --- diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index 41cbdd869..b41f2b31d 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -379,8 +379,8 @@ 0x3: movntps_Mo_Vo(); 0x4: cvttps2pi_Pq_Wq(); 0x5: cvtpS2pi_Pq_Wq(); - 0x6: ucomiss_Vd_Wd(); - 0x7: comiss_Vd_Wd(); + 0x6: Inst::UCOMISS(Vd,Wd); + 0x7: Inst::COMISS(Vd,Wd); } // repe (0xF3) 0x4: decode OPCODE_OP_BOTTOM3 { @@ -398,7 +398,7 @@ 0x4: cvttpd2pi_Pq_Wo(); 0x5: cvtpd2pi_Pq_Wo(); 0x6: Inst::UCOMISD(Vq,Wq); - 0x7: comisd_Vq_Wq(); + 0x7: Inst::COMISD(Vq,Wq); } // repne (0xF2) 0x8: decode OPCODE_OP_BOTTOM3 { diff --git a/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py b/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py index 2e22f71eb..50afddf7b 100644 --- a/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py +++ b/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py @@ -54,22 +54,63 @@ # Authors: Gabe Black microcode = ''' -# COMISS -# COMISD -# UCOMISS +def macroop UCOMISS_XMM_XMM { + mcmpf2rf xmml, xmmlm, size=4 +}; + +def macroop UCOMISS_XMM_M { + ldfp ufp1, seg, sib, disp, dataSize=8 + mcmpf2rf xmml, ufp1, size=4 +}; + +def macroop UCOMISS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, disp, dataSize=8 + mcmpf2rf xmml, ufp1, size=4 +}; def macroop UCOMISD_XMM_XMM { - compfp xmml, xmmlm + mcmpf2rf xmml, xmmlm, size=8 }; def macroop UCOMISD_XMM_M { ldfp ufp1, seg, sib, disp, dataSize=8 - compfp xmml, ufp1 + mcmpf2rf xmml, ufp1, size=8 }; def macroop UCOMISD_XMM_P { rdip t7 ldfp ufp1, seg, riprel, disp, dataSize=8 - compfp xmml, ufp1 + mcmpf2rf xmml, ufp1, size=8 +}; + +def macroop COMISS_XMM_XMM { + mcmpf2rf xmml, xmmlm, size=4 +}; + +def macroop COMISS_XMM_M { + ldfp ufp1, seg, sib, disp, dataSize=8 + mcmpf2rf xmml, ufp1, size=4 +}; + +def macroop COMISS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, disp, dataSize=8 + mcmpf2rf xmml, ufp1, size=4 +}; + +def macroop COMISD_XMM_XMM { + mcmpf2rf xmml, xmmlm, size=8 +}; + +def macroop COMISD_XMM_M { + ldfp ufp1, seg, sib, disp, dataSize=8 + mcmpf2rf xmml, ufp1, size=8 +}; + +def macroop COMISD_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, disp, dataSize=8 + mcmpf2rf xmml, ufp1, size=8 }; '''