diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 18:35:06 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 18:35:06 -0700 |
commit | 49c2610c04e3bb1998355f0bc146ecd925eb8fca (patch) | |
tree | a36baced04eb3315e84b88b52214b39ea004a897 /src/arch/x86/isa/insts | |
parent | df163284fc29805d4eb3745b9a4dca49a3688b4c (diff) | |
download | gem5-49c2610c04e3bb1998355f0bc146ecd925eb8fca.tar.xz |
X86: Implement the floating point media add instructions.
Diffstat (limited to 'src/arch/x86/isa/insts')
-rw-r--r-- | src/arch/x86/isa/insts/simd128/floating_point/arithmetic/addition.py | 63 |
1 files changed, 57 insertions, 6 deletions
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/addition.py b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/addition.py index 7e0088c81..083d8775d 100644 --- a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/addition.py +++ b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/addition.py @@ -54,22 +54,73 @@ # Authors: Gabe Black microcode = ''' -# ADDPS -# ADDPD -# ADDSS +def macroop ADDSS_XMM_XMM { + maddf xmml, xmml, xmmlm, size=4, ext=1 +}; + +def macroop ADDSS_XMM_M { + ldfp ufp1, seg, sib, disp, dataSize=8 + maddf xmml, xmml, ufp1, size=4, ext=1 +}; + +def macroop ADDSS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, disp, dataSize=8 + maddf xmml, xmml, ufp1, size=4, ext=1 +}; def macroop ADDSD_XMM_XMM { - addfp xmml, xmml, xmmlm + maddf xmml, xmml, xmmlm, size=8, ext=1 }; def macroop ADDSD_XMM_M { ldfp ufp1, seg, sib, disp, dataSize=8 - addfp xmml, xmml, ufp1 + maddf xmml, xmml, ufp1, size=8, ext=1 }; def macroop ADDSD_XMM_P { rdip t7 ldfp ufp1, seg, riprel, disp, dataSize=8 - addfp xmml, xmml, ufp1 + maddf xmml, xmml, ufp1, size=8, ext=1 +}; + +def macroop ADDPS_XMM_XMM { + maddf xmml, xmml, xmmlm, size=4, ext=0 + maddf xmmh, xmmh, xmmhm, size=4, ext=0 +}; + +def macroop ADDPS_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + maddf xmml, xmml, ufp1, size=4, ext=0 + maddf xmmh, xmmh, ufp2, size=4, ext=0 +}; + +def macroop ADDPS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + maddf xmml, xmml, ufp1, size=4, ext=0 + maddf xmmh, xmmh, ufp2, size=4, ext=0 +}; + +def macroop ADDPD_XMM_XMM { + maddf xmml, xmml, xmmlm, size=8, ext=0 + maddf xmmh, xmmh, xmmhm, size=8, ext=0 +}; + +def macroop ADDPD_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + maddf xmml, xmml, ufp1, size=8, ext=0 + maddf xmmh, xmmh, ufp2, size=8, ext=0 +}; + +def macroop ADDPD_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + maddf xmml, xmml, ufp1, size=8, ext=0 + maddf xmmh, xmmh, ufp2, size=8, ext=0 }; ''' |