ARMMCAsmInfo.cpp revision 234353
1234353Sdim//===-- ARMMCAsmInfo.cpp - ARM asm properties -----------------------------===// 2224133Sdim// 3224133Sdim// The LLVM Compiler Infrastructure 4224133Sdim// 5224133Sdim// This file is distributed under the University of Illinois Open Source 6224133Sdim// License. See LICENSE.TXT for details. 7224133Sdim// 8224133Sdim//===----------------------------------------------------------------------===// 9224133Sdim// 10224133Sdim// This file contains the declarations of the ARMMCAsmInfo properties. 11224133Sdim// 12224133Sdim//===----------------------------------------------------------------------===// 13224133Sdim 14224133Sdim#include "ARMMCAsmInfo.h" 15224133Sdim#include "llvm/Support/CommandLine.h" 16224133Sdim 17224133Sdimusing namespace llvm; 18224133Sdim 19224133Sdimcl::opt<bool> 20224133SdimEnableARMEHABI("arm-enable-ehabi", cl::Hidden, 21224133Sdim cl::desc("Generate ARM EHABI tables"), 22224133Sdim cl::init(false)); 23224133Sdim 24224133Sdim 25224133Sdimstatic const char *const arm_asm_table[] = { 26224133Sdim "{r0}", "r0", 27224133Sdim "{r1}", "r1", 28224133Sdim "{r2}", "r2", 29224133Sdim "{r3}", "r3", 30224133Sdim "{r4}", "r4", 31224133Sdim "{r5}", "r5", 32224133Sdim "{r6}", "r6", 33224133Sdim "{r7}", "r7", 34224133Sdim "{r8}", "r8", 35224133Sdim "{r9}", "r9", 36224133Sdim "{r10}", "r10", 37224133Sdim "{r11}", "r11", 38224133Sdim "{r12}", "r12", 39224133Sdim "{r13}", "r13", 40224133Sdim "{r14}", "r14", 41224133Sdim "{lr}", "lr", 42224133Sdim "{sp}", "sp", 43224133Sdim "{ip}", "ip", 44224133Sdim "{fp}", "fp", 45224133Sdim "{sl}", "sl", 46224133Sdim "{memory}", "memory", 47224133Sdim "{cc}", "cc", 48224133Sdim 0,0 49224133Sdim}; 50224133Sdim 51234353Sdimvoid ARMMCAsmInfoDarwin::anchor() { } 52234353Sdim 53224133SdimARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() { 54224133Sdim AsmTransCBE = arm_asm_table; 55224133Sdim Data64bitsDirective = 0; 56224133Sdim CommentString = "@"; 57226633Sdim Code16Directive = ".code\t16"; 58226633Sdim Code32Directive = ".code\t32"; 59226633Sdim 60224133Sdim SupportsDebugInformation = true; 61224133Sdim 62224133Sdim // Exceptions handling 63224133Sdim ExceptionsType = ExceptionHandling::SjLj; 64224133Sdim} 65224133Sdim 66234353Sdimvoid ARMELFMCAsmInfo::anchor() { } 67234353Sdim 68224133SdimARMELFMCAsmInfo::ARMELFMCAsmInfo() { 69224133Sdim // ".comm align is in bytes but .align is pow-2." 70224133Sdim AlignmentIsInBytes = false; 71224133Sdim 72224133Sdim Data64bitsDirective = 0; 73224133Sdim CommentString = "@"; 74226633Sdim PrivateGlobalPrefix = ".L"; 75226633Sdim Code16Directive = ".code\t16"; 76226633Sdim Code32Directive = ".code\t32"; 77224133Sdim 78224133Sdim WeakRefDirective = "\t.weak\t"; 79226633Sdim LCOMMDirectiveType = LCOMM::NoAlignment; 80224133Sdim 81226633Sdim HasLEB128 = true; 82224133Sdim SupportsDebugInformation = true; 83224133Sdim 84224133Sdim // Exceptions handling 85224133Sdim if (EnableARMEHABI) 86224133Sdim ExceptionsType = ExceptionHandling::ARM; 87224133Sdim} 88