[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / lib / Target / ARM / MCTargetDesc / ARMMCAsmInfo.cpp
blob40e8e244e312e7cf2167646dbfcf4acb257c9124
1 //===-- ARMMCAsmInfo.cpp - ARM 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 // This file contains the declarations of the ARMMCAsmInfo properties.
11 //===----------------------------------------------------------------------===//
13 #include "ARMMCAsmInfo.h"
14 #include "llvm/ADT/Triple.h"
16 using namespace llvm;
18 void ARMMCAsmInfoDarwin::anchor() { }
20 ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(const Triple &TheTriple) {
21 if ((TheTriple.getArch() == Triple::armeb) ||
22 (TheTriple.getArch() == Triple::thumbeb))
23 IsLittleEndian = false;
25 Data64bitsDirective = nullptr;
26 CommentString = "@";
27 Code16Directive = ".code\t16";
28 Code32Directive = ".code\t32";
29 UseDataRegionDirectives = true;
31 SupportsDebugInformation = true;
33 // Conditional Thumb 4-byte instructions can have an implicit IT.
34 MaxInstLength = 6;
36 // Exceptions handling
37 ExceptionsType = (TheTriple.isOSDarwin() && !TheTriple.isWatchABI())
38 ? ExceptionHandling::SjLj
39 : ExceptionHandling::DwarfCFI;
42 void ARMELFMCAsmInfo::anchor() { }
44 ARMELFMCAsmInfo::ARMELFMCAsmInfo(const Triple &TheTriple) {
45 if ((TheTriple.getArch() == Triple::armeb) ||
46 (TheTriple.getArch() == Triple::thumbeb))
47 IsLittleEndian = false;
49 // ".comm align is in bytes but .align is pow-2."
50 AlignmentIsInBytes = false;
52 Data64bitsDirective = nullptr;
53 CommentString = "@";
54 Code16Directive = ".code\t16";
55 Code32Directive = ".code\t32";
57 SupportsDebugInformation = true;
59 // Conditional Thumb 4-byte instructions can have an implicit IT.
60 MaxInstLength = 6;
62 // Exceptions handling
63 switch (TheTriple.getOS()) {
64 case Triple::NetBSD:
65 ExceptionsType = ExceptionHandling::DwarfCFI;
66 break;
67 default:
68 ExceptionsType = ExceptionHandling::ARM;
69 break;
72 // foo(plt) instead of foo@plt
73 UseParensForSymbolVariant = true;
76 void ARMELFMCAsmInfo::setUseIntegratedAssembler(bool Value) {
77 UseIntegratedAssembler = Value;
78 if (!UseIntegratedAssembler) {
79 // gas doesn't handle VFP register names in cfi directives,
80 // so don't use register names with external assembler.
81 // See https://sourceware.org/bugzilla/show_bug.cgi?id=16694
82 DwarfRegNumForCFI = true;
86 void ARMCOFFMCAsmInfoMicrosoft::anchor() { }
88 ARMCOFFMCAsmInfoMicrosoft::ARMCOFFMCAsmInfoMicrosoft() {
89 AlignmentIsInBytes = false;
90 SupportsDebugInformation = true;
91 ExceptionsType = ExceptionHandling::WinEH;
92 PrivateGlobalPrefix = "$M";
93 PrivateLabelPrefix = "$M";
94 CommentString = ";";
96 // Conditional Thumb 4-byte instructions can have an implicit IT.
97 MaxInstLength = 6;
100 void ARMCOFFMCAsmInfoGNU::anchor() { }
102 ARMCOFFMCAsmInfoGNU::ARMCOFFMCAsmInfoGNU() {
103 AlignmentIsInBytes = false;
104 HasSingleParameterDotFile = true;
106 CommentString = "@";
107 Code16Directive = ".code\t16";
108 Code32Directive = ".code\t32";
109 PrivateGlobalPrefix = ".L";
110 PrivateLabelPrefix = ".L";
112 SupportsDebugInformation = true;
113 ExceptionsType = ExceptionHandling::DwarfCFI;
114 UseParensForSymbolVariant = true;
116 DwarfRegNumForCFI = false;
118 // Conditional Thumb 4-byte instructions can have an implicit IT.
119 MaxInstLength = 6;