LLVM: lib/Target/Hexagon/MCTargetDesc/HexagonMCExpr.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

18

19using namespace llvm;

20

21#define DEBUG_TYPE "hexagon-mcexpr"

22

25}

26

31}

32

35}

36

39}

40

42 switch (Expr->getKind()) {

45 break;

47 break;

48

50 const MCBinaryExpr *be = cast(Expr);

53 break;

54 }

56 const MCSymbolRefExpr &symRef = *cast(Expr);

57 switch (symRef.getKind()) {

58 default:

59 return;

67 break;

68 }

70 break;

71 }

74 break;

75 }

76}

77

81}

82

84

86 assert((!Val || !MustNotExtend) && "Extension contradiction");

87 MustExtend = Val;

88}

89

92 assert((!Val || !MustExtend) && "Extension contradiction");

93 MustNotExtend = Val;

94}

96

99 S27_2_reloc = Val;

100}

101

102HexagonMCExpr::HexagonMCExpr(MCExpr const *Expr)

103 : Expr(Expr), MustNotExtend(false), MustExtend(false), S27_2_reloc(false),

104 SignMismatch(false) {}

105

108}

109

111 SignMismatch = Val;

112}

113

115 return SignMismatch;

116}

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

PowerPC TLS Dynamic Call Fixup

assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

void setMustNotExtend(bool Val=true)

bool mustNotExtend() const

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

void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override

bool signMismatch() const

static HexagonMCExpr * create(MCExpr const *Expr, MCContext &Ctx)

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

void setMustExtend(bool Val=true)

MCFragment * findAssociatedFragment() const override

MCExpr const * getExpr() const

void setS27_2_reloc(bool Val=true)

void setSignMismatch(bool Val=true)

void visitUsedExpr(MCStreamer &Streamer) 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

MCFragment * findAssociatedFragment() const

Find the "associated section" for this expression, which is currently defined as the absolute section...

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

VariantKind getKind() const

This represents an "assembler immediate".

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.