base.isa (8588:ef28ed90449d) base.isa (8738:66bf413b0d5b)
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

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

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

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

561output exec {{
562 /// Check "FP enabled" machine status bit. Called when executing any FP
563 /// instruction.
564 /// @retval Full-system mode: NoFault if FP is enabled, FpDisabled
565 /// if not. Non-full-system mode: always returns NoFault.
566 static inline Fault
567 checkFpEnableFault(%(CPU_exec_context)s *xc)
568 {
569 if (FULL_SYSTEM) {
569 if (FullSystem) {
570 if (xc->readMiscReg(MISCREG_PSTATE) & PSTATE::pef &&
571 xc->readMiscReg(MISCREG_FPRS) & 0x4) {
572 return NoFault;
573 } else {
574 return new FpDisabled;
575 }
576 } else {
577 return NoFault;
578 }
579 }
580}};
581
582
570 if (xc->readMiscReg(MISCREG_PSTATE) & PSTATE::pef &&
571 xc->readMiscReg(MISCREG_FPRS) & 0x4) {
572 return NoFault;
573 } else {
574 return new FpDisabled;
575 }
576 } else {
577 return NoFault;
578 }
579 }
580}};
581
582