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 bool isAcceptableChar(char C) const override;
31 void printSpecifierExpr(raw_ostream &OS,
32 const MCSpecifierExpr &Expr) const override;
33 bool evaluateAsRelocatableImpl(const MCSpecifierExpr &Expr, MCValue &Res,
34 const MCAssembler *Asm) const override;
35};
36
37namespace SystemZ {
38using Specifier = uint16_t;
39enum {
40 S_None,
41
42 S_DTPOFF,
43 S_GOT,
44 S_GOTENT,
45 S_INDNTPOFF,
46 S_NTPOFF,
47 S_PLT,
48 S_TLSGD,
49 S_TLSLD,
50 S_TLSLDM,
51
52 // HLASM docs for address constants:
53 // https://www.ibm.com/docs/en/hla-and-tf/1.6?topic=value-address-constants
54 S_RCon, // Address of ADA of symbol.
55 S_VCon, // Address of external function symbol.
56 S_QCon, // Class-based offset.
57};
58} // namespace SystemZ
59
60} // end namespace llvm
61
62#endif
63