fp.isa (6383:31c067ae3331) fp.isa (8564:f81bcb16fa1b)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 MIPS Technologies, Inc.
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

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

169 {
170 Fault fault = NoFault;
171
172 %(fp_enable_check)s;
173
174
175 //When is the right time to reset cause bits?
176 //start of every instruction or every cycle?
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 MIPS Technologies, Inc.
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

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

169 {
170 Fault fault = NoFault;
171
172 %(fp_enable_check)s;
173
174
175 //When is the right time to reset cause bits?
176 //start of every instruction or every cycle?
177#if FULL_SYSTEM
178 fpResetCauseBits(xc);
179#endif
177 if (FULL_SYSTEM)
178 fpResetCauseBits(xc);
180 %(op_decl)s;
181 %(op_rd)s;
182
183 //Check if any FP operand is a NaN value
184 if (!fpNanOperands((FPOp*)this, xc, Fd, traceData)) {
185 %(code)s;
186
187 //Change this code for Full-System/Sycall Emulation
188 //separation
189 //----
190 //Should Full System-Mode throw a fault here?
191 //----
192 //Check for IEEE 754 FP Exceptions
193 //fault = fpNanOperands((FPOp*)this, xc, Fd, traceData);
179 %(op_decl)s;
180 %(op_rd)s;
181
182 //Check if any FP operand is a NaN value
183 if (!fpNanOperands((FPOp*)this, xc, Fd, traceData)) {
184 %(code)s;
185
186 //Change this code for Full-System/Sycall Emulation
187 //separation
188 //----
189 //Should Full System-Mode throw a fault here?
190 //----
191 //Check for IEEE 754 FP Exceptions
192 //fault = fpNanOperands((FPOp*)this, xc, Fd, traceData);
194 if (
195#if FULL_SYSTEM
196 !fpInvalidOp((FPOp*)this, xc, Fd, traceData) &&
197#endif
198 fault == NoFault)
199 {
193 bool invalid_op = false;
194 if (FULL_SYSTEM) {
195 invalid_op =
196 fpInvalidOp((FPOp*)this, xc, Fd, traceData);
197 }
198 if (!invalid_op && fault == NoFault) {
200 %(op_wb)s;
201 }
202 }
203
204 return fault;
205 }
206}};
207

--- 164 unchanged lines hidden ---
199 %(op_wb)s;
200 }
201 }
202
203 return fault;
204 }
205}};
206

--- 164 unchanged lines hidden ---