blob: 8e8c6f838e34beaa406b1ecc56093902473081f8 [file] [log] [blame]
Chris Lattneraf76e592009-08-22 20:48:53 +00001//===-- MCAsmInfoDarwin.cpp - Darwin asm properties -------------*- C++ -*-===//
Anton Korobeynikov745e8642008-07-19 13:14:46 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines target asm properties related what form asm statements
11// should take in general on Darwin-based targets
12//
13//===----------------------------------------------------------------------===//
14
Chris Lattneraf76e592009-08-22 20:48:53 +000015#include "llvm/MC/MCAsmInfoDarwin.h"
Anton Korobeynikov745e8642008-07-19 13:14:46 +000016using namespace llvm;
17
Chris Lattneraf76e592009-08-22 20:48:53 +000018DarwinMCAsmInfo::DarwinMCAsmInfo() {
Chris Lattner4e0f25b2009-06-19 00:08:39 +000019 // Common settings for all Darwin targets.
20 // Syntax:
21 GlobalPrefix = "_";
22 PrivateGlobalPrefix = "L";
Chris Lattner90f8b702009-07-21 17:30:51 +000023 LinkerPrivateGlobalPrefix = "l"; // Marker for some ObjC metadata
Chris Lattner4e0f25b2009-06-19 00:08:39 +000024 NeedsSet = true;
25 NeedsIndirectEncoding = true;
26 AllowQuotesInName = true;
27 HasSingleParameterDotFile = false;
28
Chris Lattnere28a2e82009-08-11 22:31:42 +000029 AlignmentIsInBytes = false;
Chris Lattnere2b06012009-08-11 22:39:40 +000030 InlineAsmStart = " InlineAsm Start";
31 InlineAsmEnd = " InlineAsm End";
Chris Lattnere28a2e82009-08-11 22:31:42 +000032
Chris Lattner4e0f25b2009-06-19 00:08:39 +000033 // In non-PIC modes, emit a special label before jump tables so that the
34 // linker can perform more accurate dead code stripping. We do not check the
35 // relocation model here since it can be overridden later.
36 JumpTableSpecialLabelPrefix = "l";
37
38 // Directives:
39 WeakDefDirective = "\t.weak_definition ";
40 WeakRefDirective = "\t.weak_reference ";
41 HiddenDirective = "\t.private_extern ";
Chris Lattnerc89ecc52009-08-11 22:06:07 +000042 LCOMMDirective = "\t.lcomm\t";
Chris Lattnerb6ba9c32009-08-11 22:17:31 +000043 ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
44 ZeroFillDirective = "\t.zerofill\t"; // Uses .zerofill
Chris Lattnere2811a72009-08-11 22:22:44 +000045 SetDirective = "\t.set";
46 ProtectedDirective = "\t.globl\t";
Chris Lattnere28a2e82009-08-11 22:31:42 +000047 HasDotTypeDotSizeDirective = false;
48 UsedDirective = "\t.no_dead_strip\t";
Chris Lattnerc89ecc52009-08-11 22:06:07 +000049
Daniel Dunbarb42dad42009-08-13 17:03:38 +000050 // _foo.eh symbols are currently always exported so that the linker knows
51 // about them. This is not necessary on 10.6 and later, but it
52 // doesn't hurt anything.
53 // FIXME: I need to get this from Triple.
54 Is_EHSymbolPrivate = false;
Chris Lattnere28a2e82009-08-11 22:31:42 +000055 GlobalEHDirective = "\t.globl\t";
56 SupportsWeakOmittedEHFrame = false;
Daniel Dunbarb42dad42009-08-13 17:03:38 +000057
Anton Korobeynikov745e8642008-07-19 13:14:46 +000058}
59