blob: 25920da0fe900fc91be18489dc75569b2992017d [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"
Chris Lattner9fa0f932009-08-13 05:30:22 +000015#include "llvm/ADT/Triple.h"
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016using namespace llvm;
17
Chris Lattner9fa0f932009-08-13 05:30:22 +000018PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const Triple &TheTriple)
19 : DarwinTargetAsmInfo(TheTriple) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020 PCSymbol = ".";
21 CommentString = ";";
Jim Grosbach29feb6a2009-08-11 00:09:57 +000022 ExceptionsType = ExceptionHandling::Dwarf;
23
Chris Lattner9fa0f932009-08-13 05:30:22 +000024 if (TheTriple.getArch() != Triple::ppc64)
Chris Lattnerc7cea482009-08-11 22:49:34 +000025 Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
Chris Lattnereaa72072009-08-11 23:03:40 +000026 AssemblerDialect = 1; // New-Style mnemonics.
Dan Gohmanf17a25c2007-07-18 16:29:46 +000027}
28
Chris Lattner9fa0f932009-08-13 05:30:22 +000029PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const Triple &TheTriple) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000030 CommentString = "#";
31 GlobalPrefix = "";
Rafael Espindola1a931842008-12-19 10:55:56 +000032 PrivateGlobalPrefix = ".L";
Dan Gohmanf17a25c2007-07-18 16:29:46 +000033 UsedDirective = "\t# .no_dead_strip\t";
34 WeakRefDirective = "\t.weak\t";
Nick Lewycky3246a9c2007-07-25 03:48:45 +000035
Nicolas Geoffray61864762007-12-21 12:19:44 +000036 // Debug Information
37 AbsoluteDebugSectionOffsets = true;
38 SupportsDebugInformation = true;
Nicolas Geoffray61864762007-12-21 12:19:44 +000039
Nicolas Geoffray61864762007-12-21 12:19:44 +000040 PCSymbol = ".";
41
42 // Set up DWARF directives
43 HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
44
45 // Exceptions handling
Chris Lattner9fa0f932009-08-13 05:30:22 +000046 if (TheTriple.getArch() != Triple::ppc64) {
Jim Grosbach29feb6a2009-08-11 00:09:57 +000047 ExceptionsType = ExceptionHandling::Dwarf;
Chris Lattner9fa0f932009-08-13 05:30:22 +000048 Data64bitsDirective = 0;
49 }
Nicolas Geoffray61864762007-12-21 12:19:44 +000050 AbsoluteEHSectionOffsets = false;
Chris Lattner7fbb0a12009-08-11 22:06:07 +000051
52 ZeroDirective = "\t.space\t";
53 SetDirective = "\t.set";
Chris Lattner9fa0f932009-08-13 05:30:22 +000054
Chris Lattner7fbb0a12009-08-11 22:06:07 +000055 AlignmentIsInBytes = false;
56 LCOMMDirective = "\t.lcomm\t";
Chris Lattnereaa72072009-08-11 23:03:40 +000057 AssemblerDialect = 0; // Old-Style mnemonics.
Dan Gohmanf17a25c2007-07-18 16:29:46 +000058}
Anton Korobeynikov0aeac602008-02-27 23:49:15 +000059