| 1 | //===- VEMCAsmInfo.h - VE asm properties -----------------------*- 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 | // This file contains the declaration of the VEMCAsmInfo class. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #ifndef LLVM_LIB_TARGET_VE_MCTARGETDESC_VEMCASMINFO_H |
| 14 | #define LLVM_LIB_TARGET_VE_MCTARGETDESC_VEMCASMINFO_H |
| 15 | |
| 16 | #include "VEFixupKinds.h" |
| 17 | #include "llvm/MC/MCAsmInfoELF.h" |
| 18 | #include "llvm/MC/MCExpr.h" |
| 19 | |
| 20 | namespace llvm { |
| 21 | |
| 22 | class Triple; |
| 23 | |
| 24 | class VEELFMCAsmInfo : public MCAsmInfoELF { |
| 25 | void anchor() override; |
| 26 | |
| 27 | public: |
| 28 | explicit VEELFMCAsmInfo(const Triple &TheTriple); |
| 29 | void printSpecifierExpr(raw_ostream &OS, |
| 30 | const MCSpecifierExpr &Expr) const override; |
| 31 | bool evaluateAsRelocatableImpl(const MCSpecifierExpr &Expr, MCValue &Res, |
| 32 | const MCAssembler *Asm) const override; |
| 33 | }; |
| 34 | |
| 35 | namespace VE { |
| 36 | enum Specifier { |
| 37 | S_None, |
| 38 | |
| 39 | S_REFLONG = MCSymbolRefExpr::FirstTargetSpecifier, |
| 40 | S_HI32, // @hi |
| 41 | S_LO32, // @lo |
| 42 | S_PC_HI32, // @pc_hi |
| 43 | S_PC_LO32, // @pc_lo |
| 44 | S_GOT_HI32, // @got_hi |
| 45 | S_GOT_LO32, // @got_lo |
| 46 | S_GOTOFF_HI32, // @gotoff_hi |
| 47 | S_GOTOFF_LO32, // @gotoff_lo |
| 48 | S_PLT_HI32, // @plt_hi |
| 49 | S_PLT_LO32, // @plt_lo |
| 50 | S_TLS_GD_HI32, // @tls_gd_hi |
| 51 | S_TLS_GD_LO32, // @tls_gd_lo |
| 52 | S_TPOFF_HI32, // @tpoff_hi |
| 53 | S_TPOFF_LO32, // @tpoff_lo |
| 54 | }; |
| 55 | |
| 56 | VE::Fixups getFixupKind(uint8_t S); |
| 57 | } // namespace VE |
| 58 | } // namespace llvm |
| 59 | |
| 60 | #endif // LLVM_LIB_TARGET_VE_MCTARGETDESC_VEMCASMINFO_H |
| 61 | |