LLVM  8.0.0svn
PPCMCAsmInfo.cpp
Go to the documentation of this file.
1 //===-- PPCMCAsmInfo.cpp - PPC asm properties -----------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the declarations of the MCAsmInfoDarwin properties.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "PPCMCAsmInfo.h"
15 #include "llvm/ADT/Triple.h"
16 
17 using namespace llvm;
18 
19 void PPCMCAsmInfoDarwin::anchor() { }
20 
22  if (is64Bit) {
24  }
25  IsLittleEndian = false;
26 
27  SeparatorString = "@";
28  CommentString = ";";
30 
31  if (!is64Bit)
32  Data64bitsDirective = nullptr; // We can't emit a 64-bit unit in PPC32 mode.
33 
34  AssemblerDialect = 1; // New-Style mnemonics.
35  SupportsDebugInformation= true; // Debug information.
36 
37  // The installed assembler for OSX < 10.6 lacks some directives.
38  // FIXME: this should really be a check on the assembler characteristics
39  // rather than OS version
40  if (T.isMacOSX() && T.isMacOSXVersionLT(10, 6))
42 
44 }
45 
46 void PPCELFMCAsmInfo::anchor() { }
47 
49  // FIXME: This is not always needed. For example, it is not needed in the
50  // v2 abi.
51  NeedsLocalForSize = true;
52 
53  if (is64Bit) {
55  }
57 
58  // ".comm align is in bytes but .align is pow-2."
59  AlignmentIsInBytes = false;
60 
61  CommentString = "#";
62 
63  // Uses '.section' before '.bss' directive
65 
66  // Debug Information
68 
69  DollarIsPC = true;
70 
71  // Set up DWARF directives
72  MinInstAlignment = 4;
73 
74  // Exceptions handling
76 
77  ZeroDirective = "\t.space\t";
78  Data64bitsDirective = is64Bit ? "\t.quad\t" : nullptr;
79  AssemblerDialect = 1; // New-Style mnemonics.
81 
83 }
84 
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:271
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:371
This class represents lattice values for constants.
Definition: AllocatorList.h:24
bool isMacOSX() const
isMacOSX - Is this a Mac OS X triple.
Definition: Triple.h:447
PPCELFMCAsmInfo(bool is64Bit, const Triple &)
const char * Data64bitsDirective
Definition: MCAsmInfo.h:193
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:174
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 HasWeakDefCanBeHiddenDirective
True if we have a directive to declare a global as being a weak defined symbol that can be hidden (un...
Definition: MCAsmInfo.h:310
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:231
const char * SeparatorString
This string, if specified, is used to separate instructions from each other when on the same line...
Definition: MCAsmInfo.h:110
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 &#39;.section&#39; directive before the &#39;.bss&#39; one.
Definition: MCAsmInfo.h:221
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:290
bool DollarIsPC
The &#39;$&#39; token, when not referencing an identifier or constant, refers to the current PC...
Definition: MCAsmInfo.h:106
static bool is64Bit(const char *name)
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:332
PPCMCAsmInfoDarwin(bool is64Bit, const Triple &)
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
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:335
bool isMacOSXVersionLT(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
isMacOSXVersionLT - Comparison function for checking OS X version compatibility, which handles suppor...
Definition: Triple.h:432
No exception support.