LLVM  4.0.0
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  CommentString = ";";
29 
30  if (!is64Bit)
31  Data64bitsDirective = nullptr; // We can't emit a 64-bit unit in PPC32 mode.
32 
33  AssemblerDialect = 1; // New-Style mnemonics.
34  SupportsDebugInformation= true; // Debug information.
35 
36  // The installed assembler for OSX < 10.6 lacks some directives.
37  // FIXME: this should really be a check on the assembler characteristics
38  // rather than OS version
39  if (T.isMacOSX() && T.isMacOSXVersionLT(10, 6))
41 
43 }
44 
45 void PPCELFMCAsmInfo::anchor() { }
46 
48  // FIXME: This is not always needed. For example, it is not needed in the
49  // v2 abi.
50  NeedsLocalForSize = true;
51 
52  if (is64Bit) {
54  }
56 
57  // ".comm align is in bytes but .align is pow-2."
58  AlignmentIsInBytes = false;
59 
60  CommentString = "#";
61 
62  // Uses '.section' before '.bss' directive
64 
65  // Debug Information
67 
68  DollarIsPC = true;
69 
70  // Set up DWARF directives
71  MinInstAlignment = 4;
72 
73  // Exceptions handling
75 
76  ZeroDirective = "\t.space\t";
77  Data64bitsDirective = is64Bit ? "\t.quad\t" : nullptr;
78  AssemblerDialect = 1; // New-Style mnemonics.
80 
82 }
83 
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:262
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:358
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:412
PPCELFMCAsmInfo(bool is64Bit, const Triple &)
const char * Data64bitsDirective
Definition: MCAsmInfo.h:184
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:166
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:71
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:68
unsigned AssemblerDialect
Which dialect of an assembler variant to use. Defaults to 0.
Definition: MCAsmInfo.h:145
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:301
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:222
bool isMacOSX() const
isMacOSX - Is this a Mac OS X triple.
Definition: Triple.h:427
StringRef CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:106
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition: MCAsmInfo.h:212
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:270
bool DollarIsPC
The '$' token, when not referencing an identifier or constant, refers to the current PC...
Definition: MCAsmInfo.h:98
unsigned PointerSize
Pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:64
static bool is64Bit(const char *name)
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:323
PPCMCAsmInfoDarwin(bool is64Bit, const Triple &)
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
bool NeedsLocalForSize
Definition: MCAsmInfo.h:115
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition: MCAsmInfo.h:94
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:326
No exception support.