LLVM  14.0.0git
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 HexagonMCExpr : public MCTargetExpr {
16 public:
17  static HexagonMCExpr *create(MCExpr const *Expr, MCContext &Ctx);
18  void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override;
19  bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout,
20  const MCFixup *Fixup) const override;
21  void visitUsedExpr(MCStreamer &Streamer) const override;
22  MCFragment *findAssociatedFragment() const override;
23  void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override;
24  static bool classof(MCExpr const *E);
25  MCExpr const *getExpr() const;
26  void setMustExtend(bool Val = true);
27  bool mustExtend() const;
28  void setMustNotExtend(bool Val = true);
29  bool mustNotExtend() const;
30  void setS27_2_reloc(bool Val = true);
31  bool s27_2_reloc() const;
32  void setSignMismatch(bool Val = true);
33  bool signMismatch() const;
34 
35 private:
36  HexagonMCExpr(MCExpr const *Expr);
37  MCExpr const *Expr;
38  bool MustNotExtend;
39  bool MustExtend;
40  bool S27_2_reloc;
41  bool SignMismatch;
42 };
43 } // end namespace llvm
44 
45 #endif // LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::HexagonMCExpr::findAssociatedFragment
MCFragment * findAssociatedFragment() const override
Definition: HexagonMCExpr.cpp:36
llvm::HexagonMCExpr::printImpl
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
Definition: HexagonMCExpr.cpp:109
llvm::HexagonMCExpr::fixELFSymbolsInTLSFixups
void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override
Definition: HexagonMCExpr.cpp:77
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:72
llvm::MCAsmInfo
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
llvm::HexagonMCExpr::mustExtend
bool mustExtend() const
Definition: HexagonMCExpr.cpp:89
llvm::HexagonMCExpr::classof
static bool classof(MCExpr const *E)
Definition: HexagonMCExpr.cpp:101
llvm::HexagonMCExpr
Definition: HexagonMCExpr.h:15
llvm::HexagonMCExpr::getExpr
const MCExpr * getExpr() const
Definition: HexagonMCExpr.cpp:82
llvm::HexagonMCExpr::signMismatch
bool signMismatch() const
Definition: HexagonMCExpr.cpp:117
llvm::MCFragment
Definition: MCFragment.h:31
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:199
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::HexagonMCExpr::s27_2_reloc
bool s27_2_reloc() const
Definition: HexagonMCExpr.cpp:96
llvm::HexagonMCExpr::create
static HexagonMCExpr * create(MCExpr const *Expr, MCContext &Ctx)
Definition: HexagonMCExpr.cpp:22
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::HexagonMCExpr::visitUsedExpr
void visitUsedExpr(MCStreamer &Streamer) const override
Definition: HexagonMCExpr.cpp:32
llvm::HexagonMCExpr::setSignMismatch
void setSignMismatch(bool Val=true)
Definition: HexagonMCExpr.cpp:113
llvm::HexagonMCExpr::evaluateAsRelocatableImpl
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
Definition: HexagonMCExpr.cpp:26
llvm::MCAssembler
Definition: MCAssembler.h:60
llvm::HexagonMCExpr::setMustNotExtend
void setMustNotExtend(bool Val=true)
Definition: HexagonMCExpr.cpp:90
Fixup
PowerPC TLS Dynamic Call Fixup
Definition: PPCTLSDynamicCall.cpp:235
llvm::HexagonMCExpr::setS27_2_reloc
void setS27_2_reloc(bool Val=true)
Definition: HexagonMCExpr.cpp:97
llvm::HexagonMCExpr::mustNotExtend
bool mustNotExtend() const
Definition: HexagonMCExpr.cpp:94
llvm::MCAsmLayout
Encapsulates the layout of an assembly file at a particular point in time.
Definition: MCAsmLayout.h:28
llvm::HexStyle::Asm
@ Asm
0ffh
Definition: MCInstPrinter.h:34
llvm::MCValue
This represents an "assembler immediate".
Definition: MCValue.h:37
llvm::MCTargetExpr
This is an extension point for target-specific MCExpr subclasses to implement.
Definition: MCExpr.h:644
MCExpr.h
llvm::MCFixup
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Definition: MCFixup.h:71
llvm::HexagonMCExpr::setMustExtend
void setMustExtend(bool Val=true)
Definition: HexagonMCExpr.cpp:84
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35