diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-03-11 13:15:46 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-03-11 13:15:46 -0500 |
commit | 5c940fec0aebcce5f81063f195220184918b377b (patch) | |
tree | c9e754107957d63e7331ef13d2527a3874524393 /src/arch/x86/isa/microops | |
parent | 82f600e02ded4d7162dd9286f790462b9ab5d554 (diff) | |
download | gem5-5c940fec0aebcce5f81063f195220184918b377b.tar.xz |
x86: implement some of the x87 instructions
This patch implements ftan, fprem, fyl2x, fld* floating-point instructions.
Diffstat (limited to 'src/arch/x86/isa/microops')
-rw-r--r-- | src/arch/x86/isa/microops/fpop.isa | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/arch/x86/isa/microops/fpop.isa b/src/arch/x86/isa/microops/fpop.isa index b9aceea09..d5a39817a 100644 --- a/src/arch/x86/isa/microops/fpop.isa +++ b/src/arch/x86/isa/microops/fpop.isa @@ -1,4 +1,5 @@ // Copyright (c) 2007 The Hewlett-Packard Development Company +// Copyright (c) 2012-2013 Mark D. Hill and David A. Wood // All rights reserved. // // The license below extends only to copyright in the software and shall @@ -34,6 +35,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Authors: Gabe Black +// Nilay Vaish ////////////////////////////////////////////////////////////////////////// // @@ -258,6 +260,9 @@ let {{ class Sinfp(FpUnaryOp): code = 'FpDestReg = sin(FpSrcReg1);' + class Tanfp(FpUnaryOp): + code = 'FpDestReg = tan(FpSrcReg1);' + # Conversion microops class ConvOp(FpBinaryOp): @@ -305,6 +310,17 @@ let {{ class subfp(FpBinaryOp): code = 'FpDestReg = FpSrcReg1 - FpSrcReg2;' + class Yl2xFp(FpBinaryOp): + code = ''' + FpDestReg = FpSrcReg2 * (log(FpSrcReg1) / log(2)); + ''' + + class PremFp(FpBinaryOp): + code = ''' + FpDestReg = fmod(FpSrcReg1, FpSrcReg2); + DPRINTF(X86, "src1: %lf, src2: %lf, dest: %lf\\n", FpSrcReg1, FpSrcReg2, FpDestReg); + ''' + class Compfp(FpBinaryOp): def __init__(self, src1, src2, spm=0, setStatus=False, \ dataSize="env.dataSize"): |