base.isa (3753:a95cd790181a) | base.isa (3931:de791fa53d04) |
---|---|
1// Copyright (c) 2006 The Regents of The University of Michigan | 1// Copyright (c) 2006-2007 The Regents of The University of Michigan |
2// All rights reserved. 3// 4// Redistribution and use in source and binary forms, with or without 5// modification, are permitted provided that the following conditions are 6// met: redistributions of source code must retain the above copyright 7// notice, this list of conditions and the following disclaimer; 8// redistributions in binary form must reproduce the above copyright 9// notice, this list of conditions and the following disclaimer in the --- 275 unchanged lines hidden (view full) --- 285 case OverflowSet: 286 return condCodes.v; 287 } 288 panic("Tried testing condition nonexistant " 289 "condition code %d", condition); 290 } 291}}; 292 | 2// All rights reserved. 3// 4// Redistribution and use in source and binary forms, with or without 5// modification, are permitted provided that the following conditions are 6// met: redistributions of source code must retain the above copyright 7// notice, this list of conditions and the following disclaimer; 8// redistributions in binary form must reproduce the above copyright 9// notice, this list of conditions and the following disclaimer in the --- 275 unchanged lines hidden (view full) --- 285 case OverflowSet: 286 return condCodes.v; 287 } 288 panic("Tried testing condition nonexistant " 289 "condition code %d", condition); 290 } 291}}; 292 |
293output exec {{ 294 /// Check "FP enabled" machine status bit. Called when executing any FP 295 /// instruction in full-system mode. 296 /// @retval Full-system mode: NoFault if FP is enabled, FpDisabled 297 /// if not. Non-full-system mode: always returns NoFault. 298#if FULL_SYSTEM 299 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc) 300 { 301 Fault fault = NoFault; // dummy... this ipr access should not fault 302 if (xc->readMiscRegWithEffect(MISCREG_PSTATE) & PSTATE::pef && 303 xc->readMiscRegWithEffect(MISCREG_FPRS) & 0x4) 304 return NoFault; 305 else 306 return new FpDisabled; 307 } 308#else 309 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc) 310 { 311 return NoFault; 312 } 313#endif 314}}; 315 316 |
|