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 setS23_2_reloc(bool Val = true); 33 bool s23_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 S23_2_reloc; 43 bool SignMismatch; 44 }; 45 } // end namespace llvm 46 47 #endif // LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H 48