10b57cec5SDimitry Andric //==- HexagonMCExpr.h - Hexagon specific MC expression classes --*- C++ -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H 100b57cec5SDimitry Andric #define LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H 110b57cec5SDimitry Andric 120b57cec5SDimitry Andric #include "llvm/MC/MCExpr.h" 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric namespace llvm { 150b57cec5SDimitry Andric class HexagonMCExpr : public MCTargetExpr { 160b57cec5SDimitry Andric public: 170b57cec5SDimitry Andric static HexagonMCExpr *create(MCExpr const *Expr, MCContext &Ctx); 180b57cec5SDimitry Andric void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override; 19*0fca6ea1SDimitry Andric bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm, 200b57cec5SDimitry Andric const MCFixup *Fixup) const override; 210b57cec5SDimitry Andric void visitUsedExpr(MCStreamer &Streamer) const override; 220b57cec5SDimitry Andric MCFragment *findAssociatedFragment() const override; 230b57cec5SDimitry Andric void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override; 240b57cec5SDimitry Andric MCExpr const *getExpr() const; 250b57cec5SDimitry Andric void setMustExtend(bool Val = true); 260b57cec5SDimitry Andric bool mustExtend() const; 270b57cec5SDimitry Andric void setMustNotExtend(bool Val = true); 280b57cec5SDimitry Andric bool mustNotExtend() const; 290b57cec5SDimitry Andric void setS27_2_reloc(bool Val = true); 300b57cec5SDimitry Andric bool s27_2_reloc() const; 310b57cec5SDimitry Andric void setSignMismatch(bool Val = true); 320b57cec5SDimitry Andric bool signMismatch() const; 330b57cec5SDimitry Andric 340b57cec5SDimitry Andric private: 350b57cec5SDimitry Andric HexagonMCExpr(MCExpr const *Expr); 360b57cec5SDimitry Andric MCExpr const *Expr; 370b57cec5SDimitry Andric bool MustNotExtend; 380b57cec5SDimitry Andric bool MustExtend; 390b57cec5SDimitry Andric bool S27_2_reloc; 400b57cec5SDimitry Andric bool SignMismatch; 410b57cec5SDimitry Andric }; 420b57cec5SDimitry Andric } // end namespace llvm 430b57cec5SDimitry Andric 440b57cec5SDimitry Andric #endif // LLVM_LIB_TARGET_HEXAGON_HEXAGONMCEXPR_H 45