31 #ifndef __ARCH_POWER_INSTS_BRANCH_HH__ 32 #define __ARCH_POWER_INSTS_BRANCH_HH__ 60 cachedPC(0), cachedSymtab(0)
84 if (disp & 0x2000000) {
114 if (targetAddr & 0x2000000) {
115 targetAddr |= 0xfc000000;
156 ctr_ok = ((bo & 2) == 0);
158 ctr_ok = ((bo & 2) != 0);
171 cond_ok = (((cr >> (31 -
bi)) & 1) == ((bo >> 3) & 1));
223 if (targetAddr & 0x8000) {
224 targetAddr |= 0xffff0000;
261 #endif //__ARCH_POWER_INSTS_BRANCH_HH__ uint32_t bo
Fields needed for conditions.
Base class for unconditional, non PC-relative branches.
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const override
Internal function to generate disassembly string.
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.
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.
const std::string & disassemble(Addr pc, const SymbolTable *symtab) const
Return string representation of disassembled instruction.
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
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.
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.