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};
35
36namespace SystemZ {
37using Specifier = uint16_t;
38enum {
39 S_None,
40
41 S_DTPOFF,
42 S_GOT,
43 S_GOTENT,
44 S_INDNTPOFF,
45 S_NTPOFF,
46 S_PLT,
47 S_TLSGD,
48 S_TLSLD,
49 S_TLSLDM,
50
51 // HLASM docs for address constants:
52 // https://www.ibm.com/docs/en/hla-and-tf/1.6?topic=value-address-constants
53 S_RCon, // Address of ADA of symbol.
54 S_VCon, // Address of external function symbol.
55 S_QCon, // Class-based offset.
56};
57} // namespace SystemZ
58
59} // end namespace llvm
60
61#endif
62