59 const Addr pc(pc_state.instAddr());
64 return std::make_shared<PCAlignmentFault>(
pc);
68 return std::make_shared<PrefetchAbort>(
69 pc, ArmFault::AlignmentFault);
73 panic(
"Internal error in instruction decoder\n");
76 panic(
"Decoder fault instruction without decoder fault.\n");
79 panic(
"Unhandled fault type");
90 return "UnalignedInstruction";
93 return "DecoderPanic";
96 panic(
"Unhandled fault type");
114 flags[IsNonSpeculative] =
true;
119 const std::string& _fullMnemonic)
125 flags[IsNonSpeculative] =
true;
138 return csprintf(
"%-10s (unimplemented)",
146 :
ArmStaticInst(_mnemonic, _machInst, No_OpClass), warned(false)
150 flags[IsNonSpeculative] =
true;
155 const std::string& _fullMnemonic)
161 flags[IsNonSpeculative] =
true;
168 warn(
"\tinstruction '%s' unimplemented\n",
180 return csprintf(
"%-10s (unimplemented)",
191 return std::make_shared<IllegalInstSetStateFault>();
#define panic(...)
This implements a cprintf based panic() function.
decltype(nullptr) constexpr NoFault
IllegalExecInst(ExtMachInst _machInst)
Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const override
WarnUnimplemented(const char *_mnemonic, ExtMachInst _machInst)
const char * mnemonic
Base mnemonic (e.g., "add").
virtual PCState pcState() const =0
Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const override
FailUnimplemented(const char *_mnemonic, ExtMachInst _machInst)
bool warned
Have we warned on this instruction yet?
const ExtMachInst machInst
The binary machine instruction.
std::bitset< Num_Flags > flags
Flag values for this instruction.
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
std::string csprintf(const char *format, const Args &...args)
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::string fullMnemonic
Full mnemonic for MRC and MCR instructions including the coproc.
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
DecoderFaultInst(ExtMachInst _machInst)
const char * faultName() const
Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string fullMnemonic
Full mnemonic for MRC and MCR instructions including the coproc.
TheISA::ExtMachInst ExtMachInst
Binary extended machine instruction type.
Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const override
Unaligned instruction fault.
GenericISA::DelaySlotPCState< MachInst > PCState
std::shared_ptr< FaultBase > Fault
DecoderFault
Instruction decoder fault codes in ExtMachInst.