blob: 36cf2a5570ddb2f96785c850be38db0814a90a9b [file] [log] [blame]
Jim Laskey8e8de8f2006-09-07 22:05:02 +00001//===-- PPCTargetAsmInfo.cpp - PPC asm properties ---------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-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 Laskey8e8de8f2006-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"
Jim Laskey8e8de8f2006-09-07 22:05:02 +000015using namespace llvm;
16
Chris Lattner5b67bb12009-08-11 22:51:34 +000017PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(bool is64Bit) {
Jim Laskeyb82313f2007-02-01 16:31:34 +000018 PCSymbol = ".";
Jim Laskeybf111822006-12-21 20:26:09 +000019 CommentString = ";";
Jim Grosbach1b747ad2009-08-11 00:09:57 +000020 ExceptionsType = ExceptionHandling::Dwarf;
21
Chris Lattner5b67bb12009-08-11 22:51:34 +000022 if (!is64Bit)
Chris Lattner74da6712009-08-11 22:49:34 +000023 Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
Chris Lattner6b883e32009-08-11 23:03:40 +000024 AssemblerDialect = 1; // New-Style mnemonics.
Jim Laskeybf111822006-12-21 20:26:09 +000025}
26
Chris Lattner5b67bb12009-08-11 22:51:34 +000027PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(bool is64Bit) {
Jim Laskeybf111822006-12-21 20:26:09 +000028 CommentString = "#";
29 GlobalPrefix = "";
Rafael Espindola2f6fea92008-12-19 10:55:56 +000030 PrivateGlobalPrefix = ".L";
Jim Laskeybf111822006-12-21 20:26:09 +000031 UsedDirective = "\t# .no_dead_strip\t";
32 WeakRefDirective = "\t.weak\t";
Nick Lewyckye2b90522007-07-25 03:48:45 +000033
Nicolas Geoffray616585b2007-12-21 12:19:44 +000034 // Debug Information
35 AbsoluteDebugSectionOffsets = true;
36 SupportsDebugInformation = true;
Nicolas Geoffray616585b2007-12-21 12:19:44 +000037
Nicolas Geoffray616585b2007-12-21 12:19:44 +000038 PCSymbol = ".";
39
40 // Set up DWARF directives
41 HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
42
43 // Exceptions handling
Chris Lattner5b67bb12009-08-11 22:51:34 +000044 if (!is64Bit)
Jim Grosbach1b747ad2009-08-11 00:09:57 +000045 ExceptionsType = ExceptionHandling::Dwarf;
Nicolas Geoffray616585b2007-12-21 12:19:44 +000046 AbsoluteEHSectionOffsets = false;
Chris Lattnerc89ecc52009-08-11 22:06:07 +000047
48 ZeroDirective = "\t.space\t";
49 SetDirective = "\t.set";
Chris Lattner5b67bb12009-08-11 22:51:34 +000050 Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
Chris Lattnerc89ecc52009-08-11 22:06:07 +000051 AlignmentIsInBytes = false;
52 LCOMMDirective = "\t.lcomm\t";
Chris Lattner6b883e32009-08-11 23:03:40 +000053 AssemblerDialect = 0; // Old-Style mnemonics.
Jim Laskeybf111822006-12-21 20:26:09 +000054}
Anton Korobeynikov7b1b7f52008-02-27 23:49:15 +000055