base.isa (7741:340b6f01d69b) base.isa (7799:5d0f62927d75)
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

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

562 /// Check "FP enabled" machine status bit. Called when executing any FP
563 /// instruction in full-system mode.
564 /// @retval Full-system mode: NoFault if FP is enabled, FpDisabled
565 /// if not. Non-full-system mode: always returns NoFault.
566#if FULL_SYSTEM
567 inline Fault
568 checkFpEnableFault(%(CPU_exec_context)s *xc)
569 {
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

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

562 /// Check "FP enabled" machine status bit. Called when executing any FP
563 /// instruction in full-system mode.
564 /// @retval Full-system mode: NoFault if FP is enabled, FpDisabled
565 /// if not. Non-full-system mode: always returns NoFault.
566#if FULL_SYSTEM
567 inline Fault
568 checkFpEnableFault(%(CPU_exec_context)s *xc)
569 {
570 Fault fault = NoFault; // dummy... this ipr access should not fault
570 Fault fault = NoFault; // dummy... this ipr access should not fault
571 if (xc->readMiscReg(MISCREG_PSTATE) & PSTATE::pef &&
572 xc->readMiscReg(MISCREG_FPRS) & 0x4) {
573 return NoFault;
574 } else {
575 return new FpDisabled;
576 }
577 }
578#else
579 inline Fault
580 checkFpEnableFault(%(CPU_exec_context)s *xc)
581 {
582 return NoFault;
583 }
584#endif
585}};
586
587
571 if (xc->readMiscReg(MISCREG_PSTATE) & PSTATE::pef &&
572 xc->readMiscReg(MISCREG_FPRS) & 0x4) {
573 return NoFault;
574 } else {
575 return new FpDisabled;
576 }
577 }
578#else
579 inline Fault
580 checkFpEnableFault(%(CPU_exec_context)s *xc)
581 {
582 return NoFault;
583 }
584#endif
585}};
586
587