blob: 52e29865fa511d50793ecb182a6ae262eaacb6d4 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001//===-- PPCTargetAsmInfo.cpp - PPC asm properties ---------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner081ce942007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the declarations of the DarwinTargetAsmInfo properties.
11//
12//===----------------------------------------------------------------------===//
13
14#include "PPCTargetAsmInfo.h"
15#include "PPCTargetMachine.h"
16#include "llvm/Function.h"
Anton Korobeynikov0aeac602008-02-27 23:49:15 +000017#include "llvm/Support/Dwarf.h"
18
Dan Gohmanf17a25c2007-07-18 16:29:46 +000019using namespace llvm;
Anton Korobeynikov0aeac602008-02-27 23:49:15 +000020using namespace llvm::dwarf;
Dan Gohmanf17a25c2007-07-18 16:29:46 +000021
Chris Lattnerca072172009-06-19 00:08:39 +000022PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) :
Anton Korobeynikov3829e8a2008-09-25 21:00:33 +000023 PPCTargetAsmInfo<DarwinTargetAsmInfo>(TM) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000024 PCSymbol = ".";
25 CommentString = ";";
Dan Gohmanf17a25c2007-07-18 16:29:46 +000026 UsedDirective = "\t.no_dead_strip\t";
Jim Grosbach29feb6a2009-08-11 00:09:57 +000027 ExceptionsType = ExceptionHandling::Dwarf;
28
Dale Johannesenf09b5992008-01-10 02:03:30 +000029 GlobalEHDirective = "\t.globl\t";
30 SupportsWeakOmittedEHFrame = false;
Dan Gohmanf17a25c2007-07-18 16:29:46 +000031}
32
Anton Korobeynikov894be4b2008-08-08 18:23:49 +000033PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
Chris Lattner7dd4ffc2009-08-02 04:27:24 +000034 PPCTargetAsmInfo<TargetAsmInfo>(TM) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000035 CommentString = "#";
36 GlobalPrefix = "";
Rafael Espindola1a931842008-12-19 10:55:56 +000037 PrivateGlobalPrefix = ".L";
Dan Gohmanf17a25c2007-07-18 16:29:46 +000038 UsedDirective = "\t# .no_dead_strip\t";
39 WeakRefDirective = "\t.weak\t";
Nick Lewycky3246a9c2007-07-25 03:48:45 +000040
Nicolas Geoffray61864762007-12-21 12:19:44 +000041 // Debug Information
42 AbsoluteDebugSectionOffsets = true;
43 SupportsDebugInformation = true;
Nicolas Geoffray61864762007-12-21 12:19:44 +000044
Nicolas Geoffray61864762007-12-21 12:19:44 +000045 PCSymbol = ".";
46
47 // Set up DWARF directives
48 HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
49
50 // Exceptions handling
51 if (!TM.getSubtargetImpl()->isPPC64())
Jim Grosbach29feb6a2009-08-11 00:09:57 +000052 ExceptionsType = ExceptionHandling::Dwarf;
Nicolas Geoffray61864762007-12-21 12:19:44 +000053 AbsoluteEHSectionOffsets = false;
Dan Gohmanf17a25c2007-07-18 16:29:46 +000054}
Anton Korobeynikov0aeac602008-02-27 23:49:15 +000055
Anton Korobeynikov45d1b622008-10-05 08:53:29 +000056
57// Instantiate default implementation.
58TEMPLATE_INSTANTIATION(class PPCTargetAsmInfo<TargetAsmInfo>);