LLVM: lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

22

23using namespace llvm;

24

25#define DEBUG_TYPE "aarch64symbolrefexpr"

26

30}

31

33

36 case VK_LO12: return ":lo12:";

37 case VK_ABS_G3: return ":abs_g3:";

38 case VK_ABS_G2: return ":abs_g2:";

41 case VK_ABS_G1: return ":abs_g1:";

44 case VK_ABS_G0: return ":abs_g0:";

74 case VK_GOT: return ":got:";

92 default:

94 }

95

96}

97

101}

102

105}

106

109}

110

115 return false;

116

117 Res =

119

120 return true;

121}

122

124 switch (Expr->getKind()) {

127 break;

129 break;

130

132 const MCBinaryExpr *BE = cast(Expr);

135 break;

136 }

137

139

140

141 const MCSymbolRefExpr &SymRef = *cast(Expr);

143 break;

144 }

145

148 break;

149 }

150}

151

154 default:

155 return;

161 break;

162 }

163

165}

166

170 bool HasAddressDiversity,

172 return new (Ctx)

173 AArch64AuthMCExpr(Expr, Discriminator, Key, HasAddressDiversity);

174}

175

177 bool WrapSubExprInParens = !isa(getSubExpr());

178 if (WrapSubExprInParens)

179 OS << '(';

181 if (WrapSubExprInParens)

182 OS << ')';

183

186 OS << ",addr";

187 OS << ')';

188}

189

192}

193

196}

197

202 return false;

203

206

208 return true;

209}

static void fixELFSymbolsInTLSFixupsImpl(const MCExpr *Expr, MCAssembler &Asm)

PowerPC TLS Dynamic Call Fixup

bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm, const MCFixup *Fixup) const override

bool hasAddressDiversity() const

static const AArch64AuthMCExpr * create(const MCExpr *Expr, uint16_t Discriminator, AArch64PACKey::ID Key, bool HasAddressDiversity, MCContext &Ctx)

void visitUsedExpr(MCStreamer &Streamer) const override

void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override

MCFragment * findAssociatedFragment() const override

static VariantKind getSymbolLoc(VariantKind Kind)

void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override

bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm, const MCFixup *Fixup) const override

MCFragment * findAssociatedFragment() const override

StringRef getVariantKindName() const

Convert the variant kind into an ELF-appropriate modifier (e.g.

void visitUsedExpr(MCStreamer &Streamer) const override

static const AArch64MCExpr * create(const MCExpr *Expr, VariantKind Kind, MCContext &Ctx)

const MCExpr * getSubExpr() const

Get the expression this modifier applies to.

VariantKind getKind() const

Get the kind of this expression.

void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override

This class is intended to be used as a base class for asm properties and features specific to the tar...

Binary assembler expressions.

const MCExpr * getLHS() const

Get the left-hand side expression of the binary operator.

const MCExpr * getRHS() const

Get the right-hand side expression of the binary operator.

Context object for machine code objects.

Base class for the full range of assembler expressions which are needed for parsing.

@ Unary

Unary expressions.

@ Constant

Constant expressions.

@ SymbolRef

References to labels and assigned expressions.

@ Target

Target specific expression.

@ Binary

Binary expressions.

bool evaluateAsRelocatable(MCValue &Res, const MCAssembler *Asm, const MCFixup *Fixup) const

Try to evaluate the expression to a relocatable value, i.e.

void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const

Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...

Streaming machine code generation interface.

void visitUsedExpr(const MCExpr &Expr)

Represent a reference to a symbol from inside an expression.

const MCSymbol & getSymbol() const

This represents an "assembler immediate".

int64_t getConstant() const

static MCValue get(const MCSymbolRefExpr *SymA, const MCSymbolRefExpr *SymB=nullptr, int64_t Val=0, uint32_t RefKind=0)

const MCSymbolRefExpr * getSymB() const

const MCSymbolRefExpr * getSymA() const

StringRef - Represent a constant reference to a string, i.e.

This class implements an extremely fast bulk output stream that can only output to a stream.

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

This is an optimization pass for GlobalISel generic memory operations.

void report_fatal_error(Error Err, bool gen_crash_diag=true)

Report a serious error, calling any installed error handler.

static StringRef AArch64PACKeyIDToString(AArch64PACKey::ID KeyID)

Return 2-letter identifier string for numeric key ID.