31 #ifndef __ARCH_POWER_INSTS_BRANCH_HH__
32 #define __ARCH_POWER_INSTS_BRANCH_HH__
84 if (
disp & 0x2000000) {
154 ctr_ok = ((
bo & 2) == 0);
156 ctr_ok = ((
bo & 2) != 0);
169 cond_ok = (((cr >> (31 -
bi)) & 1) == ((
bo >> 3) & 1));
256 #endif //__ARCH_POWER_INSTS_BRANCH_HH__
uint32_t bo
Fields needed for conditions.
PowerISA::PCState branchTarget(const PowerISA::PCState &pc) const
const std::string & disassemble(Addr pc, const SymbolTable *symtab) const
Return string representation of disassembled instruction.
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Base class for unconditional, non PC-relative branches.
bool condOk(uint32_t cr) const
PowerISA::PCState branchTarget(ThreadContext *tc) const
Return the target address for an indirect branch (jump).
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 SymbolTable * cachedSymtab
Cached symbol table pointer from last disassembly.
const ExtMachInst machInst
The binary machine instruction.
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.
bool ctrOk(uint32_t &ctr) const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Base class for conditional, PC-relative branches.
Base class for conditional, register-based branches.
PowerISA::PCState branchTarget(const PowerISA::PCState &pc) const
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
PowerISA::PCState branchTarget(const PowerISA::PCState &pc) const
GenericISA::SimplePCState< MachInst > PCState
BranchRegCond(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.
Addr cachedPC
Cached program counter from last disassembly.
TheISA::ExtMachInst ExtMachInst
Binary extended machine instruction type.
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.
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.
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.
virtual TheISA::PCState branchTarget(const TheISA::PCState &pc) const
Return the target address for a PC-relative branch.
PowerISA::PCState branchTarget(const PowerISA::PCState &pc) const