62 const Addr pc(pc_state.instAddr());
67 return std::make_shared<PCAlignmentFault>(
pc);
71 return std::make_shared<PrefetchAbort>(
72 pc, ArmFault::AlignmentFault);
76 panic(
"Internal error in instruction decoder\n");
79 panic(
"Decoder fault instruction without decoder fault.\n");
82 panic(
"Unhandled fault type");
93 return "UnalignedInstruction";
96 return "DecoderPanic";
99 panic(
"Unhandled fault type");
116 flags[IsNonSpeculative] =
true;
121 const std::string& _fullMnemonic)
123 fullMnemonic(_fullMnemonic)
127 flags[IsNonSpeculative] =
true;
139 return csprintf(
"%-10s (unimplemented)",
147 :
ArmStaticInst(_mnemonic, _machInst, No_OpClass), warned(false)
151 flags[IsNonSpeculative] =
true;
156 const std::string& _fullMnemonic)
157 :
ArmStaticInst(_mnemonic, _machInst, No_OpClass), warned(false),
158 fullMnemonic(_fullMnemonic)
162 flags[IsNonSpeculative] =
true;
169 warn(
"\tinstruction '%s' unimplemented\n",
180 return csprintf(
"%-10s (unimplemented)",
190 flags[IsNonSpeculative] =
true;
208 return std::make_shared<HypervisorTrap>(
machInst,
iss,
213 return std::make_shared<FlushPipe>();
decltype(nullptr) constexpr NoFault
virtual MiscReg readMiscReg(int misc_reg)=0
Reads a miscellaneous register, handling any architectural side effects due to reading that register...
WarnUnimplemented(const char *_mnemonic, ExtMachInst _machInst)
const char * mnemonic
Base mnemonic (e.g., "add").
virtual PCState pcState() const =0
FailUnimplemented(const char *_mnemonic, ExtMachInst _machInst)
Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const
Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const
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.
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
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)
const char * faultName() const
Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
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 SymbolTable *symtab) const
Internal function to generate disassembly string.
DecoderFaultInst(ExtMachInst _machInst)
McrMrcMiscInst(const char *_mnemonic, ExtMachInst _machInst, uint64_t _iss, MiscRegIndex _miscReg)
GenericISA::SimplePCState< MachInst > PCState
Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const
std::string fullMnemonic
Full mnemonic for MRC and MCR instructions including the coproc.
TheISA::ExtMachInst ExtMachInst
Binary extended machine instruction type.
bool mcrMrc15TrapToHyp(const MiscRegIndex miscReg, HCR hcr, CPSR cpsr, SCR scr, HDCR hdcr, HSTR hstr, HCPTR hcptr, uint32_t iss)
Unaligned instruction fault.
std::shared_ptr< FaultBase > Fault
DecoderFault
Instruction decoder fault codes in ExtMachInst.