LLVM  8.0.1
HexagonMCExpr.h
Go to the documentation of this file.
1 //==- HexagonMCExpr.h - Hexagon 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_HEXAGON_HEXAGONMCEXPR_H
11 #define LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
12 
13 #include "llvm/MC/MCExpr.h"
14 
15 namespace llvm {
16 class MCInst;
17 class HexagonMCExpr : public MCTargetExpr {
18 public:
19  static HexagonMCExpr *create(MCExpr const *Expr, MCContext &Ctx);
20  void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override;
21  bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout,
22  const MCFixup *Fixup) const override;
23  void visitUsedExpr(MCStreamer &Streamer) const override;
24  MCFragment *findAssociatedFragment() const override;
25  void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override;
26  static bool classof(MCExpr const *E);
27  MCExpr const *getExpr() const;
28  void setMustExtend(bool Val = true);
29  bool mustExtend() const;
30  void setMustNotExtend(bool Val = true);
31  bool mustNotExtend() const;
32  void setS27_2_reloc(bool Val = true);
33  bool s27_2_reloc() const;
34  void setSignMismatch(bool Val = true);
35  bool signMismatch() const;
36 
37 private:
38  HexagonMCExpr(MCExpr const *Expr);
39  MCExpr const *Expr;
40  bool MustNotExtend;
41  bool MustExtend;
42  bool S27_2_reloc;
43  bool SignMismatch;
44 };
45 } // end namespace llvm
46 
47 #endif // LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
void setMustExtend(bool Val=true)
This class represents lattice values for constants.
Definition: AllocatorList.h:24
This represents an "assembler immediate".
Definition: MCValue.h:40
bool s27_2_reloc() const
void setMustNotExtend(bool Val=true)
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Definition: MCFixup.h:74
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
Encapsulates the layout of an assembly file at a particular point in time.
Definition: MCAsmLayout.h:29
MCFragment * findAssociatedFragment() const override
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:581
static bool classof(MCExpr const *E)
Context object for machine code objects.
Definition: MCContext.h:63
void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override
void setS27_2_reloc(bool Val=true)
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:189
MCExpr const * getExpr() const
static HexagonMCExpr * create(MCExpr const *Expr, MCContext &Ctx)
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
void setSignMismatch(bool Val=true)
bool mustNotExtend() const
PowerPC TLS Dynamic Call Fixup
bool signMismatch() const
void visitUsedExpr(MCStreamer &Streamer) const override
bool mustExtend() const
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46