base.isa (9918:2c7219e2d999) base.isa (10196:be0e1724eb39)
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

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

559}};
560
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
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

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

559}};
560
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)
567 checkFpEnableFault(CPU_EXEC_CONTEXT *xc)
568 {
569 if (FullSystem) {
570 PSTATE pstate = xc->readMiscReg(MISCREG_PSTATE);
571 if (pstate.pef && 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
568 {
569 if (FullSystem) {
570 PSTATE pstate = xc->readMiscReg(MISCREG_PSTATE);
571 if (pstate.pef && 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