1 //==- HexagonMCExpr.h - Hexagon specific MC expression classes --*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
10 #define LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H
12 #include "llvm/MC/MCExpr.h"
16 class HexagonMCExpr
: public MCTargetExpr
{
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;
37 HexagonMCExpr(MCExpr
const *Expr
);
44 } // end namespace llvm
46 #endif // LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H