Chris Lattner | 621c44d | 2009-08-22 20:48:53 +0000 | [diff] [blame] | 1 | //===-- PPCMCAsmInfo.cpp - PPC asm properties -------------------*- C++ -*-===// |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 081ce94 | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Chris Lattner | cd4cab9 | 2009-08-22 21:03:30 +0000 | [diff] [blame] | 10 | // This file contains the declarations of the MCAsmInfoDarwin properties. |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Chris Lattner | 621c44d | 2009-08-22 20:48:53 +0000 | [diff] [blame] | 14 | #include "PPCMCAsmInfo.h" |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 15 | using namespace llvm; |
| 16 | |
Chris Lattner | cd4cab9 | 2009-08-22 21:03:30 +0000 | [diff] [blame] | 17 | PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 18 | PCSymbol = "."; |
| 19 | CommentString = ";"; |
Jim Grosbach | 29feb6a | 2009-08-11 00:09:57 +0000 | [diff] [blame] | 20 | ExceptionsType = ExceptionHandling::Dwarf; |
| 21 | |
Daniel Dunbar | ee3b6c6 | 2009-08-13 17:03:38 +0000 | [diff] [blame] | 22 | if (!is64Bit) |
Chris Lattner | c7cea48 | 2009-08-11 22:49:34 +0000 | [diff] [blame] | 23 | Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode. |
Chris Lattner | eaa7207 | 2009-08-11 23:03:40 +0000 | [diff] [blame] | 24 | AssemblerDialect = 1; // New-Style mnemonics. |
Chris Lattner | 8c70990 | 2009-09-16 00:14:19 +0000 | [diff] [blame^] | 25 | |
| 26 | PersonalityPrefix = "L"; |
| 27 | PersonalitySuffix = "$non_lazy_ptr"; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 28 | } |
| 29 | |
Chris Lattner | 621c44d | 2009-08-22 20:48:53 +0000 | [diff] [blame] | 30 | PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 31 | CommentString = "#"; |
| 32 | GlobalPrefix = ""; |
Rafael Espindola | 1a93184 | 2008-12-19 10:55:56 +0000 | [diff] [blame] | 33 | PrivateGlobalPrefix = ".L"; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 34 | UsedDirective = "\t# .no_dead_strip\t"; |
| 35 | WeakRefDirective = "\t.weak\t"; |
Bruno Cardoso Lopes | 0ff6eff | 2009-08-13 23:30:21 +0000 | [diff] [blame] | 36 | |
| 37 | // Uses '.section' before '.bss' directive |
| 38 | UsesELFSectionDirectiveForBSS = true; |
Nick Lewycky | 3246a9c | 2007-07-25 03:48:45 +0000 | [diff] [blame] | 39 | |
Nicolas Geoffray | 6186476 | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 40 | // Debug Information |
| 41 | AbsoluteDebugSectionOffsets = true; |
| 42 | SupportsDebugInformation = true; |
Nicolas Geoffray | 6186476 | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 43 | |
Nicolas Geoffray | 6186476 | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 44 | PCSymbol = "."; |
| 45 | |
| 46 | // Set up DWARF directives |
| 47 | HasLEB128 = true; // Target asm supports leb128 directives (little-endian) |
| 48 | |
| 49 | // Exceptions handling |
Daniel Dunbar | ee3b6c6 | 2009-08-13 17:03:38 +0000 | [diff] [blame] | 50 | if (!is64Bit) |
Jim Grosbach | 29feb6a | 2009-08-11 00:09:57 +0000 | [diff] [blame] | 51 | ExceptionsType = ExceptionHandling::Dwarf; |
Nicolas Geoffray | 6186476 | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 52 | AbsoluteEHSectionOffsets = false; |
Chris Lattner | 7fbb0a1 | 2009-08-11 22:06:07 +0000 | [diff] [blame] | 53 | |
| 54 | ZeroDirective = "\t.space\t"; |
| 55 | SetDirective = "\t.set"; |
Daniel Dunbar | ee3b6c6 | 2009-08-13 17:03:38 +0000 | [diff] [blame] | 56 | Data64bitsDirective = is64Bit ? "\t.quad\t" : 0; |
Chris Lattner | 7fbb0a1 | 2009-08-11 22:06:07 +0000 | [diff] [blame] | 57 | AlignmentIsInBytes = false; |
| 58 | LCOMMDirective = "\t.lcomm\t"; |
Chris Lattner | eaa7207 | 2009-08-11 23:03:40 +0000 | [diff] [blame] | 59 | AssemblerDialect = 0; // Old-Style mnemonics. |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 60 | } |
Anton Korobeynikov | 0aeac60 | 2008-02-27 23:49:15 +0000 | [diff] [blame] | 61 | |