blob: 25920da0fe900fc91be18489dc75569b2992017d [file] [log] [blame]
Jim Laskey0e835412006-09-07 22:05:02 +00001//===-- PPCTargetAsmInfo.cpp - PPC asm properties ---------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattnerf3ebc3f2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Jim Laskey0e835412006-09-07 22:05:02 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the declarations of the DarwinTargetAsmInfo properties.
11//
12//===----------------------------------------------------------------------===//
13
14#include "PPCTargetAsmInfo.h"
Chris Lattnereb681982009-08-13 05:30:22 +000015#include "llvm/ADT/Triple.h"
Jim Laskey0e835412006-09-07 22:05:02 +000016using namespace llvm;
17
Chris Lattnereb681982009-08-13 05:30:22 +000018PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const Triple &TheTriple)
19 : DarwinTargetAsmInfo(TheTriple) {
Jim Laskeyc3de9b42007-02-01 16:31:34 +000020 PCSymbol = ".";
Jim Laskey28663c72006-12-21 20:26:09 +000021 CommentString = ";";
Jim Grosbach693e36a2009-08-11 00:09:57 +000022 ExceptionsType = ExceptionHandling::Dwarf;
23
Chris Lattnereb681982009-08-13 05:30:22 +000024 if (TheTriple.getArch() != Triple::ppc64)
Chris Lattnere6555212009-08-11 22:49:34 +000025 Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
Chris Lattner96db1ab2009-08-11 23:03:40 +000026 AssemblerDialect = 1; // New-Style mnemonics.
Jim Laskey28663c72006-12-21 20:26:09 +000027}
28
Chris Lattnereb681982009-08-13 05:30:22 +000029PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const Triple &TheTriple) {
Jim Laskey28663c72006-12-21 20:26:09 +000030 CommentString = "#";
31 GlobalPrefix = "";
Rafael Espindola770b4b82008-12-19 10:55:56 +000032 PrivateGlobalPrefix = ".L";
Jim Laskey28663c72006-12-21 20:26:09 +000033 UsedDirective = "\t# .no_dead_strip\t";
34 WeakRefDirective = "\t.weak\t";
Nick Lewycky5805c462007-07-25 03:48:45 +000035
Nicolas Geoffray80c741e2007-12-21 12:19:44 +000036 // Debug Information
37 AbsoluteDebugSectionOffsets = true;
38 SupportsDebugInformation = true;
Nicolas Geoffray80c741e2007-12-21 12:19:44 +000039
Nicolas Geoffray80c741e2007-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 Lattnereb681982009-08-13 05:30:22 +000046 if (TheTriple.getArch() != Triple::ppc64) {
Jim Grosbach693e36a2009-08-11 00:09:57 +000047 ExceptionsType = ExceptionHandling::Dwarf;
Chris Lattnereb681982009-08-13 05:30:22 +000048 Data64bitsDirective = 0;
49 }
Nicolas Geoffray80c741e2007-12-21 12:19:44 +000050 AbsoluteEHSectionOffsets = false;
Chris Lattner7faf1fd2009-08-11 22:06:07 +000051
52 ZeroDirective = "\t.space\t";
53 SetDirective = "\t.set";
Chris Lattnereb681982009-08-13 05:30:22 +000054
Chris Lattner7faf1fd2009-08-11 22:06:07 +000055 AlignmentIsInBytes = false;
56 LCOMMDirective = "\t.lcomm\t";
Chris Lattner96db1ab2009-08-11 23:03:40 +000057 AssemblerDialect = 0; // Old-Style mnemonics.
Jim Laskey28663c72006-12-21 20:26:09 +000058}
Anton Korobeynikovd73396b2008-02-27 23:49:15 +000059