LLVM  9.0.0svn
HexagonMCExpr.h
Go to the documentation of this file.
1 //==- HexagonMCExpr.h - Hexagon specific MC expression classes --*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
10 #define LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
11 
12 #include "llvm/MC/MCExpr.h"
13 
14 namespace llvm {
15 class MCInst;
16 class HexagonMCExpr : public MCTargetExpr {
17 public:
18  static HexagonMCExpr *create(MCExpr const *Expr, MCContext &Ctx);
19  void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override;
20  bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout,
21  const MCFixup *Fixup) const override;
22  void visitUsedExpr(MCStreamer &Streamer) const override;
23  MCFragment *findAssociatedFragment() const override;
24  void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override;
25  static bool classof(MCExpr const *E);
26  MCExpr const *getExpr() const;
27  void setMustExtend(bool Val = true);
28  bool mustExtend() const;
29  void setMustNotExtend(bool Val = true);
30  bool mustNotExtend() const;
31  void setS27_2_reloc(bool Val = true);
32  bool s27_2_reloc() const;
33  void setSignMismatch(bool Val = true);
34  bool signMismatch() const;
35 
36 private:
37  HexagonMCExpr(MCExpr const *Expr);
38  MCExpr const *Expr;
39  bool MustNotExtend;
40  bool MustExtend;
41  bool S27_2_reloc;
42  bool SignMismatch;
43 };
44 } // end namespace llvm
45 
46 #endif // LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
void setMustExtend(bool Val=true)
This class represents lattice values for constants.
Definition: AllocatorList.h:23
This represents an "assembler immediate".
Definition: MCValue.h:39
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:28
MCFragment * findAssociatedFragment() const override
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
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:64
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:188
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:45