[InstCombine] Signed saturation patterns
[llvm-core.git] / lib / Target / ARM / MCTargetDesc / ARMMCAsmInfo.cpp
blobd30d15df3d001925c710891784c1dfc7d98cedc2
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;
41 UseIntegratedAssembler = true;
44 void ARMELFMCAsmInfo::anchor() { }
46 ARMELFMCAsmInfo::ARMELFMCAsmInfo(const Triple &TheTriple) {
47 if ((TheTriple.getArch() == Triple::armeb) ||
48 (TheTriple.getArch() == Triple::thumbeb))
49 IsLittleEndian = false;
51 // ".comm align is in bytes but .align is pow-2."
52 AlignmentIsInBytes = false;
54 Data64bitsDirective = nullptr;
55 CommentString = "@";
56 Code16Directive = ".code\t16";
57 Code32Directive = ".code\t32";
59 SupportsDebugInformation = true;
61 // Conditional Thumb 4-byte instructions can have an implicit IT.
62 MaxInstLength = 6;
64 // Exceptions handling
65 switch (TheTriple.getOS()) {
66 case Triple::NetBSD:
67 ExceptionsType = ExceptionHandling::DwarfCFI;
68 break;
69 default:
70 ExceptionsType = ExceptionHandling::ARM;
71 break;
74 // foo(plt) instead of foo@plt
75 UseParensForSymbolVariant = true;
77 UseIntegratedAssembler = true;
80 void ARMELFMCAsmInfo::setUseIntegratedAssembler(bool Value) {
81 UseIntegratedAssembler = Value;
82 if (!UseIntegratedAssembler) {
83 // gas doesn't handle VFP register names in cfi directives,
84 // so don't use register names with external assembler.
85 // See https://sourceware.org/bugzilla/show_bug.cgi?id=16694
86 DwarfRegNumForCFI = true;
90 void ARMCOFFMCAsmInfoMicrosoft::anchor() { }
92 ARMCOFFMCAsmInfoMicrosoft::ARMCOFFMCAsmInfoMicrosoft() {
93 AlignmentIsInBytes = false;
94 ExceptionsType = ExceptionHandling::WinEH;
95 PrivateGlobalPrefix = "$M";
96 PrivateLabelPrefix = "$M";
97 CommentString = ";";
99 // Conditional Thumb 4-byte instructions can have an implicit IT.
100 MaxInstLength = 6;
103 void ARMCOFFMCAsmInfoGNU::anchor() { }
105 ARMCOFFMCAsmInfoGNU::ARMCOFFMCAsmInfoGNU() {
106 AlignmentIsInBytes = false;
107 HasSingleParameterDotFile = true;
109 CommentString = "@";
110 Code16Directive = ".code\t16";
111 Code32Directive = ".code\t32";
112 PrivateGlobalPrefix = ".L";
113 PrivateLabelPrefix = ".L";
115 SupportsDebugInformation = true;
116 ExceptionsType = ExceptionHandling::DwarfCFI;
117 UseParensForSymbolVariant = true;
119 UseIntegratedAssembler = true;
120 DwarfRegNumForCFI = false;
122 // Conditional Thumb 4-byte instructions can have an implicit IT.
123 MaxInstLength = 6;