LLVM  10.0.0
PPCMCAsmInfo.cpp
Go to the documentation of this file.
1 //===-- PPCMCAsmInfo.cpp - PPC 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 MCAsmInfoDarwin properties.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "PPCMCAsmInfo.h"
14 #include "llvm/ADT/Triple.h"
15 
16 using namespace llvm;
17 
18 void PPCELFMCAsmInfo::anchor() { }
19 
21  // FIXME: This is not always needed. For example, it is not needed in the
22  // v2 abi.
23  NeedsLocalForSize = true;
24 
25  if (is64Bit) {
27  }
29 
30  // ".comm align is in bytes but .align is pow-2."
31  AlignmentIsInBytes = false;
32 
33  CommentString = "#";
34 
35  // Uses '.section' before '.bss' directive
37 
38  // Debug Information
40 
41  DollarIsPC = true;
42 
43  // Set up DWARF directives
44  MinInstAlignment = 4;
45 
46  // Exceptions handling
48 
49  ZeroDirective = "\t.space\t";
50  Data64bitsDirective = is64Bit ? "\t.quad\t" : nullptr;
51  AssemblerDialect = 1; // New-Style mnemonics.
53 
55 }
56 
57 void PPCXCOFFMCAsmInfo::anchor() {}
58 
60  assert(!IsLittleEndian && "Little-endian XCOFF not supported.");
61  CodePointerSize = CalleeSaveStackSlotSize = Is64Bit ? 8 : 4;
62  ZeroDirective = "\t.space\t";
63  SymbolsHaveSMC = true;
64 }
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:275
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:383
This class represents lattice values for constants.
Definition: AllocatorList.h:23
bool SymbolsHaveSMC
Definition: MCAsmInfo.h:338
PPCELFMCAsmInfo(bool is64Bit, const Triple &)
const char * Data64bitsDirective
Definition: MCAsmInfo.h:197
const char * ZeroDirective
This should be set to the directive used to get some number of zero bytes emitted to the current sect...
Definition: MCAsmInfo.h:178
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:70
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:67
unsigned AssemblerDialect
Which dialect of an assembler variant to use. Defaults to 0.
Definition: MCAsmInfo.h:153
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:235
StringRef CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:114
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition: MCAsmInfo.h:225
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:297
bool DollarIsPC
The '$' token, when not referencing an identifier or constant, refers to the current PC...
Definition: MCAsmInfo.h:106
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:344
PPCXCOFFMCAsmInfo(bool is64Bit, const Triple &)
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
bool NeedsLocalForSize
Definition: MCAsmInfo.h:123
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition: MCAsmInfo.h:102
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:63
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:347
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
DWARF-like instruction based exceptions.
static bool is64Bit(const char *name)