ARMMCAsmInfo.cpp revision 239462
1218885Sdim//===-- ARMMCAsmInfo.cpp - ARM asm properties -----------------------------===//
2218885Sdim//
3218885Sdim//                     The LLVM Compiler Infrastructure
4218885Sdim//
5218885Sdim// This file is distributed under the University of Illinois Open Source
6218885Sdim// License. See LICENSE.TXT for details.
7218885Sdim//
8218885Sdim//===----------------------------------------------------------------------===//
9218885Sdim//
10218885Sdim// This file contains the declarations of the ARMMCAsmInfo properties.
11218885Sdim//
12218885Sdim//===----------------------------------------------------------------------===//
13218885Sdim
14218885Sdim#include "ARMMCAsmInfo.h"
15218885Sdim#include "llvm/Support/CommandLine.h"
16218885Sdim
17218885Sdimusing namespace llvm;
18218885Sdim
19218885Sdimcl::opt<bool>
20218885SdimEnableARMEHABI("arm-enable-ehabi", cl::Hidden,
21218885Sdim  cl::desc("Generate ARM EHABI tables"),
22218885Sdim  cl::init(false));
23218885Sdim
24218885Sdim
25218885Sdimvoid ARMMCAsmInfoDarwin::anchor() { }
26218885Sdim
27218885SdimARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() {
28218885Sdim  Data64bitsDirective = 0;
29218885Sdim  CommentString = "@";
30218885Sdim  Code16Directive = ".code\t16";
31218885Sdim  Code32Directive = ".code\t32";
32218885Sdim  UseDataRegionDirectives = true;
33218885Sdim
34218885Sdim  SupportsDebugInformation = true;
35218885Sdim
36218885Sdim  // Exceptions handling
37218885Sdim  ExceptionsType = ExceptionHandling::SjLj;
38218885Sdim}
39218885Sdim
40218885Sdimvoid ARMELFMCAsmInfo::anchor() { }
41218885Sdim
42218885SdimARMELFMCAsmInfo::ARMELFMCAsmInfo() {
43218885Sdim  // ".comm align is in bytes but .align is pow-2."
44218885Sdim  AlignmentIsInBytes = false;
45218885Sdim
46218885Sdim  Data64bitsDirective = 0;
47218885Sdim  CommentString = "@";
48218885Sdim  PrivateGlobalPrefix = ".L";
49218885Sdim  Code16Directive = ".code\t16";
50218885Sdim  Code32Directive = ".code\t32";
51218885Sdim
52218885Sdim  WeakRefDirective = "\t.weak\t";
53218885Sdim  LCOMMDirectiveType = LCOMM::NoAlignment;
54218885Sdim
55218885Sdim  HasLEB128 = true;
56218885Sdim  SupportsDebugInformation = true;
57218885Sdim
58218885Sdim  // Exceptions handling
59218885Sdim  if (EnableARMEHABI)
60218885Sdim    ExceptionsType = ExceptionHandling::ARM;
61218885Sdim}
62218885Sdim