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