1 //===-- PPCTargetAsmInfo.cpp - PPC asm properties ---------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the declarations of the DarwinTargetAsmInfo properties.
12 //===----------------------------------------------------------------------===//
14 #include "PPCTargetAsmInfo.h"
15 #include "llvm/ADT/Triple.h"
18 PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const Triple &TheTriple)
19 : DarwinTargetAsmInfo(TheTriple) {
22 ExceptionsType = ExceptionHandling::Dwarf;
24 if (TheTriple.getArch() != Triple::ppc64)
25 Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
26 AssemblerDialect = 1; // New-Style mnemonics.
29 PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const Triple &TheTriple) {
32 PrivateGlobalPrefix = ".L";
33 UsedDirective = "\t# .no_dead_strip\t";
34 WeakRefDirective = "\t.weak\t";
37 AbsoluteDebugSectionOffsets = true;
38 SupportsDebugInformation = true;
42 // Set up DWARF directives
43 HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
45 // Exceptions handling
46 if (TheTriple.getArch() != Triple::ppc64) {
47 ExceptionsType = ExceptionHandling::Dwarf;
48 Data64bitsDirective = 0;
50 AbsoluteEHSectionOffsets = false;
52 ZeroDirective = "\t.space\t";
53 SetDirective = "\t.set";
55 AlignmentIsInBytes = false;
56 LCOMMDirective = "\t.lcomm\t";
57 AssemblerDialect = 0; // Old-Style mnemonics.