LLVM 20.0.0git
|
#include "Target/Sparc/MCTargetDesc/SparcMCExpr.h"
Public Types | |
enum | VariantKind { VK_Sparc_None , VK_Sparc_LO , VK_Sparc_HI , VK_Sparc_H44 , VK_Sparc_M44 , VK_Sparc_L44 , VK_Sparc_HH , VK_Sparc_HM , VK_Sparc_LM , VK_Sparc_PC22 , VK_Sparc_PC10 , VK_Sparc_GOT22 , VK_Sparc_GOT10 , VK_Sparc_GOT13 , VK_Sparc_13 , VK_Sparc_WPLT30 , VK_Sparc_WDISP30 , VK_Sparc_R_DISP32 , VK_Sparc_TLS_GD_HI22 , VK_Sparc_TLS_GD_LO10 , VK_Sparc_TLS_GD_ADD , VK_Sparc_TLS_GD_CALL , VK_Sparc_TLS_LDM_HI22 , VK_Sparc_TLS_LDM_LO10 , VK_Sparc_TLS_LDM_ADD , VK_Sparc_TLS_LDM_CALL , VK_Sparc_TLS_LDO_HIX22 , VK_Sparc_TLS_LDO_LOX10 , VK_Sparc_TLS_LDO_ADD , VK_Sparc_TLS_IE_HI22 , VK_Sparc_TLS_IE_LO10 , VK_Sparc_TLS_IE_LD , VK_Sparc_TLS_IE_LDX , VK_Sparc_TLS_IE_ADD , VK_Sparc_TLS_LE_HIX22 , VK_Sparc_TLS_LE_LOX10 , VK_Sparc_HIX22 , VK_Sparc_LOX10 , VK_Sparc_GOTDATA_HIX22 , VK_Sparc_GOTDATA_LOX10 , VK_Sparc_GOTDATA_OP } |
Public Types inherited from llvm::MCExpr | |
enum | ExprKind : uint8_t { Binary , Constant , SymbolRef , Unary , Target } |
Public Member Functions | |
void | printImpl (raw_ostream &OS, const MCAsmInfo *MAI) const override |
bool | evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, const MCFixup *Fixup) const override |
void | visitUsedExpr (MCStreamer &Streamer) const override |
MCFragment * | findAssociatedFragment () const override |
void | fixELFSymbolsInTLSFixups (MCAssembler &Asm) const override |
Accessors | |
VariantKind | getKind () const |
getOpcode - Get the kind of this expression. | |
const MCExpr * | getSubExpr () const |
getSubExpr - Get the child of this expression. | |
Sparc::Fixups | getFixupKind () const |
getFixupKind - Get the fixup kind of this expression. | |
Public Member Functions inherited from llvm::MCTargetExpr | |
virtual void | printImpl (raw_ostream &OS, const MCAsmInfo *MAI) const =0 |
virtual bool | evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, const MCFixup *Fixup) const =0 |
virtual bool | isEqualTo (const MCExpr *x) const |
virtual bool | isSymbolUsedInExpression (const MCSymbol *Sym) const |
virtual bool | inlineAssignedExpr () const |
virtual void | visitUsedExpr (MCStreamer &Streamer) const =0 |
virtual MCFragment * | findAssociatedFragment () const =0 |
virtual void | fixELFSymbolsInTLSFixups (MCAssembler &) const =0 |
Public Member Functions inherited from llvm::MCExpr | |
MCExpr (const MCExpr &)=delete | |
MCExpr & | operator= (const MCExpr &)=delete |
ExprKind | getKind () const |
SMLoc | getLoc () const |
void | print (raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const |
void | dump () const |
bool | isSymbolUsedInExpression (const MCSymbol *Sym) const |
Returns whether the given symbol is used anywhere in the expression or subexpressions. | |
bool | evaluateAsAbsolute (int64_t &Res, const MCAssembler &Asm, const SectionAddrMap &Addrs) const |
Try to evaluate the expression to an absolute value. | |
bool | evaluateAsAbsolute (int64_t &Res) const |
bool | evaluateAsAbsolute (int64_t &Res, const MCAssembler &Asm) const |
bool | evaluateAsAbsolute (int64_t &Res, const MCAssembler *Asm) const |
bool | evaluateKnownAbsolute (int64_t &Res, const MCAssembler &Asm) const |
Aggressive variant of evaluateAsRelocatable when relocations are unavailable (e.g. | |
bool | evaluateAsRelocatable (MCValue &Res, const MCAssembler *Asm, const MCFixup *Fixup) const |
Try to evaluate the expression to a relocatable value, i.e. | |
bool | evaluateAsValue (MCValue &Res, const MCAssembler &Asm) const |
Try to evaluate the expression to the form (a - b + constant) where neither a nor b are variables. | |
MCFragment * | findAssociatedFragment () const |
Find the "associated section" for this expression, which is currently defined as the absolute section for constants, or otherwise the section associated with the first defined symbol in the expression. | |
Static Public Member Functions | |
static bool | classof (const MCExpr *E) |
static VariantKind | parseVariantKind (StringRef name) |
static bool | printVariantKind (raw_ostream &OS, VariantKind Kind) |
static Sparc::Fixups | getFixupKind (VariantKind Kind) |
Construction | |
static const SparcMCExpr * | create (VariantKind Kind, const MCExpr *Expr, MCContext &Ctx) |
Static Public Member Functions inherited from llvm::MCTargetExpr | |
static bool | classof (const MCExpr *E) |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::MCTargetExpr | |
MCTargetExpr () | |
virtual | ~MCTargetExpr ()=default |
Protected Member Functions inherited from llvm::MCExpr | |
MCExpr (ExprKind Kind, SMLoc Loc, unsigned SubclassData=0) | |
bool | evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, const MCFixup *Fixup, const SectionAddrMap *Addrs, bool InSet) const |
unsigned | getSubclassData () const |
Definition at line 23 of file SparcMCExpr.h.
Definition at line 25 of file SparcMCExpr.h.
Definition at line 106 of file SparcMCExpr.h.
References E, and llvm::MCExpr::Target.
|
static |
Definition at line 27 of file SparcMCExpr.cpp.
Referenced by createPCXRelExprOp(), createSparcMCOperand(), llvm::SparcELFMCAsmInfo::getExprForFDESymbol(), llvm::SparcELFMCAsmInfo::getExprForPersonalitySymbol(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), and LowerSymbolOperand().
|
overridevirtual |
Implements llvm::MCTargetExpr.
Definition at line 183 of file SparcMCExpr.cpp.
References llvm::MCExpr::evaluateAsRelocatable(), Fixup, and getSubExpr().
|
inlineoverridevirtual |
Implements llvm::MCTargetExpr.
Definition at line 100 of file SparcMCExpr.h.
References llvm::MCExpr::findAssociatedFragment(), and getSubExpr().
|
overridevirtual |
Implements llvm::MCTargetExpr.
Definition at line 218 of file SparcMCExpr.cpp.
References fixELFSymbolsInTLSFixupsImpl(), getKind(), getSubExpr(), llvm::ELF::STB_GLOBAL, VK_Sparc_TLS_GD_ADD, VK_Sparc_TLS_GD_CALL, VK_Sparc_TLS_GD_HI22, VK_Sparc_TLS_GD_LO10, VK_Sparc_TLS_IE_ADD, VK_Sparc_TLS_IE_HI22, VK_Sparc_TLS_IE_LD, VK_Sparc_TLS_IE_LDX, VK_Sparc_TLS_IE_LO10, VK_Sparc_TLS_LDM_ADD, VK_Sparc_TLS_LDM_CALL, VK_Sparc_TLS_LDM_HI22, VK_Sparc_TLS_LDM_LO10, VK_Sparc_TLS_LDO_ADD, VK_Sparc_TLS_LDO_HIX22, VK_Sparc_TLS_LDO_LOX10, VK_Sparc_TLS_LE_HIX22, and VK_Sparc_TLS_LE_LOX10.
|
inline |
getFixupKind - Get the fixup kind of this expression.
Definition at line 93 of file SparcMCExpr.h.
References getFixupKind().
Referenced by getFixupKind().
|
static |
Definition at line 138 of file SparcMCExpr.cpp.
References llvm::Sparc::fixup_sparc_13, llvm::Sparc::fixup_sparc_call30, llvm::Sparc::fixup_sparc_got10, llvm::Sparc::fixup_sparc_got13, llvm::Sparc::fixup_sparc_got22, llvm::Sparc::fixup_sparc_gotdata_hix22, llvm::Sparc::fixup_sparc_gotdata_lox10, llvm::Sparc::fixup_sparc_gotdata_op, llvm::Sparc::fixup_sparc_h44, llvm::Sparc::fixup_sparc_hh, llvm::Sparc::fixup_sparc_hi22, llvm::Sparc::fixup_sparc_hix22, llvm::Sparc::fixup_sparc_hm, llvm::Sparc::fixup_sparc_l44, llvm::Sparc::fixup_sparc_lm, llvm::Sparc::fixup_sparc_lo10, llvm::Sparc::fixup_sparc_lox10, llvm::Sparc::fixup_sparc_m44, llvm::Sparc::fixup_sparc_pc10, llvm::Sparc::fixup_sparc_pc22, llvm::Sparc::fixup_sparc_tls_gd_add, llvm::Sparc::fixup_sparc_tls_gd_call, llvm::Sparc::fixup_sparc_tls_gd_hi22, llvm::Sparc::fixup_sparc_tls_gd_lo10, llvm::Sparc::fixup_sparc_tls_ie_add, llvm::Sparc::fixup_sparc_tls_ie_hi22, llvm::Sparc::fixup_sparc_tls_ie_ld, llvm::Sparc::fixup_sparc_tls_ie_ldx, llvm::Sparc::fixup_sparc_tls_ie_lo10, llvm::Sparc::fixup_sparc_tls_ldm_add, llvm::Sparc::fixup_sparc_tls_ldm_call, llvm::Sparc::fixup_sparc_tls_ldm_hi22, llvm::Sparc::fixup_sparc_tls_ldm_lo10, llvm::Sparc::fixup_sparc_tls_ldo_add, llvm::Sparc::fixup_sparc_tls_ldo_hix22, llvm::Sparc::fixup_sparc_tls_ldo_lox10, llvm::Sparc::fixup_sparc_tls_le_hix22, llvm::Sparc::fixup_sparc_tls_le_lox10, llvm::Sparc::fixup_sparc_wplt30, llvm_unreachable, VK_Sparc_13, VK_Sparc_GOT10, VK_Sparc_GOT13, VK_Sparc_GOT22, VK_Sparc_GOTDATA_HIX22, VK_Sparc_GOTDATA_LOX10, VK_Sparc_GOTDATA_OP, VK_Sparc_H44, VK_Sparc_HH, VK_Sparc_HI, VK_Sparc_HIX22, VK_Sparc_HM, VK_Sparc_L44, VK_Sparc_LM, VK_Sparc_LO, VK_Sparc_LOX10, VK_Sparc_M44, VK_Sparc_PC10, VK_Sparc_PC22, VK_Sparc_TLS_GD_ADD, VK_Sparc_TLS_GD_CALL, VK_Sparc_TLS_GD_HI22, VK_Sparc_TLS_GD_LO10, VK_Sparc_TLS_IE_ADD, VK_Sparc_TLS_IE_HI22, VK_Sparc_TLS_IE_LD, VK_Sparc_TLS_IE_LDX, VK_Sparc_TLS_IE_LO10, VK_Sparc_TLS_LDM_ADD, VK_Sparc_TLS_LDM_CALL, VK_Sparc_TLS_LDM_HI22, VK_Sparc_TLS_LDM_LO10, VK_Sparc_TLS_LDO_ADD, VK_Sparc_TLS_LDO_HIX22, VK_Sparc_TLS_LDO_LOX10, VK_Sparc_TLS_LE_HIX22, VK_Sparc_TLS_LE_LOX10, VK_Sparc_WDISP30, and VK_Sparc_WPLT30.
|
inline |
getOpcode - Get the kind of this expression.
Definition at line 87 of file SparcMCExpr.h.
Referenced by fixELFSymbolsInTLSFixups().
getSubExpr - Get the child of this expression.
Definition at line 90 of file SparcMCExpr.h.
Referenced by evaluateAsRelocatableImpl(), findAssociatedFragment(), fixELFSymbolsInTLSFixups(), printImpl(), and visitUsedExpr().
|
static |
Definition at line 93 of file SparcMCExpr.cpp.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), name, VK_Sparc_GOT10, VK_Sparc_GOT13, VK_Sparc_GOT22, VK_Sparc_GOTDATA_HIX22, VK_Sparc_GOTDATA_LOX10, VK_Sparc_GOTDATA_OP, VK_Sparc_H44, VK_Sparc_HH, VK_Sparc_HI, VK_Sparc_HIX22, VK_Sparc_HM, VK_Sparc_L44, VK_Sparc_LM, VK_Sparc_LO, VK_Sparc_LOX10, VK_Sparc_M44, VK_Sparc_None, VK_Sparc_PC10, VK_Sparc_PC22, VK_Sparc_R_DISP32, VK_Sparc_TLS_GD_ADD, VK_Sparc_TLS_GD_CALL, VK_Sparc_TLS_GD_HI22, VK_Sparc_TLS_GD_LO10, VK_Sparc_TLS_IE_ADD, VK_Sparc_TLS_IE_HI22, VK_Sparc_TLS_IE_LD, VK_Sparc_TLS_IE_LDX, VK_Sparc_TLS_IE_LO10, VK_Sparc_TLS_LDM_ADD, VK_Sparc_TLS_LDM_CALL, VK_Sparc_TLS_LDM_HI22, VK_Sparc_TLS_LDM_LO10, VK_Sparc_TLS_LDO_ADD, VK_Sparc_TLS_LDO_HIX22, VK_Sparc_TLS_LDO_LOX10, VK_Sparc_TLS_LE_HIX22, and VK_Sparc_TLS_LE_LOX10.
|
overridevirtual |
Implements llvm::MCTargetExpr.
Definition at line 32 of file SparcMCExpr.cpp.
References getSubExpr(), OS, llvm::MCExpr::print(), and printVariantKind().
|
static |
Definition at line 43 of file SparcMCExpr.cpp.
References llvm_unreachable, OS, VK_Sparc_13, VK_Sparc_GOT10, VK_Sparc_GOT13, VK_Sparc_GOT22, VK_Sparc_GOTDATA_HIX22, VK_Sparc_GOTDATA_LOX10, VK_Sparc_GOTDATA_OP, VK_Sparc_H44, VK_Sparc_HH, VK_Sparc_HI, VK_Sparc_HIX22, VK_Sparc_HM, VK_Sparc_L44, VK_Sparc_LM, VK_Sparc_LO, VK_Sparc_LOX10, VK_Sparc_M44, VK_Sparc_None, VK_Sparc_PC10, VK_Sparc_PC22, VK_Sparc_R_DISP32, VK_Sparc_TLS_GD_ADD, VK_Sparc_TLS_GD_CALL, VK_Sparc_TLS_GD_HI22, VK_Sparc_TLS_GD_LO10, VK_Sparc_TLS_IE_ADD, VK_Sparc_TLS_IE_HI22, VK_Sparc_TLS_IE_LD, VK_Sparc_TLS_IE_LDX, VK_Sparc_TLS_IE_LO10, VK_Sparc_TLS_LDM_ADD, VK_Sparc_TLS_LDM_CALL, VK_Sparc_TLS_LDM_HI22, VK_Sparc_TLS_LDM_LO10, VK_Sparc_TLS_LDO_ADD, VK_Sparc_TLS_LDO_HIX22, VK_Sparc_TLS_LDO_LOX10, VK_Sparc_TLS_LE_HIX22, VK_Sparc_TLS_LE_LOX10, VK_Sparc_WDISP30, and VK_Sparc_WPLT30.
Referenced by printImpl().
|
overridevirtual |
Implements llvm::MCTargetExpr.
Definition at line 253 of file SparcMCExpr.cpp.
References getSubExpr(), and llvm::MCStreamer::visitUsedExpr().