LLVM API Documentation

Public Member Functions
llvm::AArch64ExternalSymbolizer Class Reference

#include <AArch64ExternalSymbolizer.h>

Inheritance diagram for llvm::AArch64ExternalSymbolizer:
Inheritance graph
[legend]
Collaboration diagram for llvm::AArch64ExternalSymbolizer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AArch64ExternalSymbolizer (MCContext &Ctx, std::unique_ptr< MCRelocationInfo > RelInfo, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo)
bool tryAddingSymbolicOperand (MCInst &MI, raw_ostream &CommentStream, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, uint64_t InstSize) override

Detailed Description

Definition at line 21 of file AArch64ExternalSymbolizer.h.


Constructor & Destructor Documentation

llvm::AArch64ExternalSymbolizer::AArch64ExternalSymbolizer ( MCContext Ctx,
std::unique_ptr< MCRelocationInfo RelInfo,
LLVMOpInfoCallback  GetOpInfo,
LLVMSymbolLookupCallback  SymbolLookUp,
void *  DisInfo 
) [inline]

Definition at line 23 of file AArch64ExternalSymbolizer.h.


Member Function Documentation

bool AArch64ExternalSymbolizer::tryAddingSymbolicOperand ( MCInst MI,
raw_ostream CommentStream,
int64_t  Value,
uint64_t  Address,
bool  IsBranch,
uint64_t  Offset,
uint64_t  InstSize 
) [override, virtual]

tryAddingSymbolicOperand - tryAddingSymbolicOperand trys to add a symbolic operand in place of the immediate Value in the MCInst. The immediate Value has not had any PC adjustment made by the caller. If the instruction is a branch that adds the PC to the immediate Value then isBranch is Success, else Fail. If GetOpInfo is non-null, then it is called to get any symbolic information at the Address for this instrution. If that returns non-zero then the symbolic information it returns is used to create an MCExpr and that is added as an operand to the MCInst. If GetOpInfo() returns zero and isBranch is Success then a symbol look up for Address + Value is done and if a symbol is found an MCExpr is created with that, else an MCExpr with Address + Value is created. If GetOpInfo() returns zero and isBranch is Fail then the the Opcode of the MCInst is tested and for ADRP an other instructions that help to load of pointers a symbol look up is done to see it is returns a specific reference type to add to the comment stream. This function returns Success if it adds an operand to the MCInst and Fail otherwise.

Reimplemented from llvm::MCExternalSymbolizer.

Definition at line 60 of file AArch64ExternalSymbolizer.cpp.

References llvm::MCInst::addOperand(), LLVMOpInfo1::AddSymbol, llvm::AArch64ISD::ADRP, llvm::MCConstantExpr::Create(), llvm::MCSymbolRefExpr::Create(), CreateAdd(), llvm::MCOperand::CreateExpr(), llvm::MCUnaryExpr::CreateMinus(), llvm::MCBinaryExpr::CreateSub(), llvm::MCSymbolizer::Ctx, llvm::MCExternalSymbolizer::DisInfo, llvm::format(), llvm::MCRegisterInfo::getEncodingValue(), llvm::MCInst::getOpcode(), llvm::MCInst::getOperand(), llvm::MCExternalSymbolizer::GetOpInfo, llvm::MCContext::GetOrCreateSymbol(), llvm::MCOperand::getReg(), llvm::MCContext::getRegisterInfo(), getVariant(), LLVMDisassembler_ReferenceType_In_ARM64_ADDXri, LLVMDisassembler_ReferenceType_In_ARM64_ADR, LLVMDisassembler_ReferenceType_In_ARM64_ADRP, LLVMDisassembler_ReferenceType_In_ARM64_LDRXl, LLVMDisassembler_ReferenceType_In_ARM64_LDRXui, LLVMDisassembler_ReferenceType_In_Branch, LLVMDisassembler_ReferenceType_Out_LitPool_CstrAddr, LLVMDisassembler_ReferenceType_Out_LitPool_SymAddr, LLVMDisassembler_ReferenceType_Out_Objc_CFString_Ref, LLVMDisassembler_ReferenceType_Out_Objc_Class_Ref, LLVMDisassembler_ReferenceType_Out_Objc_Message, LLVMDisassembler_ReferenceType_Out_Objc_Message_Ref, LLVMDisassembler_ReferenceType_Out_Objc_Selector_Ref, LLVMDisassembler_ReferenceType_Out_SymbolStub, llvm::LibFunc::memset, LLVMOpInfoSymbol1::Name, Name, LLVMOpInfoSymbol1::Present, LLVMOpInfo1::SubtractSymbol, llvm::MCExternalSymbolizer::SymbolLookUp, LLVMOpInfoSymbol1::Value, LLVMOpInfo1::Value, LLVMOpInfo1::VariantKind, and llvm::MCSymbolRefExpr::VK_None.


The documentation for this class was generated from the following files: