diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 18:34:19 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 18:34:19 -0700 |
commit | 449db8a37074fedb039e3b8fc6c5e09fdb167d82 (patch) | |
tree | 2615017193357f4f1441522894fb3eceba4cc425 /src/arch/x86/isa/insts/simd128/floating_point | |
parent | 6a923c1c79af1de9661c09afdd80ec805aff5e34 (diff) | |
download | gem5-449db8a37074fedb039e3b8fc6c5e09fdb167d82.tar.xz |
X86: Implement the media sqrt instructions.
Diffstat (limited to 'src/arch/x86/isa/insts/simd128/floating_point')
-rw-r--r-- | src/arch/x86/isa/insts/simd128/floating_point/arithmetic/square_root.py | 63 |
1 files changed, 57 insertions, 6 deletions
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/square_root.py b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/square_root.py index 1591eee8e..fdeb30ddc 100644 --- a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/square_root.py +++ b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/square_root.py @@ -54,22 +54,73 @@ # Authors: Gabe Black microcode = ''' -# SQRTPS -# SQRTPD -# SQRTSS +def macroop SQRTSS_XMM_XMM { + msqrt xmml, xmmlm, size=4, ext=1 +}; + +def macroop SQRTSS_XMM_M { + ldfp ufp1, seg, sib, disp, dataSize=8 + msqrt xmml, ufp1, size=4, ext=1 +}; + +def macroop SQRTSS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, disp, dataSize=8 + msqrt xmml, ufp1, size=4, ext=1 +}; + +def macroop SQRTPS_XMM_XMM { + msqrt xmml, xmmlm, size=4, ext=0 + msqrt xmmh, xmmhm, size=4, ext=0 +}; + +def macroop SQRTPS_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + msqrt xmml, ufp1, size=4, ext=0 + msqrt xmmh, ufp2, size=4, ext=0 +}; + +def macroop SQRTPS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + msqrt xmml, ufp1, size=4, ext=0 + msqrt xmmh, ufp2, size=4, ext=0 +}; def macroop SQRTSD_XMM_XMM { - sqrtfp xmml, xmml, xmmlm + msqrt xmml, xmmlm, size=8, ext=1 }; def macroop SQRTSD_XMM_M { ldfp ufp1, seg, sib, disp, dataSize=8 - sqrtfp xmml, xmml, ufp1 + msqrt xmml, ufp1, size=8, ext=1 }; def macroop SQRTSD_XMM_P { rdip t7 ldfp ufp1, seg, riprel, disp, dataSize=8 - sqrtfp xmml, xmml, ufp1 + msqrt xmml, ufp1, size=8, ext=1 +}; + +def macroop SQRTPD_XMM_XMM { + msqrt xmml, xmmlm, size=8, ext=0 + msqrt xmmh, xmmhm, size=8, ext=0 +}; + +def macroop SQRTPD_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + msqrt xmml, ufp1, size=8, ext=0 + msqrt xmmh, ufp2, size=8, ext=0 +}; + +def macroop SQRTPD_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + msqrt xmml, ufp1, size=8, ext=0 + msqrt xmmh, ufp2, size=8, ext=0 }; ''' |