30#ifndef __ARCH_POWER_INSTS_BRANCH_HH__
31#define __ARCH_POWER_INSTS_BRANCH_HH__
130 return !((ctr != 0) ^ (
bits(
bo, 1) == 0));
Base class for conditional branches.
bool ctrOk(uint64_t &ctr) const
BranchCondOp(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.
bool condOk(uint32_t cr) const
Base class for conditional, PC-relative or absolute address branches.
BranchDispCondOp(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.
std::unique_ptr< PCStateBase > branchTarget(ThreadContext *tc) const override
Return the target address for an indirect branch (jump).
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Base class for unconditional, PC-relative or absolute address branches.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::unique_ptr< PCStateBase > branchTarget(ThreadContext *tc) const override
Return the target address for an indirect branch (jump).
BranchOp(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.
Base class for conditional, register-based branches.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::unique_ptr< PCStateBase > branchTarget(ThreadContext *tc) const override
Return the target address for an indirect branch (jump).
uint8_t bh
TODO: Branch hints are currently ignored.
BranchRegCondOp(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.
Base class for instructions whose disassembly is not purely a function of the machine instruction (i....
PCDependentDisassembly(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
Constructor.
const loader::SymbolTable * cachedSymtab
Cached symbol table pointer from last disassembly.
Addr cachedPC
Cached program counter from last disassembly.
const std::string & disassemble(Addr pc, const loader::SymbolTable *symtab) const
Return string representation of disassembled instruction.
virtual std::unique_ptr< PCStateBase > branchTarget(const PCStateBase &pc) const
Return the target address for a PC-relative branch.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
constexpr uint64_t sext(uint64_t val)
Sign-extend an N-bit value to 64 bits.
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.