xref: /freebsd-src/contrib/llvm-project/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp (revision cb14a3fe5122c879eae1fb480ed7ce82a699ddb6)
10b57cec5SDimitry Andric //===-- SystemZMCAsmInfo.cpp - SystemZ asm properties ---------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #include "SystemZMCAsmInfo.h"
100b57cec5SDimitry Andric #include "llvm/MC/MCContext.h"
110b57cec5SDimitry Andric #include "llvm/MC/MCSectionELF.h"
120b57cec5SDimitry Andric 
130b57cec5SDimitry Andric using namespace llvm;
140b57cec5SDimitry Andric 
SystemZMCAsmInfoELF(const Triple & TT)15349cc55cSDimitry Andric SystemZMCAsmInfoELF::SystemZMCAsmInfoELF(const Triple &TT) {
16349cc55cSDimitry Andric   AssemblerDialect = AD_ATT;
170b57cec5SDimitry Andric   CalleeSaveStackSlotSize = 8;
18349cc55cSDimitry Andric   CodePointerSize = 8;
190b57cec5SDimitry Andric   Data64bitsDirective = "\t.quad\t";
200b57cec5SDimitry Andric   ExceptionsType = ExceptionHandling::DwarfCFI;
21349cc55cSDimitry Andric   IsLittleEndian = false;
22349cc55cSDimitry Andric   MaxInstLength = 6;
23349cc55cSDimitry Andric   SupportsDebugInformation = true;
24349cc55cSDimitry Andric   UsesELFSectionDirectiveForBSS = true;
25349cc55cSDimitry Andric   ZeroDirective = "\t.space\t";
260b57cec5SDimitry Andric }
27fe6060f1SDimitry Andric 
SystemZMCAsmInfoGOFF(const Triple & TT)28349cc55cSDimitry Andric SystemZMCAsmInfoGOFF::SystemZMCAsmInfoGOFF(const Triple &TT) {
29349cc55cSDimitry Andric   AllowAdditionalComments = false;
30349cc55cSDimitry Andric   AllowAtInName = true;
31349cc55cSDimitry Andric   AllowAtAtStartOfIdentifier = true;
32349cc55cSDimitry Andric   AllowDollarAtStartOfIdentifier = true;
33349cc55cSDimitry Andric   AllowHashAtStartOfIdentifier = true;
34349cc55cSDimitry Andric   AssemblerDialect = AD_HLASM;
35349cc55cSDimitry Andric   CalleeSaveStackSlotSize = 8;
36349cc55cSDimitry Andric   CodePointerSize = 8;
37349cc55cSDimitry Andric   CommentString = "*";
38349cc55cSDimitry Andric   DotIsPC = false;
39349cc55cSDimitry Andric   EmitGNUAsmStartIndentationMarker = false;
40349cc55cSDimitry Andric   EmitLabelsInUpperCase = true;
41*cb14a3feSDimitry Andric   ExceptionsType = ExceptionHandling::ZOS;
42349cc55cSDimitry Andric   IsLittleEndian = false;
43349cc55cSDimitry Andric   MaxInstLength = 6;
44349cc55cSDimitry Andric   RestrictCommentStringToStartOfStatement = true;
45349cc55cSDimitry Andric   StarIsPC = true;
46349cc55cSDimitry Andric   SupportsDebugInformation = true;
47349cc55cSDimitry Andric }
48fe6060f1SDimitry Andric 
isAcceptableChar(char C) const49349cc55cSDimitry Andric bool SystemZMCAsmInfoGOFF::isAcceptableChar(char C) const {
50fe6060f1SDimitry Andric   return MCAsmInfo::isAcceptableChar(C) || C == '#';
51fe6060f1SDimitry Andric }
52