LLVM 20.0.0git
ARMMCAsmInfo.cpp
Go to the documentation of this file.
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.
10//
11//===----------------------------------------------------------------------===//
12
13#include "ARMMCAsmInfo.h"
15
16using namespace llvm;
17
18void ARMMCAsmInfoDarwin::anchor() { }
19
21 if ((TheTriple.getArch() == Triple::armeb) ||
22 (TheTriple.getArch() == Triple::thumbeb))
23 IsLittleEndian = false;
24
25 Data64bitsDirective = nullptr;
26 CommentString = "@";
27 Code16Directive = ".code\t16";
28 Code32Directive = ".code\t32";
30
32
33 // Conditional Thumb 4-byte instructions can have an implicit IT.
34 MaxInstLength = 6;
35
36 // Exceptions handling
37 ExceptionsType = (TheTriple.isOSDarwin() && !TheTriple.isWatchABI())
40}
41
42void ARMELFMCAsmInfo::anchor() { }
43
45 if ((TheTriple.getArch() == Triple::armeb) ||
46 (TheTriple.getArch() == Triple::thumbeb))
47 IsLittleEndian = false;
48
49 // ".comm align is in bytes but .align is pow-2."
50 AlignmentIsInBytes = false;
51
52 Data64bitsDirective = nullptr;
53 CommentString = "@";
54 Code16Directive = ".code\t16";
55 Code32Directive = ".code\t32";
56
58
59 // Conditional Thumb 4-byte instructions can have an implicit IT.
60 MaxInstLength = 6;
61
62 // Exceptions handling
63 switch (TheTriple.getOS()) {
64 case Triple::NetBSD:
66 break;
67 default:
69 break;
70 }
71
72 // foo(plt) instead of foo@plt
74}
75
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;
83 }
84}
85
86void ARMCOFFMCAsmInfoMicrosoft::anchor() { }
87
89 AlignmentIsInBytes = false;
94 PrivateLabelPrefix = "$M";
95 CommentString = "@";
96
97 // Conditional Thumb 4-byte instructions can have an implicit IT.
98 MaxInstLength = 6;
99}
100
101void ARMCOFFMCAsmInfoGNU::anchor() { }
102
104 AlignmentIsInBytes = false;
106
107 CommentString = "@";
108 Code16Directive = ".code\t16";
109 Code32Directive = ".code\t32";
110 PrivateGlobalPrefix = ".L";
111 PrivateLabelPrefix = ".L";
112
117
118 DwarfRegNumForCFI = false;
119
120 // Conditional Thumb 4-byte instructions can have an implicit IT.
121 MaxInstLength = 6;
122}
ARMELFMCAsmInfo(const Triple &TT)
void setUseIntegratedAssembler(bool Value) override
Set whether assembly (inline or otherwise) should be parsed.
ARMMCAsmInfoDarwin(const Triple &TheTriple)
const char * Code32Directive
Definition: MCAsmInfo.h:181
const char * Data64bitsDirective
Definition: MCAsmInfo.h:283
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:426
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
Definition: MCAsmInfo.h:160
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:488
const char * Code16Directive
These are assembly directives that tells the assembler to interpret the following instructions differ...
Definition: MCAsmInfo.h:180
WinEH::EncodingType WinEHEncodingType
Windows exception handling data (.pdata) encoding. Defaults to Invalid.
Definition: MCAsmInfo.h:433
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:164
unsigned MaxInstLength
This is the maximum possible length of an instruction, which is needed to compute the size of an inli...
Definition: MCAsmInfo.h:103
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:423
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:371
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:324
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives.
Definition: MCAsmInfo.h:226
bool DwarfRegNumForCFI
True if dwarf register numbers are printed instead of symbolic register names in ....
Definition: MCAsmInfo.h:457
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:79
bool UseParensForSymbolVariant
True if target uses parens to indicate the symbol variant instead of .
Definition: MCAsmInfo.h:461
StringRef CommentString
This indicates the comment string used by the assembler.
Definition: MCAsmInfo.h:127
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
bool isWatchABI() const
Definition: Triple.h:555
OSType getOS() const
Get the parsed operating system type of this triple.
Definition: Triple.h:392
ArchType getArch() const
Get the parsed architecture type of this triple.
Definition: Triple.h:383
bool isOSDarwin() const
Is this a "Darwin" OS (macOS, iOS, tvOS, watchOS, XROS, or DriverKit).
Definition: Triple.h:568
LLVM Value Representation.
Definition: Value.h:74
@ Itanium
Windows CE ARM, PowerPC, SH3, SH4.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ SjLj
setjmp/longjmp based exceptions
@ DwarfCFI
DWARF-like instruction based exceptions.
@ WinEH
Windows Exception Handling.