Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / MC / MCAsmInfoCOFF.cpp
blob0b8781c61eb83bc2a3e6928ba7d4af5d25e57143
1 //===- MCAsmInfoCOFF.cpp - COFF 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 defines target asm properties related what form asm statements
10 // should take in general on COFF-based targets
12 //===----------------------------------------------------------------------===//
14 #include "llvm/MC/MCAsmInfoCOFF.h"
15 #include "llvm/MC/MCDirectives.h"
17 using namespace llvm;
19 void MCAsmInfoCOFF::anchor() {}
21 MCAsmInfoCOFF::MCAsmInfoCOFF() {
22 // MingW 4.5 and later support .comm with log2 alignment, but .lcomm uses byte
23 // alignment.
24 COMMDirectiveAlignmentIsInBytes = false;
25 LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
26 HasDotTypeDotSizeDirective = false;
27 HasSingleParameterDotFile = true;
28 WeakRefDirective = "\t.weak\t";
29 AvoidWeakIfComdat = true;
31 // Doesn't support visibility:
32 HiddenVisibilityAttr = HiddenDeclarationVisibilityAttr = MCSA_Invalid;
33 ProtectedVisibilityAttr = MCSA_Invalid;
35 // Set up DWARF directives
36 SupportsDebugInformation = true;
37 NeedsDwarfSectionOffsetDirective = true;
39 // At least MSVC inline-asm does AShr.
40 UseLogicalShr = false;
42 // If this is a COFF target, assume that it supports associative comdats. It's
43 // part of the spec.
44 HasCOFFAssociativeComdats = true;
46 // We can generate constants in comdat sections that can be shared,
47 // but in order not to create null typed symbols, we actually need to
48 // make them global symbols as well.
49 HasCOFFComdatConstants = true;
52 void MCAsmInfoMicrosoft::anchor() {}
54 MCAsmInfoMicrosoft::MCAsmInfoMicrosoft() = default;
56 void MCAsmInfoGNUCOFF::anchor() {}
58 MCAsmInfoGNUCOFF::MCAsmInfoGNUCOFF() {
59 // If this is a GNU environment (mingw or cygwin), don't use associative
60 // comdats for jump tables, unwind information, and other data associated with
61 // a function.
62 HasCOFFAssociativeComdats = false;
64 // We don't create constants in comdat sections for MinGW.
65 HasCOFFComdatConstants = false;