LLVM  7.0.0
Nios2MCExpr.h
Go to the documentation of this file.
1 //===-- Nios2MCExpr.h - Nios2 specific MC expression classes ----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_LIB_TARGET_NIOS2_MCTARGETDESC_NIOS2MCEXPR_H
11 #define LLVM_LIB_TARGET_NIOS2_MCTARGETDESC_NIOS2MCEXPR_H
12 
13 #include "llvm/MC/MCAsmLayout.h"
14 #include "llvm/MC/MCExpr.h"
15 #include "llvm/MC/MCValue.h"
16 
17 namespace llvm {
18 
19 class Nios2MCExpr : public MCTargetExpr {
20 public:
26  };
27 
28 private:
29  const Nios2ExprKind Kind;
30  const MCExpr *Expr;
31 
32  explicit Nios2MCExpr(Nios2ExprKind Kind, const MCExpr *Expr)
33  : Kind(Kind), Expr(Expr) {}
34 
35 public:
36  static const Nios2MCExpr *create(Nios2ExprKind Kind, const MCExpr *Expr,
37  MCContext &Ctx);
38  static const Nios2MCExpr *create(const MCSymbol *Symbol,
40  MCContext &Ctx);
41 
42  /// Get the kind of this expression.
43  Nios2ExprKind getKind() const { return Kind; }
44 
45  /// Get the child of this expression.
46  const MCExpr *getSubExpr() const { return Expr; }
47 
48  void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override;
49  bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout,
50  const MCFixup *Fixup) const override;
51  void visitUsedExpr(MCStreamer &Streamer) const override;
52  MCFragment *findAssociatedFragment() const override {
54  }
55 
56  void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override;
57 };
58 } // end namespace llvm
59 
60 #endif
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
This represents an "assembler immediate".
Definition: MCValue.h:40
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:42
const MCExpr * getSubExpr() const
Get the child of this expression.
Definition: Nios2MCExpr.h:46
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Definition: MCFixup.h:74
Encapsulates the layout of an assembly file at a particular point in time.
Definition: MCAsmLayout.h:29
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:36
This is an extension point for target-specific MCExpr subclasses to implement.
Definition: MCExpr.h:579
Context object for machine code objects.
Definition: MCContext.h:63
MCFragment * findAssociatedFragment() const override
Definition: Nios2MCExpr.h:52
void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override
Definition: Nios2MCExpr.cpp:66
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
Streaming machine code generation interface.
Definition: MCStreamer.h:183
PowerPC TLS Dynamic Call Fixup
void visitUsedExpr(MCStreamer &Streamer) const override
Definition: Nios2MCExpr.cpp:62
MCFragment * findAssociatedFragment() const
Find the "associated section" for this expression, which is currently defined as the absolute section...
Definition: MCExpr.cpp:853
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
Definition: Nios2MCExpr.cpp:56
static const Nios2MCExpr * create(Nios2ExprKind Kind, const MCExpr *Expr, MCContext &Ctx)
Definition: Nios2MCExpr.cpp:23
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46
Nios2ExprKind getKind() const
Get the kind of this expression.
Definition: Nios2MCExpr.h:43
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
Definition: Nios2MCExpr.cpp:36