blob: ee6deb5c5090e194bac2dbf77f76da6eccd16a43 [file] [log] [blame]
Chris Lattner621c44d2009-08-22 20:48:53 +00001//===-- PPCMCAsmInfo.cpp - PPC asm properties -------------------*- C++ -*-===//
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002//
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//
Chris Lattnercd4cab92009-08-22 21:03:30 +000010// This file contains the declarations of the MCAsmInfoDarwin properties.
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011//
12//===----------------------------------------------------------------------===//
13
Chris Lattner621c44d2009-08-22 20:48:53 +000014#include "PPCMCAsmInfo.h"
Dan Gohmanf17a25c2007-07-18 16:29:46 +000015using namespace llvm;
16
Chris Lattnercd4cab92009-08-22 21:03:30 +000017PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000018 PCSymbol = ".";
19 CommentString = ";";
Jim Grosbach29feb6a2009-08-11 00:09:57 +000020 ExceptionsType = ExceptionHandling::Dwarf;
21
Daniel Dunbaree3b6c62009-08-13 17:03:38 +000022 if (!is64Bit)
Chris Lattnerc7cea482009-08-11 22:49:34 +000023 Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
Chris Lattnereaa72072009-08-11 23:03:40 +000024 AssemblerDialect = 1; // New-Style mnemonics.
Dale Johannesene2c96a02010-01-06 02:21:00 +000025 SupportsDebugInformation= true; // Debug information.
Dan Gohmanf17a25c2007-07-18 16:29:46 +000026}
27
Chris Lattner621c44d2009-08-22 20:48:53 +000028PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000029 CommentString = "#";
30 GlobalPrefix = "";
Rafael Espindola1a931842008-12-19 10:55:56 +000031 PrivateGlobalPrefix = ".L";
Dan Gohmanf17a25c2007-07-18 16:29:46 +000032 UsedDirective = "\t# .no_dead_strip\t";
33 WeakRefDirective = "\t.weak\t";
Bruno Cardoso Lopes0ff6eff2009-08-13 23:30:21 +000034
35 // Uses '.section' before '.bss' directive
36 UsesELFSectionDirectiveForBSS = true;
Nick Lewycky3246a9c2007-07-25 03:48:45 +000037
Nicolas Geoffray61864762007-12-21 12:19:44 +000038 // Debug Information
39 AbsoluteDebugSectionOffsets = true;
40 SupportsDebugInformation = true;
Nicolas Geoffray61864762007-12-21 12:19:44 +000041
Nicolas Geoffray61864762007-12-21 12:19:44 +000042 PCSymbol = ".";
43
44 // Set up DWARF directives
45 HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
46
47 // Exceptions handling
Daniel Dunbaree3b6c62009-08-13 17:03:38 +000048 if (!is64Bit)
Jim Grosbach29feb6a2009-08-11 00:09:57 +000049 ExceptionsType = ExceptionHandling::Dwarf;
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";
Daniel Dunbaree3b6c62009-08-13 17:03:38 +000054 Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
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