LCOV - code coverage report
Current view: top level - lib/Target/ARM/MCTargetDesc - ARMMCAsmInfo.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 57 62 91.9 %
Date: 2017-09-14 15:23:50 Functions: 5 9 55.6 %
Legend: Lines: hit not hit

          Line data    Source code
       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/ADT/Triple.h"
      16             : 
      17             : using namespace llvm;
      18             : 
      19           0 : void ARMMCAsmInfoDarwin::anchor() { }
      20             : 
      21        1132 : ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(const Triple &TheTriple) {
      22        2264 :   if ((TheTriple.getArch() == Triple::armeb) ||
      23        1132 :       (TheTriple.getArch() == Triple::thumbeb))
      24           0 :     IsLittleEndian = false;
      25             : 
      26        1132 :   Data64bitsDirective = nullptr;
      27        1132 :   CommentString = "@";
      28        1132 :   Code16Directive = ".code\t16";
      29        1132 :   Code32Directive = ".code\t32";
      30        1132 :   UseDataRegionDirectives = true;
      31             : 
      32        1132 :   SupportsDebugInformation = true;
      33             : 
      34             :   // Exceptions handling
      35        1079 :   ExceptionsType = (TheTriple.isOSDarwin() && !TheTriple.isWatchABI())
      36             :                        ? ExceptionHandling::SjLj
      37             :                        : ExceptionHandling::DwarfCFI;
      38             : 
      39        1132 :   UseIntegratedAssembler = true;
      40        1132 : }
      41             : 
      42           0 : void ARMELFMCAsmInfo::anchor() { }
      43             : 
      44        3109 : ARMELFMCAsmInfo::ARMELFMCAsmInfo(const Triple &TheTriple) {
      45        6178 :   if ((TheTriple.getArch() == Triple::armeb) ||
      46        3069 :       (TheTriple.getArch() == Triple::thumbeb))
      47          60 :     IsLittleEndian = false;
      48             : 
      49             :   // ".comm align is in bytes but .align is pow-2."
      50        3109 :   AlignmentIsInBytes = false;
      51             : 
      52        3109 :   Data64bitsDirective = nullptr;
      53        3109 :   CommentString = "@";
      54        3109 :   Code16Directive = ".code\t16";
      55        3109 :   Code32Directive = ".code\t32";
      56             : 
      57        3109 :   SupportsDebugInformation = true;
      58             : 
      59             :   // Exceptions handling
      60        3109 :   switch (TheTriple.getOS()) {
      61          16 :   case Triple::NetBSD:
      62          16 :     ExceptionsType = ExceptionHandling::DwarfCFI;
      63          16 :     break;
      64        3093 :   default:
      65        3093 :     ExceptionsType = ExceptionHandling::ARM;
      66        3093 :     break;
      67             :   }
      68             : 
      69             :   // foo(plt) instead of foo@plt
      70        3109 :   UseParensForSymbolVariant = true;
      71             : 
      72        3109 :   UseIntegratedAssembler = true;
      73        3109 : }
      74             : 
      75          20 : void ARMELFMCAsmInfo::setUseIntegratedAssembler(bool Value) {
      76          20 :   UseIntegratedAssembler = Value;
      77          20 :   if (!UseIntegratedAssembler) {
      78             :     // gas doesn't handle VFP register names in cfi directives,
      79             :     // so don't use register names with external assembler.
      80             :     // See https://sourceware.org/bugzilla/show_bug.cgi?id=16694
      81          20 :     DwarfRegNumForCFI = true;
      82             :   }
      83          20 : }
      84             : 
      85           0 : void ARMCOFFMCAsmInfoMicrosoft::anchor() { }
      86             : 
      87          72 : ARMCOFFMCAsmInfoMicrosoft::ARMCOFFMCAsmInfoMicrosoft() {
      88          72 :   AlignmentIsInBytes = false;
      89             : 
      90          72 :   PrivateGlobalPrefix = "$M";
      91          72 :   PrivateLabelPrefix = "$M";
      92          72 :   CommentString = ";";
      93          72 : }
      94             : 
      95           0 : void ARMCOFFMCAsmInfoGNU::anchor() { }
      96             : 
      97          55 : ARMCOFFMCAsmInfoGNU::ARMCOFFMCAsmInfoGNU() {
      98          55 :   AlignmentIsInBytes = false;
      99          55 :   HasSingleParameterDotFile = true;
     100             : 
     101          55 :   CommentString = "@";
     102          55 :   Code16Directive = ".code\t16";
     103          55 :   Code32Directive = ".code\t32";
     104          55 :   PrivateGlobalPrefix = ".L";
     105          55 :   PrivateLabelPrefix = ".L";
     106             : 
     107          55 :   SupportsDebugInformation = true;
     108          55 :   ExceptionsType = ExceptionHandling::None;
     109          55 :   UseParensForSymbolVariant = true;
     110             : 
     111          55 :   UseIntegratedAssembler = false;
     112          55 :   DwarfRegNumForCFI = true;
     113          55 : }
     114             : 

Generated by: LCOV version 1.13