LLVM: lib/Target/CSKY/MCTargetDesc/CSKYMCExpr.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

17

18using namespace llvm;

19

20#define DEBUG_TYPE "csky-mc-expr"

21

24 return new (Ctx) CSKYMCExpr(Kind, Expr);

25}

26

28 switch (Kind) {

29 default:

33 return "";

35 return "@HI16";

37 return "@LO16";

40 return "@GOT";

42 return "@GOTPC";

44 return "@GOTOFF";

47 return "@PLT";

49 return "@TPOFF";

51 return "@GOTTPOFF";

53 return "@TLSGD32";

55 return "@TLSLDO32";

57 return "@TLSLDM32";

58 }

59}

60

63}

64

68}

69

71 switch (Expr->getKind()) {

74 break;

76 break;

77

79 const MCBinaryExpr *BE = cast(Expr);

82 break;

83 }

84

86

87

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

90 break;

91 }

92

95 break;

96 }

97}

98

101 default:

102 return;

106 break;

107 }

108

110}

111

115 return false;

116

117

120 default:

121 return true;

133 return false;

134 }

135 }

136

137 return true;

138}

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

PowerPC TLS Dynamic Call Fixup

void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override

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

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

const MCExpr * getSubExpr() const

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

void visitUsedExpr(MCStreamer &Streamer) const override

static StringRef getVariantKindName(VariantKind Kind)

VariantKind getKind() const

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".

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.