diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2015-10-06 17:26:50 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2015-10-06 17:26:50 -0700 |
commit | a2c875c746a7b9b5dcb94fd93d94ab70286dbbb4 (patch) | |
tree | 03ac1c0befec0a164e233b655759efac0f3207c0 /src/arch/x86/isa/insts/simd128/floating_point/arithmetic | |
parent | 57b9f53afa5660152a77b7f3b7affb39f5b0e176 (diff) | |
download | gem5-a2c875c746a7b9b5dcb94fd93d94ab70286dbbb4.tar.xz |
x86: implement rcpps and rcpss SSE insts
These are packed single-precision approximate reciprocal operations,
vector and scalar versions, respectively.
This code was basically developed by copying the code for
sqrtps and sqrtss. The mrcp micro-op was simplified relative to
msqrt since there are no double-precision versions of this operation.
Diffstat (limited to 'src/arch/x86/isa/insts/simd128/floating_point/arithmetic')
-rw-r--r-- | src/arch/x86/isa/insts/simd128/floating_point/arithmetic/reciprocal_estimation.py | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/reciprocal_estimation.py b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/reciprocal_estimation.py index 6e0d7fbb6..666c45ca1 100644 --- a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/reciprocal_estimation.py +++ b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/reciprocal_estimation.py @@ -1,4 +1,6 @@ # Copyright (c) 2007 The Hewlett-Packard Development Company +# Copyright (c) 2015 Advanced Micro Devices, Inc. +# # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -34,8 +36,41 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Authors: Gabe Black +# Steve Reinhardt microcode = ''' -# RCPPS -# RCPSS +def macroop RCPSS_XMM_XMM { + mrcp xmml, xmmlm, size=4, ext=Scalar +}; + +def macroop RCPSS_XMM_M { + ldfp ufp1, seg, sib, disp, dataSize=8 + mrcp xmml, ufp1, size=4, ext=Scalar +}; + +def macroop RCPSS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, disp, dataSize=8 + mrcp xmml, ufp1, size=4, ext=Scalar +}; + +def macroop RCPPS_XMM_XMM { + mrcp xmml, xmmlm, size=4, ext=0 + mrcp xmmh, xmmhm, size=4, ext=0 +}; + +def macroop RCPPS_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mrcp xmml, ufp1, size=4, ext=0 + mrcp xmmh, ufp2, size=4, ext=0 +}; + +def macroop RCPPS_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mrcp xmml, ufp1, size=4, ext=0 + mrcp xmmh, ufp2, size=4, ext=0 +}; ''' |