ARMMCAsmInfo.cpp revision 234353
1//===-- ARMMCAsmInfo.cpp - ARM asm properties -----------------------------===// 2// 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 contains the declarations of the ARMMCAsmInfo properties. 11// 12//===----------------------------------------------------------------------===// 13 14#include "ARMMCAsmInfo.h" 15#include "llvm/Support/CommandLine.h" 16 17using namespace llvm; 18 19cl::opt<bool> 20EnableARMEHABI("arm-enable-ehabi", cl::Hidden, 21 cl::desc("Generate ARM EHABI tables"), 22 cl::init(false)); 23 24 25static const char *const arm_asm_table[] = { 26 "{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}; 50 51void ARMMCAsmInfoDarwin::anchor() { } 52 53ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() { 54 AsmTransCBE = arm_asm_table; 55 Data64bitsDirective = 0; 56 CommentString = "@"; 57 Code16Directive = ".code\t16"; 58 Code32Directive = ".code\t32"; 59 60 SupportsDebugInformation = true; 61 62 // Exceptions handling 63 ExceptionsType = ExceptionHandling::SjLj; 64} 65 66void ARMELFMCAsmInfo::anchor() { } 67 68ARMELFMCAsmInfo::ARMELFMCAsmInfo() { 69 // ".comm align is in bytes but .align is pow-2." 70 AlignmentIsInBytes = false; 71 72 Data64bitsDirective = 0; 73 CommentString = "@"; 74 PrivateGlobalPrefix = ".L"; 75 Code16Directive = ".code\t16"; 76 Code32Directive = ".code\t32"; 77 78 WeakRefDirective = "\t.weak\t"; 79 LCOMMDirectiveType = LCOMM::NoAlignment; 80 81 HasLEB128 = true; 82 SupportsDebugInformation = true; 83 84 // Exceptions handling 85 if (EnableARMEHABI) 86 ExceptionsType = ExceptionHandling::ARM; 87} 88