41 panic(
"StaticInst::fetchMicroop() called on instruction "
42 "that is not microcoded.");
45std::unique_ptr<PCStateBase>
48 panic(
"StaticInst::branchTarget() called on instruction "
49 "that is not a PC-relative branch.");
52std::unique_ptr<PCStateBase>
55 panic(
"StaticInst::branchTarget() called on instruction "
56 "that is not an indirect branch.");
72 const std::string &separator)
const
74 bool printed_a_flag =
false;
76 for (
unsigned int flag = IsNop; flag < Num_Flags; flag++) {
81 outs << FlagsStrings[flag];
82 printed_a_flag =
true;
virtual PCStateBase * clone() const =0
void printFlags(std::ostream &outs, const std::string &separator) const
Print a separator separated list of this instruction's set flag names on the given stream.
virtual const std::string & disassemble(Addr pc, const loader::SymbolTable *symtab=nullptr) const
Return string representation of disassembled instruction.
virtual StaticInstPtr fetchMicroop(MicroPC upc) const
Return the microop that goes with a particular micropc.
virtual std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const =0
Internal function to generate disassembly string.
std::unique_ptr< std::string > cachedDisassembly
String representation of disassembly (lazily evaluated via disassemble()).
virtual std::unique_ptr< PCStateBase > branchTarget(const PCStateBase &pc) const
Return the target address for a PC-relative branch.
virtual void advancePC(PCStateBase &pc_state) const =0
std::bitset< Num_Flags > flags
Flag values for this instruction.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual const PCStateBase & pcState() const =0
#define panic(...)
This implements a cprintf based panic() function.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
RefCountingPtr< StaticInst > StaticInstPtr