LLVM 22.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
14namespace llvm {
15class HexagonMCExpr : public MCTargetExpr {
16public:
37
38 static HexagonMCExpr *create(MCExpr const *Expr, MCContext &Ctx);
39 void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override;
41 const MCAssembler *Asm) const override;
42 void visitUsedExpr(MCStreamer &Streamer) const override;
43 MCFragment *findAssociatedFragment() const override;
44 MCExpr const *getExpr() const;
45 void setMustExtend(bool Val = true);
46 bool mustExtend() const;
47 void setMustNotExtend(bool Val = true);
48 bool mustNotExtend() const;
49 void setS27_2_reloc(bool Val = true);
50 bool s27_2_reloc() const;
51 void setSignMismatch(bool Val = true);
52 bool signMismatch() const;
53
54private:
55 HexagonMCExpr(MCExpr const *Expr);
56 MCExpr const *Expr;
57 bool MustNotExtend;
58 bool MustExtend;
59 bool S27_2_reloc;
60 bool SignMismatch;
61};
62} // end namespace llvm
63
64#endif // LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
void setMustNotExtend(bool Val=true)
bool mustNotExtend() const
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
bool signMismatch() const
bool mustExtend() const
static HexagonMCExpr * create(MCExpr const *Expr, MCContext &Ctx)
bool s27_2_reloc() const
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm) 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...
Definition MCAsmInfo.h:64
Context object for machine code objects.
Definition MCContext.h:83
Base class for the full range of assembler expressions which are needed for parsing.
Definition MCExpr.h:34
Streaming machine code generation interface.
Definition MCStreamer.h:220
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This is an optimization pass for GlobalISel generic memory operations.