blob: d99120d4d7888f7ffab4f3503f2bf80c2fb4c3e1 [file] [log] [blame]
Chris Lattner621c44d2009-08-22 20:48:53 +00001//===-- MCAsmInfoDarwin.cpp - Darwin asm properties -------------*- C++ -*-===//
aslf80e6082008-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 Lattner621c44d2009-08-22 20:48:53 +000015#include "llvm/MC/MCAsmInfoDarwin.h"
aslf80e6082008-07-19 13:14:46 +000016using namespace llvm;
17
Chris Lattnercd4cab92009-08-22 21:03:30 +000018MCAsmInfoDarwin::MCAsmInfoDarwin() {
Chris Lattnerca072172009-06-19 00:08:39 +000019 // Common settings for all Darwin targets.
20 // Syntax:
21 GlobalPrefix = "_";
22 PrivateGlobalPrefix = "L";
Chris Lattner8886dc22009-09-16 01:46:41 +000023 LinkerPrivateGlobalPrefix = "l";
Chris Lattnerca072172009-06-19 00:08:39 +000024 NeedsSet = true;
Chris Lattnerca072172009-06-19 00:08:39 +000025 AllowQuotesInName = true;
26 HasSingleParameterDotFile = false;
27
Chris Lattnerca22f872009-08-11 22:31:42 +000028 AlignmentIsInBytes = false;
Chris Lattnercae14fd2009-08-11 22:39:40 +000029 InlineAsmStart = " InlineAsm Start";
30 InlineAsmEnd = " InlineAsm End";
Chris Lattnerca22f872009-08-11 22:31:42 +000031
Chris Lattnerca072172009-06-19 00:08:39 +000032 // Directives:
33 WeakDefDirective = "\t.weak_definition ";
34 WeakRefDirective = "\t.weak_reference ";
35 HiddenDirective = "\t.private_extern ";
Chris Lattner7fbb0a12009-08-11 22:06:07 +000036 LCOMMDirective = "\t.lcomm\t";
Chris Lattner9364e722009-08-11 22:17:31 +000037 ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
38 ZeroFillDirective = "\t.zerofill\t"; // Uses .zerofill
Chris Lattner75dabac2009-08-11 22:22:44 +000039 SetDirective = "\t.set";
40 ProtectedDirective = "\t.globl\t";
Chris Lattnerca22f872009-08-11 22:31:42 +000041 HasDotTypeDotSizeDirective = false;
42 UsedDirective = "\t.no_dead_strip\t";
Chris Lattner7fbb0a12009-08-11 22:06:07 +000043
Daniel Dunbaree3b6c62009-08-13 17:03:38 +000044 // _foo.eh symbols are currently always exported so that the linker knows
45 // about them. This is not necessary on 10.6 and later, but it
46 // doesn't hurt anything.
47 // FIXME: I need to get this from Triple.
48 Is_EHSymbolPrivate = false;
Chris Lattnerca22f872009-08-11 22:31:42 +000049 GlobalEHDirective = "\t.globl\t";
50 SupportsWeakOmittedEHFrame = false;
aslf80e6082008-07-19 13:14:46 +000051}
52