blob: 9ce9a452d103081ba90b3ca6277699dcb613e229 [file] [log] [blame]
Chris Lattneraf76e592009-08-22 20:48:53 +00001//===-- ARMMCAsmInfo.cpp - ARM asm properties -------------------*- C++ -*-===//
Jim Laskey8e8de8f2006-09-07 22:05:02 +00002//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Jim Laskey8e8de8f2006-09-07 22:05:02 +00007//
8//===----------------------------------------------------------------------===//
9//
Chris Lattneraf76e592009-08-22 20:48:53 +000010// This file contains the declarations of the ARMMCAsmInfo properties.
Jim Laskey8e8de8f2006-09-07 22:05:02 +000011//
12//===----------------------------------------------------------------------===//
13
Chris Lattneraf76e592009-08-22 20:48:53 +000014#include "ARMMCAsmInfo.h"
Anton Korobeynikovb5e16af2011-03-05 18:43:15 +000015#include "llvm/Support/CommandLine.h"
16
Jim Laskey8e8de8f2006-09-07 22:05:02 +000017using namespace llvm;
18
Anton Korobeynikovb5e16af2011-03-05 18:43:15 +000019static cl::opt<bool>
20EnableARMEHABI("arm-enable-ehabi", cl::Hidden,
21 cl::desc("Generate ARM EHABI tables"),
22 cl::init(false));
23
24
Chris Lattner5f28ffe2009-08-11 22:14:59 +000025static const char *const arm_asm_table[] = {
Chris Lattnera93ca922009-06-18 23:41:35 +000026 "{r0}", "r0",
27 "{r1}", "r1",
28 "{r2}", "r2",
29 "{r3}", "r3",
30 "{r4}", "r4",
31 "{r5}", "r5",
32 "{r6}", "r6",
33 "{r7}", "r7",
34 "{r8}", "r8",
35 "{r9}", "r9",
36 "{r10}", "r10",
37 "{r11}", "r11",
38 "{r12}", "r12",
39 "{r13}", "r13",
40 "{r14}", "r14",
41 "{lr}", "lr",
42 "{sp}", "sp",
43 "{ip}", "ip",
44 "{fp}", "fp",
45 "{sl}", "sl",
46 "{memory}", "memory",
47 "{cc}", "cc",
48 0,0
49};
Lauro Ramos Venancio61718a62007-06-08 21:06:23 +000050
Chris Lattner8eeba352010-01-20 06:34:14 +000051ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() {
Chris Lattner5f28ffe2009-08-11 22:14:59 +000052 AsmTransCBE = arm_asm_table;
Chris Lattner5f28ffe2009-08-11 22:14:59 +000053 Data64bitsDirective = 0;
54 CommentString = "@";
Devang Patel14a55d92009-06-19 21:54:26 +000055 SupportsDebugInformation = true;
Jim Grosbach1b747ad2009-08-11 00:09:57 +000056
57 // Exceptions handling
58 ExceptionsType = ExceptionHandling::SjLj;
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000059}
60
Chris Lattner8eeba352010-01-20 06:34:14 +000061ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
Rafael Espindola2e2563b2010-01-26 20:21:43 +000062 // ".comm align is in bytes but .align is pow-2."
63 AlignmentIsInBytes = false;
64
Chris Lattner5f28ffe2009-08-11 22:14:59 +000065 Data64bitsDirective = 0;
66 CommentString = "@";
Rafael Espindolaf166ed72010-01-25 02:27:39 +000067
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000068 HasLEB128 = true;
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000069 PrivateGlobalPrefix = ".L";
70 WeakRefDirective = "\t.weak\t";
Chris Lattner9eb158d2010-01-23 07:47:02 +000071 HasLCOMMDirective = true;
Chris Lattnerc89ecc52009-08-11 22:06:07 +000072
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000073 DwarfRequiresFrameSection = false;
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000074
Devang Patel14a55d92009-06-19 21:54:26 +000075 SupportsDebugInformation = true;
Anton Korobeynikovb5e16af2011-03-05 18:43:15 +000076
77 // Exceptions handling
78 if (EnableARMEHABI)
79 ExceptionsType = ExceptionHandling::ARM;
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000080}