base.isa (4004:d551cf1bba0d) base.isa (4172:141705d83494)
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

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

487 /// Check "FP enabled" machine status bit. Called when executing any FP
488 /// instruction in full-system mode.
489 /// @retval Full-system mode: NoFault if FP is enabled, FpDisabled
490 /// if not. Non-full-system mode: always returns NoFault.
491#if FULL_SYSTEM
492 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc)
493 {
494 Fault fault = NoFault; // dummy... this ipr access should not fault
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

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

487 /// Check "FP enabled" machine status bit. Called when executing any FP
488 /// instruction in full-system mode.
489 /// @retval Full-system mode: NoFault if FP is enabled, FpDisabled
490 /// if not. Non-full-system mode: always returns NoFault.
491#if FULL_SYSTEM
492 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc)
493 {
494 Fault fault = NoFault; // dummy... this ipr access should not fault
495 if (xc->readMiscRegWithEffect(MISCREG_PSTATE) & PSTATE::pef &&
496 xc->readMiscRegWithEffect(MISCREG_FPRS) & 0x4)
495 if (xc->readMiscReg(MISCREG_PSTATE) & PSTATE::pef &&
496 xc->readMiscReg(MISCREG_FPRS) & 0x4)
497 return NoFault;
498 else
499 return new FpDisabled;
500 }
501#else
502 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc)
503 {
504 return NoFault;
505 }
506#endif
507}};
508
509
497 return NoFault;
498 else
499 return new FpDisabled;
500 }
501#else
502 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc)
503 {
504 return NoFault;
505 }
506#endif
507}};
508
509