Chris Lattner | af76e59 | 2009-08-22 20:48:53 +0000 | [diff] [blame] | 1 | //===-- PPCMCAsmInfo.cpp - PPC asm properties -------------------*- C++ -*-===// |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 4ee451d | 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 | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Chris Lattner | 2807afa | 2009-08-22 21:03:30 +0000 | [diff] [blame] | 10 | // This file contains the declarations of the MCAsmInfoDarwin properties. |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Chris Lattner | af76e59 | 2009-08-22 20:48:53 +0000 | [diff] [blame] | 14 | #include "PPCMCAsmInfo.h" |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 15 | using namespace llvm; |
| 16 | |
Chris Lattner | 8eeba35 | 2010-01-20 06:34:14 +0000 | [diff] [blame] | 17 | PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) { |
Jim Laskey | b82313f | 2007-02-01 16:31:34 +0000 | [diff] [blame] | 18 | PCSymbol = "."; |
Jim Laskey | bf11182 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 19 | CommentString = ";"; |
Anton Korobeynikov | 3965b5e | 2011-01-14 21:58:08 +0000 | [diff] [blame^] | 20 | ExceptionsType = ExceptionHandling::DwarfTable; |
Jim Grosbach | 1b747ad | 2009-08-11 00:09:57 +0000 | [diff] [blame] | 21 | |
Daniel Dunbar | b42dad4 | 2009-08-13 17:03:38 +0000 | [diff] [blame] | 22 | if (!is64Bit) |
Chris Lattner | 74da671 | 2009-08-11 22:49:34 +0000 | [diff] [blame] | 23 | Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode. |
Rafael Espindola | 5d4918d | 2010-12-04 03:21:47 +0000 | [diff] [blame] | 24 | |
Chris Lattner | 6b883e3 | 2009-08-11 23:03:40 +0000 | [diff] [blame] | 25 | AssemblerDialect = 1; // New-Style mnemonics. |
Dale Johannesen | b7339d0 | 2010-01-06 02:21:00 +0000 | [diff] [blame] | 26 | SupportsDebugInformation= true; // Debug information. |
Jim Laskey | bf11182 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 27 | } |
| 28 | |
Chris Lattner | 8eeba35 | 2010-01-20 06:34:14 +0000 | [diff] [blame] | 29 | PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) { |
Rafael Espindola | 2f82ca9 | 2010-02-06 03:32:21 +0000 | [diff] [blame] | 30 | // ".comm align is in bytes but .align is pow-2." |
| 31 | AlignmentIsInBytes = false; |
| 32 | |
Jim Laskey | bf11182 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 33 | CommentString = "#"; |
| 34 | GlobalPrefix = ""; |
Rafael Espindola | 2f6fea9 | 2008-12-19 10:55:56 +0000 | [diff] [blame] | 35 | PrivateGlobalPrefix = ".L"; |
Jim Laskey | bf11182 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 36 | WeakRefDirective = "\t.weak\t"; |
Bruno Cardoso Lopes | fdf229e | 2009-08-13 23:30:21 +0000 | [diff] [blame] | 37 | |
| 38 | // Uses '.section' before '.bss' directive |
| 39 | UsesELFSectionDirectiveForBSS = true; |
Nick Lewycky | e2b9052 | 2007-07-25 03:48:45 +0000 | [diff] [blame] | 40 | |
Nicolas Geoffray | 616585b | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 41 | // Debug Information |
Nicolas Geoffray | 616585b | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 42 | SupportsDebugInformation = true; |
Nicolas Geoffray | 616585b | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 43 | |
Nicolas Geoffray | 616585b | 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 | b42dad4 | 2009-08-13 17:03:38 +0000 | [diff] [blame] | 50 | if (!is64Bit) |
Anton Korobeynikov | 3965b5e | 2011-01-14 21:58:08 +0000 | [diff] [blame^] | 51 | ExceptionsType = ExceptionHandling::DwarfTable; |
Chris Lattner | c89ecc5 | 2009-08-11 22:06:07 +0000 | [diff] [blame] | 52 | |
| 53 | ZeroDirective = "\t.space\t"; |
Daniel Dunbar | b42dad4 | 2009-08-13 17:03:38 +0000 | [diff] [blame] | 54 | Data64bitsDirective = is64Bit ? "\t.quad\t" : 0; |
Chris Lattner | 9eb158d | 2010-01-23 07:47:02 +0000 | [diff] [blame] | 55 | HasLCOMMDirective = true; |
Chris Lattner | 6b883e3 | 2009-08-11 23:03:40 +0000 | [diff] [blame] | 56 | AssemblerDialect = 0; // Old-Style mnemonics. |
Jim Laskey | bf11182 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 57 | } |
Anton Korobeynikov | 7b1b7f5 | 2008-02-27 23:49:15 +0000 | [diff] [blame] | 58 | |