fpop.isa (9470:68f7e0bcf4aa) | fpop.isa (9582:0632d2d1575c) |
---|---|
1// Copyright (c) 2007 The Hewlett-Packard Development Company | 1// Copyright (c) 2007 The Hewlett-Packard Development Company |
2// Copyright (c) 2012-2013 Mark D. Hill and David A. Wood |
|
2// All rights reserved. 3// 4// The license below extends only to copyright in the software and shall 5// not be construed as granting a license to any other intellectual 6// property including but not limited to intellectual property relating 7// to a hardware implementation of the functionality of the software 8// licensed hereunder. You may use the software subject to the license 9// terms below provided that you ensure that this notice is replicated --- 19 unchanged lines hidden (view full) --- 29// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35// 36// Authors: Gabe Black | 3// All rights reserved. 4// 5// The license below extends only to copyright in the software and shall 6// not be construed as granting a license to any other intellectual 7// property including but not limited to intellectual property relating 8// to a hardware implementation of the functionality of the software 9// licensed hereunder. You may use the software subject to the license 10// terms below provided that you ensure that this notice is replicated --- 19 unchanged lines hidden (view full) --- 30// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36// 37// Authors: Gabe Black |
38// Nilay Vaish |
|
37 38////////////////////////////////////////////////////////////////////////// 39// 40// FpOp Microop templates 41// 42////////////////////////////////////////////////////////////////////////// 43 44def template MicroFpOpExecute {{ --- 208 unchanged lines hidden (view full) --- 253 code = 'FpDestReg = sqrt(FpSrcReg2);' 254 255 class Cosfp(FpUnaryOp): 256 code = 'FpDestReg = cos(FpSrcReg1);' 257 258 class Sinfp(FpUnaryOp): 259 code = 'FpDestReg = sin(FpSrcReg1);' 260 | 39 40////////////////////////////////////////////////////////////////////////// 41// 42// FpOp Microop templates 43// 44////////////////////////////////////////////////////////////////////////// 45 46def template MicroFpOpExecute {{ --- 208 unchanged lines hidden (view full) --- 255 code = 'FpDestReg = sqrt(FpSrcReg2);' 256 257 class Cosfp(FpUnaryOp): 258 code = 'FpDestReg = cos(FpSrcReg1);' 259 260 class Sinfp(FpUnaryOp): 261 code = 'FpDestReg = sin(FpSrcReg1);' 262 |
263 class Tanfp(FpUnaryOp): 264 code = 'FpDestReg = tan(FpSrcReg1);' |
|
261 | 265 |
266 |
|
262 # Conversion microops 263 class ConvOp(FpBinaryOp): 264 abstract = True 265 def __init__(self, dest, src1): 266 super(ConvOp, self).__init__(dest, src1, \ 267 "InstRegIndex(FLOATREG_MICROFP0)") 268 269 # These probably shouldn't look at the ExtMachInst directly to figure --- 30 unchanged lines hidden (view full) --- 300 code = 'FpDestReg = FpSrcReg1 * FpSrcReg2;' 301 302 class divfp(FpBinaryOp): 303 code = 'FpDestReg = FpSrcReg1 / FpSrcReg2;' 304 305 class subfp(FpBinaryOp): 306 code = 'FpDestReg = FpSrcReg1 - FpSrcReg2;' 307 | 267 # Conversion microops 268 class ConvOp(FpBinaryOp): 269 abstract = True 270 def __init__(self, dest, src1): 271 super(ConvOp, self).__init__(dest, src1, \ 272 "InstRegIndex(FLOATREG_MICROFP0)") 273 274 # These probably shouldn't look at the ExtMachInst directly to figure --- 30 unchanged lines hidden (view full) --- 305 code = 'FpDestReg = FpSrcReg1 * FpSrcReg2;' 306 307 class divfp(FpBinaryOp): 308 code = 'FpDestReg = FpSrcReg1 / FpSrcReg2;' 309 310 class subfp(FpBinaryOp): 311 code = 'FpDestReg = FpSrcReg1 - FpSrcReg2;' 312 |
313 class Yl2xFp(FpBinaryOp): 314 code = ''' 315 FpDestReg = FpSrcReg2 * (log(FpSrcReg1) / log(2)); 316 ''' 317 318 class PremFp(FpBinaryOp): 319 code = ''' 320 FpDestReg = fmod(FpSrcReg1, FpSrcReg2); 321 DPRINTF(X86, "src1: %lf, src2: %lf, dest: %lf\\n", FpSrcReg1, FpSrcReg2, FpDestReg); 322 ''' 323 |
|
308 class Compfp(FpBinaryOp): 309 def __init__(self, src1, src2, spm=0, setStatus=False, \ 310 dataSize="env.dataSize"): 311 super(Compfp, self).__init__("InstRegIndex(FLOATREG_MICROFP0)", \ 312 src1, src2, spm, setStatus, dataSize) 313 # This class sets the condition codes in rflags according to the 314 # rules for comparing floating point. 315 code = ''' --- 27 unchanged lines hidden --- | 324 class Compfp(FpBinaryOp): 325 def __init__(self, src1, src2, spm=0, setStatus=False, \ 326 dataSize="env.dataSize"): 327 super(Compfp, self).__init__("InstRegIndex(FLOATREG_MICROFP0)", \ 328 src1, src2, spm, setStatus, dataSize) 329 # This class sets the condition codes in rflags according to the 330 # rules for comparing floating point. 331 code = ''' --- 27 unchanged lines hidden --- |