output exec {{
/// Check "FP enabled" machine status bit. Called when executing any FP
- /// instruction in full-system mode.
+ /// instruction.
/// @retval Full-system mode: NoFault if FP is enabled, FpDisabled
/// if not. Non-full-system mode: always returns NoFault.
-#if FULL_SYSTEM
- inline Fault
+ static inline Fault
checkFpEnableFault(%(CPU_exec_context)s *xc)
{
- Fault fault = NoFault; // dummy... this ipr access should not fault
- if (xc->readMiscReg(MISCREG_PSTATE) & PSTATE::pef &&
- xc->readMiscReg(MISCREG_FPRS) & 0x4) {
- return NoFault;
+ if (FULL_SYSTEM) {
+ if (xc->readMiscReg(MISCREG_PSTATE) & PSTATE::pef &&
+ xc->readMiscReg(MISCREG_FPRS) & 0x4) {
+ return NoFault;
+ } else {
+ return new FpDisabled;
+ }
} else {
- return new FpDisabled;
+ return NoFault;
}
}
-#else
- inline Fault
- checkFpEnableFault(%(CPU_exec_context)s *xc)
- {
- return NoFault;
- }
-#endif
}};
WarnUnimplemented::generateDisassembly(Addr pc,
const SymbolTable *symtab) const
{
-#ifdef SS_COMPATIBLE_DISASSEMBLY
- return csprintf("%-10s", mnemonic);
-#else
return csprintf("%-10s (unimplemented)", mnemonic);
-#endif
}
}};