Chris Lattner | 7b26fce | 2009-08-22 20:48:53 +0000 | [diff] [blame] | 1 | //===-- PPCMCAsmInfo.cpp - PPC asm properties -------------------*- C++ -*-===// |
Jim Laskey | 0e83541 | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | f3ebc3f | 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. |
Jim Laskey | 0e83541 | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Chris Lattner | 0545746 | 2009-08-22 21:03:30 +0000 | [diff] [blame] | 10 | // This file contains the declarations of the MCAsmInfoDarwin properties. |
Jim Laskey | 0e83541 | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Chris Lattner | 7b26fce | 2009-08-22 20:48:53 +0000 | [diff] [blame] | 14 | #include "PPCMCAsmInfo.h" |
Jim Laskey | 0e83541 | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 15 | using namespace llvm; |
| 16 | |
Chris Lattner | 2b4364f | 2010-01-20 06:34:14 +0000 | [diff] [blame] | 17 | PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) { |
Evan Cheng | a83b37a | 2011-07-15 02:09:41 +0000 | [diff] [blame] | 18 | if (is64Bit) |
| 19 | PointerSize = 8; |
| 20 | IsLittleEndian = false; |
| 21 | |
Jim Laskey | c3de9b4 | 2007-02-01 16:31:34 +0000 | [diff] [blame] | 22 | PCSymbol = "."; |
Jim Laskey | 28663c7 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 23 | CommentString = ";"; |
Rafael Espindola | 5164e6e | 2011-05-02 15:58:16 +0000 | [diff] [blame] | 24 | ExceptionsType = ExceptionHandling::DwarfCFI; |
Jim Grosbach | 693e36a | 2009-08-11 00:09:57 +0000 | [diff] [blame] | 25 | |
Daniel Dunbar | 86c065d | 2009-08-13 17:03:38 +0000 | [diff] [blame] | 26 | if (!is64Bit) |
Chris Lattner | e655521 | 2009-08-11 22:49:34 +0000 | [diff] [blame] | 27 | Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode. |
Rafael Espindola | 1c8ac8f | 2010-12-04 03:21:47 +0000 | [diff] [blame] | 28 | |
Chris Lattner | 96db1ab | 2009-08-11 23:03:40 +0000 | [diff] [blame] | 29 | AssemblerDialect = 1; // New-Style mnemonics. |
Dale Johannesen | 237b1c1 | 2010-01-06 02:21:00 +0000 | [diff] [blame] | 30 | SupportsDebugInformation= true; // Debug information. |
Jim Laskey | 28663c7 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 31 | } |
| 32 | |
Chris Lattner | 2b4364f | 2010-01-20 06:34:14 +0000 | [diff] [blame] | 33 | PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) { |
Evan Cheng | de4ae46 | 2011-08-01 19:43:05 +0000 | [diff] [blame^] | 34 | if (is64Bit) |
| 35 | PointerSize = 8; |
| 36 | IsLittleEndian = false; |
| 37 | |
Rafael Espindola | 4536b9a | 2010-02-06 03:32:21 +0000 | [diff] [blame] | 38 | // ".comm align is in bytes but .align is pow-2." |
| 39 | AlignmentIsInBytes = false; |
| 40 | |
Jim Laskey | 28663c7 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 41 | CommentString = "#"; |
| 42 | GlobalPrefix = ""; |
Rafael Espindola | 770b4b8 | 2008-12-19 10:55:56 +0000 | [diff] [blame] | 43 | PrivateGlobalPrefix = ".L"; |
Jim Laskey | 28663c7 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 44 | WeakRefDirective = "\t.weak\t"; |
Bruno Cardoso Lopes | 62e6a8b | 2009-08-13 23:30:21 +0000 | [diff] [blame] | 45 | |
| 46 | // Uses '.section' before '.bss' directive |
| 47 | UsesELFSectionDirectiveForBSS = true; |
Nick Lewycky | 5805c46 | 2007-07-25 03:48:45 +0000 | [diff] [blame] | 48 | |
Nicolas Geoffray | 80c741e | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 49 | // Debug Information |
Nicolas Geoffray | 80c741e | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 50 | SupportsDebugInformation = true; |
Nicolas Geoffray | 80c741e | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 51 | |
Nicolas Geoffray | 80c741e | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 52 | PCSymbol = "."; |
| 53 | |
| 54 | // Set up DWARF directives |
| 55 | HasLEB128 = true; // Target asm supports leb128 directives (little-endian) |
| 56 | |
| 57 | // Exceptions handling |
Daniel Dunbar | 86c065d | 2009-08-13 17:03:38 +0000 | [diff] [blame] | 58 | if (!is64Bit) |
Rafael Espindola | bc8e3f8 | 2011-05-05 21:34:33 +0000 | [diff] [blame] | 59 | ExceptionsType = ExceptionHandling::DwarfCFI; |
Chris Lattner | 7faf1fd | 2009-08-11 22:06:07 +0000 | [diff] [blame] | 60 | |
| 61 | ZeroDirective = "\t.space\t"; |
Daniel Dunbar | 86c065d | 2009-08-13 17:03:38 +0000 | [diff] [blame] | 62 | Data64bitsDirective = is64Bit ? "\t.quad\t" : 0; |
Chris Lattner | b1301f7 | 2010-01-23 07:47:02 +0000 | [diff] [blame] | 63 | HasLCOMMDirective = true; |
Chris Lattner | 96db1ab | 2009-08-11 23:03:40 +0000 | [diff] [blame] | 64 | AssemblerDialect = 0; // Old-Style mnemonics. |
Jim Laskey | 28663c7 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 65 | } |
Anton Korobeynikov | d73396b | 2008-02-27 23:49:15 +0000 | [diff] [blame] | 66 | |