blob: e907b7510293f60e3243ce1e7ef1267824d40723 [file] [log] [blame]
Chris Lattner7b26fce2009-08-22 20:48:53 +00001//===-- MCAsmInfoDarwin.cpp - Darwin asm properties -------------*- C++ -*-===//
Anton Korobeynikovc1874382008-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 Lattner7b26fce2009-08-22 20:48:53 +000015#include "llvm/MC/MCAsmInfoDarwin.h"
Rafael Espindolac5dac4d2011-04-28 16:09:09 +000016#include "llvm/MC/MCContext.h"
17#include "llvm/MC/MCExpr.h"
18#include "llvm/MC/MCStreamer.h"
Anton Korobeynikovc1874382008-07-19 13:14:46 +000019using namespace llvm;
20
Jim Grosbachdc1e36e2012-05-11 01:41:30 +000021void MCAsmInfoDarwin::anchor() { }
David Blaikiea379b1812011-12-20 02:50:00 +000022
Chris Lattner2b4364f2010-01-20 06:34:14 +000023MCAsmInfoDarwin::MCAsmInfoDarwin() {
Chris Lattner8284b662009-06-19 00:08:39 +000024 // Common settings for all Darwin targets.
25 // Syntax:
Chris Lattner8284b662009-06-19 00:08:39 +000026 HasSingleParameterDotFile = false;
Chris Lattner76bdea32010-01-23 07:21:06 +000027 HasSubsectionsViaSymbols = true;
Chris Lattner8284b662009-06-19 00:08:39 +000028
Chris Lattner54075a72009-08-11 22:31:42 +000029 AlignmentIsInBytes = false;
Rafael Espindoladcb03f02010-01-26 20:21:43 +000030 COMMDirectiveAlignmentIsInBytes = false;
Benjamin Kramer68b9f052012-09-07 21:08:01 +000031 LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
Chris Lattnerabdcbc72009-08-11 22:39:40 +000032 InlineAsmStart = " InlineAsm Start";
33 InlineAsmEnd = " InlineAsm End";
Chris Lattner54075a72009-08-11 22:31:42 +000034
Chris Lattner8284b662009-06-19 00:08:39 +000035 // Directives:
Rafael Espindola04867ce2013-12-02 23:04:51 +000036 HasWeakDefDirective = true;
David Fang1b018492013-12-10 21:37:41 +000037 HasWeakDefCanBeHiddenDirective = true;
Chris Lattner8284b662009-06-19 00:08:39 +000038 WeakRefDirective = "\t.weak_reference ";
Chris Lattnerd832c8e2009-08-11 22:17:31 +000039 ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
Chris Lattner1d371882010-01-19 02:09:44 +000040 HasMachoZeroFillDirective = true; // Uses .zerofill
Eric Christopher27e7ffc2010-05-20 00:49:07 +000041 HasMachoTBSSDirective = true; // Uses .tbss
Chris Lattnere9d28b12010-01-19 04:34:02 +000042 HasStaticCtorDtorReferenceInStaticMode = true;
Rafael Espindola1048e752010-12-04 00:31:13 +000043
44 // FIXME: Darwin 10 and newer don't need this.
45 LinkerRequiresNonEmptyDwarfLines = true;
Rafael Espindola44bbe362010-12-06 17:27:56 +000046
Rafael Espindolaa6cd2d82010-12-22 21:51:29 +000047 // FIXME: Change this once MC is the system assembler.
48 HasAggressiveSymbolFolding = false;
49
Chris Lattner0bfd2792010-01-23 06:53:23 +000050 HiddenVisibilityAttr = MCSA_PrivateExtern;
Stuart Hastingsbf836592011-02-23 02:27:05 +000051 HiddenDeclarationVisibilityAttr = MCSA_Invalid;
Bill Wendling11b98942011-11-29 02:39:58 +000052
Chris Lattner0bfd2792010-01-23 06:53:23 +000053 // Doesn't support protected visibility.
Bill Wendling11b98942011-11-29 02:39:58 +000054 ProtectedVisibilityAttr = MCSA_Invalid;
Jim Grosbachdc1e36e2012-05-11 01:41:30 +000055
Chris Lattner54075a72009-08-11 22:31:42 +000056 HasDotTypeDotSizeDirective = false;
Chris Lattner1deb09c2010-01-23 05:51:36 +000057 HasNoDeadStrip = true;
Devang Patelea636392010-08-31 23:50:19 +000058
Nick Lewycky33da3362012-06-22 01:25:12 +000059 DwarfUsesRelocationsAcrossSections = false;
Daniel Sanders753e1762014-02-13 14:44:26 +000060
61 UseIntegratedAssembler = true;
Anton Korobeynikovc1874382008-07-19 13:14:46 +000062}