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 "PPCTargetMachine.h"
16 #include "llvm/Function.h"
17 #include "llvm/Support/Dwarf.h"
20 using namespace llvm::dwarf;
22 PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) :
23 PPCTargetAsmInfo<DarwinTargetAsmInfo>(TM) {
26 UsedDirective = "\t.no_dead_strip\t";
27 SupportsExceptionHandling = true;
29 GlobalEHDirective = "\t.globl\t";
30 SupportsWeakOmittedEHFrame = false;
33 PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
34 PPCTargetAsmInfo<TargetAsmInfo>(TM) {
37 PrivateGlobalPrefix = ".L";
38 UsedDirective = "\t# .no_dead_strip\t";
39 WeakRefDirective = "\t.weak\t";
42 AbsoluteDebugSectionOffsets = true;
43 SupportsDebugInformation = true;
47 // Set up DWARF directives
48 HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
50 // Exceptions handling
51 if (!TM.getSubtargetImpl()->isPPC64())
52 SupportsExceptionHandling = true;
53 AbsoluteEHSectionOffsets = false;
57 // Instantiate default implementation.
58 TEMPLATE_INSTANTIATION(class PPCTargetAsmInfo<TargetAsmInfo>);