1//====-- SystemZMCAsmInfo.h - SystemZ 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#ifndef LLVM_LIB_TARGET_SYSTEMZ_MCTARGETDESC_SYSTEMZMCASMINFO_H
10#define LLVM_LIB_TARGET_SYSTEMZ_MCTARGETDESC_SYSTEMZMCASMINFO_H
11
12#include "llvm/MC/MCAsmInfoELF.h"
13#include "llvm/MC/MCAsmInfoGOFF.h"
14#include "llvm/Support/Compiler.h"
15
16namespace llvm {
17class Triple;
18enum SystemZAsmDialect { AD_GNU = 0, AD_HLASM = 1 };
19
20class SystemZMCAsmInfoELF : public MCAsmInfoELF {
21public:
22 explicit SystemZMCAsmInfoELF(const Triple &TT,
23 const MCTargetOptions &Options);
24};
25
26class SystemZMCAsmInfoGOFF : public MCAsmInfoGOFF {
27public:
28 explicit SystemZMCAsmInfoGOFF(const Triple &TT,
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 const MCExpr *getDwarfSectionOffsetExpr(const MCSymbol *Sym, uint64_t Offset,
35 MCContext &Ctx) const override;
36};
37
38namespace SystemZ {
39using Specifier = uint16_t;
40enum {
41 S_None,
42
43 S_DTPOFF,
44 S_GOT,
45 S_GOTENT,
46 S_INDNTPOFF,
47 S_NTPOFF,
48 S_PLT,
49 S_TLSGD,
50 S_TLSLD,
51 S_TLSLDM,
52
53 // HLASM docs for address constants:
54 // https://www.ibm.com/docs/en/hla-and-tf/1.6?topic=value-address-constants
55 S_RCon, // Address of ADA of symbol.
56 S_VCon, // Address of external function symbol.
57 S_QCon, // Class-based offset.
58};
59} // namespace SystemZ
60
61} // end namespace llvm
62
63#endif
64