Deleted Added
sdiff udiff text old ( 3951:727778d649ae ) new ( 4661:44458219add1 )
full compact
1// -*- mode:c++ -*-
2
3// Copyright (c) 2006 The Regents of The University of Michigan
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

--- 73 unchanged lines hidden (view full) ---

82 printReg(ss, _srcRegIdx[1]);
83 }
84
85 return ss.str();
86 }
87}};
88
89output exec {{
90
91 //If any operand is Nan return the appropriate QNaN
92 template <class T>
93 bool
94 fpNanOperands(FPOp *inst, %(CPU_exec_context)s *xc, const T &src_type,
95 Trace::InstRecord *traceData)
96 {
97 uint64_t mips_nan = 0;

--- 42 unchanged lines hidden (view full) ---

140
141 //Set value to QNAN
142 cpu->setFloatRegOperandBits(inst, 0, mips_nan, size);
143
144 //Read FCSR from FloatRegFile
145 uint32_t fcsr_bits = cpu->tcBase()->readFloatRegBits(FCSR);
146
147 //Write FCSR from FloatRegFile
148 cpu->tcBase()->setFloatRegBits(FCSR, genInvalidVector(fcsr_bits));
149
150 if (traceData) { traceData->setData(mips_nan); }
151 return true;
152 }
153
154 return false;
155 }
156
157 void
158 fpResetCauseBits(%(CPU_exec_context)s *cpu)
159 {
160 //Read FCSR from FloatRegFile
161 uint32_t fcsr = cpu->tcBase()->readFloatRegBits(FCSR);
162
163 fcsr = bits(fcsr, 31, 18) << 18 | bits(fcsr, 11, 0);
164
165 //Write FCSR from FloatRegFile
166 cpu->tcBase()->setFloatRegBits(FCSR, fcsr);
167 }
168}};
169
170def template FloatingPointExecute {{

--- 203 unchanged lines hidden ---