LLVM: lib/Target/VE/MCTargetDesc/VEMCExpr.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 "vemcexpr"

26

29 return new (Ctx) VEMCExpr(Kind, Expr);

30}

31

33

35

38

39 if (closeParen)

40 OS << ')';

42}

43

45 switch (Kind) {

48 return false;

49

64

65 return false;

66 }

67 return true;

68}

69

71 switch (Kind) {

74 break;

76 OS << "@hi";

77 break;

79 OS << "@lo";

80 break;

82 OS << "@pc_hi";

83 break;

85 OS << "@pc_lo";

86 break;

88 OS << "@got_hi";

89 break;

91 OS << "@got_lo";

92 break;

94 OS << "@gotoff_hi";

95 break;

97 OS << "@gotoff_lo";

98 break;

100 OS << "@plt_hi";

101 break;

103 OS << "@plt_lo";

104 break;

106 OS << "@tls_gd_hi";

107 break;

109 OS << "@tls_gd_lo";

110 break;

112 OS << "@tpoff_hi";

113 break;

115 OS << "@tpoff_lo";

116 break;

117 }

118}

119

137}

138

140 switch (Kind) {

141 default:

173 }

174}

175

179 return false;

180

181 Res =

183

184 return true;

185}

186

188 switch (Expr->getKind()) {

191 break;

192

194 break;

195

197 const MCBinaryExpr *BE = cast(Expr);

200 break;

201 }

202

204

205

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

208 break;

209 }

210

213 break;

214 }

215}

216

219}

220

223 default:

224 return;

229 break;

230 }

232}

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

PowerPC TLS Dynamic Call Fixup

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.

A switch()-like statement whose cases are string literals.

StringSwitch & Case(StringLiteral S, T Value)

static VariantKind parseVariantKind(StringRef name)

static void printVariantKindSuffix(raw_ostream &OS, VariantKind Kind)

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

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

VE::Fixups getFixupKind() const

getFixupKind - Get the fixup kind of this expression.

void visitUsedExpr(MCStreamer &Streamer) const override

VariantKind getKind() const

getOpcode - Get the kind of this expression.

const MCExpr * getSubExpr() const

getSubExpr - Get the child of this expression.

static bool printVariantKind(raw_ostream &OS, VariantKind Kind)

void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override

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

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.

@ fixup_ve_got_hi32

fixup_ve_got_hi32 - 32-bit fixup corresponding to foo@got_hi

@ fixup_ve_gotoff_hi32

fixup_ve_gotoff_hi32 - 32-bit fixup corresponding to foo@gotoff_hi

@ fixup_ve_got_lo32

fixup_ve_got_lo32 - 32-bit fixup corresponding to foo@got_lo

@ fixup_ve_pc_hi32

fixup_ve_pc_hi32 - 32-bit fixup corresponding to foo@pc_hi

@ fixup_ve_lo32

fixup_ve_lo32 - 32-bit fixup corresponding to foo@lo

@ fixup_ve_gotoff_lo32

fixup_ve_gotoff_lo32 - 32-bit fixup corresponding to foo@gotoff_lo

@ fixup_ve_hi32

fixup_ve_hi32 - 32-bit fixup corresponding to foo@hi

@ fixup_ve_pc_lo32

fixup_ve_pc_lo32 - 32-bit fixup corresponding to foo@pc_lo

@ fixup_ve_plt_hi32

fixup_ve_plt_hi32/lo32

@ fixup_ve_reflong

fixup_ve_reflong - 32-bit fixup corresponding to foo

@ fixup_ve_tls_gd_hi32

fixups for Thread Local Storage

This is an optimization pass for GlobalISel generic memory operations.