LLVM API Documentation
#include <MCInstrAnalysis.h>
Public Member Functions | |
MCInstrAnalysis (const MCInstrInfo *Info) | |
virtual | ~MCInstrAnalysis () |
virtual bool | isBranch (const MCInst &Inst) const |
virtual bool | isConditionalBranch (const MCInst &Inst) const |
virtual bool | isUnconditionalBranch (const MCInst &Inst) const |
virtual bool | isIndirectBranch (const MCInst &Inst) const |
virtual bool | isCall (const MCInst &Inst) const |
virtual bool | isReturn (const MCInst &Inst) const |
virtual bool | isTerminator (const MCInst &Inst) const |
virtual bool | evaluateBranch (const MCInst &Inst, uint64_t Addr, uint64_t Size, uint64_t &Target) const |
Protected Attributes | |
const MCInstrInfo * | Info |
Friends | |
class | Target |
Definition at line 24 of file MCInstrAnalysis.h.
llvm::MCInstrAnalysis::MCInstrAnalysis | ( | const MCInstrInfo * | Info | ) | [inline] |
Definition at line 30 of file MCInstrAnalysis.h.
virtual llvm::MCInstrAnalysis::~MCInstrAnalysis | ( | ) | [inline, virtual] |
Definition at line 32 of file MCInstrAnalysis.h.
bool MCInstrAnalysis::evaluateBranch | ( | const MCInst & | Inst, |
uint64_t | Addr, | ||
uint64_t | Size, | ||
uint64_t & | Target | ||
) | const [virtual] |
evaluateBranch - Given a branch instruction try to get the address the branch targets. Return true on success, and the address in Target.
Definition at line 13 of file MCInstrAnalysis.cpp.
References llvm::MCInstrInfo::get(), llvm::MCOperand::getImm(), llvm::MCInst::getNumOperands(), llvm::MCInst::getOpcode(), llvm::MCInst::getOperand(), Info, and llvm::MCOI::OPERAND_PCREL.
virtual bool llvm::MCInstrAnalysis::isBranch | ( | const MCInst & | Inst | ) | const [inline, virtual] |
Definition at line 34 of file MCInstrAnalysis.h.
References llvm::MCInstrInfo::get(), llvm::MCInst::getOpcode(), and Info.
virtual bool llvm::MCInstrAnalysis::isCall | ( | const MCInst & | Inst | ) | const [inline, virtual] |
Definition at line 50 of file MCInstrAnalysis.h.
References llvm::MCInstrInfo::get(), llvm::MCInst::getOpcode(), and Info.
virtual bool llvm::MCInstrAnalysis::isConditionalBranch | ( | const MCInst & | Inst | ) | const [inline, virtual] |
Definition at line 38 of file MCInstrAnalysis.h.
References llvm::MCInstrInfo::get(), llvm::MCInst::getOpcode(), and Info.
virtual bool llvm::MCInstrAnalysis::isIndirectBranch | ( | const MCInst & | Inst | ) | const [inline, virtual] |
Definition at line 46 of file MCInstrAnalysis.h.
References llvm::MCInstrInfo::get(), llvm::MCInst::getOpcode(), and Info.
virtual bool llvm::MCInstrAnalysis::isReturn | ( | const MCInst & | Inst | ) | const [inline, virtual] |
Definition at line 54 of file MCInstrAnalysis.h.
References llvm::MCInstrInfo::get(), llvm::MCInst::getOpcode(), and Info.
virtual bool llvm::MCInstrAnalysis::isTerminator | ( | const MCInst & | Inst | ) | const [inline, virtual] |
Definition at line 58 of file MCInstrAnalysis.h.
References llvm::MCInstrInfo::get(), llvm::MCInst::getOpcode(), and Info.
virtual bool llvm::MCInstrAnalysis::isUnconditionalBranch | ( | const MCInst & | Inst | ) | const [inline, virtual] |
Definition at line 42 of file MCInstrAnalysis.h.
References llvm::MCInstrInfo::get(), llvm::MCInst::getOpcode(), and Info.
friend class Target [friend] |
Definition at line 26 of file MCInstrAnalysis.h.
const MCInstrInfo* llvm::MCInstrAnalysis::Info [protected] |
Definition at line 27 of file MCInstrAnalysis.h.
Referenced by evaluateBranch(), isBranch(), isCall(), isConditionalBranch(), isIndirectBranch(), isReturn(), isTerminator(), and isUnconditionalBranch().