29 #ifndef __ARCH_POWER_INSTS_BRANCH_HH__ 30 #define __ARCH_POWER_INSTS_BRANCH_HH__ 58 cachedPC(0), cachedSymtab(0)
82 if (disp & 0x2000000) {
112 if (targetAddr & 0x2000000) {
113 targetAddr |= 0xfc000000;
154 ctr_ok = ((bo & 2) == 0);
156 ctr_ok = ((bo & 2) != 0);
169 cond_ok = (((cr >> (31 -
bi)) & 1) == ((bo >> 3) & 1));
221 if (targetAddr & 0x8000) {
222 targetAddr |= 0xffff0000;
259 #endif //__ARCH_POWER_INSTS_BRANCH_HH__ uint32_t bo
Fields needed for conditions.
Base class for unconditional, non PC-relative branches.
const Loader::SymbolTable * cachedSymtab
Cached symbol table pointer from last disassembly.
ThreadContext is the external interface to all thread state for anything outside of the CPU...
Base class for unconditional, PC-relative branches.
BranchPCRel(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.
const ExtMachInst machInst
The binary machine instruction.
bool condOk(uint32_t cr) const
Base class for conditional, non PC-relative branches.
uint32_t disp
Displacement.
Base class for conditional branches.
BranchCond(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.
BranchPCRelCond(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Base class for conditional, PC-relative branches.
Base class for conditional, register-based branches.
virtual TheISA::PCState branchTarget(const TheISA::PCState &pc) const
Return the target address for a PC-relative branch.
bool ctrOk(uint32_t &ctr) const
BranchRegCond(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Addr cachedPC
Cached program counter from last disassembly.
TheISA::ExtMachInst ExtMachInst
Binary extended machine instruction type.
const std::string & disassemble(Addr pc, const Loader::SymbolTable *symtab) const
Return string representation of disassembled instruction.
uint32_t targetAddr
Target address.
Base class for instructions whose disassembly is not purely a function of the machine instruction (i...
uint32_t targetAddr
Target address.
uint32_t disp
Displacement.
GenericISA::DelaySlotPCState< MachInst > PCState
BranchNonPCRel(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.
PCDependentDisassembly(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
Constructor.
BranchNonPCRelCond(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.