xref: /freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp (revision 725a9f47324d42037db93c27ceb40d4956872f3e)
1 //===-- SystemZMCAsmInfo.cpp - SystemZ asm properties ---------------------===//
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 #include "SystemZMCAsmInfo.h"
10 #include "llvm/MC/MCContext.h"
11 #include "llvm/MC/MCSectionELF.h"
12 
13 using namespace llvm;
14 
15 SystemZMCAsmInfoELF::SystemZMCAsmInfoELF(const Triple &TT) {
16   AssemblerDialect = AD_ATT;
17   CalleeSaveStackSlotSize = 8;
18   CodePointerSize = 8;
19   Data64bitsDirective = "\t.quad\t";
20   ExceptionsType = ExceptionHandling::DwarfCFI;
21   IsLittleEndian = false;
22   MaxInstLength = 6;
23   SupportsDebugInformation = true;
24   UsesELFSectionDirectiveForBSS = true;
25   ZeroDirective = "\t.space\t";
26 }
27 
28 SystemZMCAsmInfoGOFF::SystemZMCAsmInfoGOFF(const Triple &TT) {
29   AllowAdditionalComments = false;
30   AllowAtInName = true;
31   AllowAtAtStartOfIdentifier = true;
32   AllowDollarAtStartOfIdentifier = true;
33   AllowHashAtStartOfIdentifier = true;
34   AssemblerDialect = AD_HLASM;
35   CalleeSaveStackSlotSize = 8;
36   CodePointerSize = 8;
37   CommentString = "*";
38   DotIsPC = false;
39   EmitGNUAsmStartIndentationMarker = false;
40   EmitLabelsInUpperCase = true;
41   ExceptionsType = ExceptionHandling::ZOS;
42   IsLittleEndian = false;
43   MaxInstLength = 6;
44   RestrictCommentStringToStartOfStatement = true;
45   StarIsPC = true;
46   SupportsDebugInformation = true;
47 }
48 
49 bool SystemZMCAsmInfoGOFF::isAcceptableChar(char C) const {
50   return MCAsmInfo::isAcceptableChar(C) || C == '#';
51 }
52