LCOV - code coverage report
Current view: top level - lib/Target/ARM/MCTargetDesc - ARMMCAsmInfo.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 60 65 92.3 %
Date: 2018-10-20 13:21:21 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        1166 : ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(const Triple &TheTriple) {
      22        1166 :   if ((TheTriple.getArch() == Triple::armeb) ||
      23             :       (TheTriple.getArch() == Triple::thumbeb))
      24           0 :     IsLittleEndian = false;
      25             : 
      26        1166 :   Data64bitsDirective = nullptr;
      27        1166 :   CommentString = "@";
      28        1166 :   Code16Directive = ".code\t16";
      29        1166 :   Code32Directive = ".code\t32";
      30        1166 :   UseDataRegionDirectives = true;
      31             : 
      32        1166 :   SupportsDebugInformation = true;
      33             : 
      34             :   // Conditional Thumb 4-byte instructions can have an implicit IT.
      35        1166 :   MaxInstLength = 6;
      36             : 
      37             :   // Exceptions handling
      38        1103 :   ExceptionsType = (TheTriple.isOSDarwin() && !TheTriple.isWatchABI())
      39             :                        ? ExceptionHandling::SjLj
      40             :                        : ExceptionHandling::DwarfCFI;
      41             : 
      42        1166 :   UseIntegratedAssembler = true;
      43        1166 : }
      44             : 
      45           0 : void ARMELFMCAsmInfo::anchor() { }
      46             : 
      47        3797 : ARMELFMCAsmInfo::ARMELFMCAsmInfo(const Triple &TheTriple) {
      48        3797 :   if ((TheTriple.getArch() == Triple::armeb) ||
      49             :       (TheTriple.getArch() == Triple::thumbeb))
      50          69 :     IsLittleEndian = false;
      51             : 
      52             :   // ".comm align is in bytes but .align is pow-2."
      53        3797 :   AlignmentIsInBytes = false;
      54             : 
      55        3797 :   Data64bitsDirective = nullptr;
      56        3797 :   CommentString = "@";
      57        3797 :   Code16Directive = ".code\t16";
      58        3797 :   Code32Directive = ".code\t32";
      59             : 
      60        3797 :   SupportsDebugInformation = true;
      61             : 
      62             :   // Conditional Thumb 4-byte instructions can have an implicit IT.
      63        3797 :   MaxInstLength = 6;
      64             : 
      65             :   // Exceptions handling
      66        3797 :   switch (TheTriple.getOS()) {
      67          16 :   case Triple::NetBSD:
      68          16 :     ExceptionsType = ExceptionHandling::DwarfCFI;
      69          16 :     break;
      70        3781 :   default:
      71        3781 :     ExceptionsType = ExceptionHandling::ARM;
      72        3781 :     break;
      73             :   }
      74             : 
      75             :   // foo(plt) instead of foo@plt
      76        3797 :   UseParensForSymbolVariant = true;
      77             : 
      78        3797 :   UseIntegratedAssembler = true;
      79        3797 : }
      80             : 
      81          15 : void ARMELFMCAsmInfo::setUseIntegratedAssembler(bool Value) {
      82          15 :   UseIntegratedAssembler = Value;
      83          15 :   if (!UseIntegratedAssembler) {
      84             :     // gas doesn't handle VFP register names in cfi directives,
      85             :     // so don't use register names with external assembler.
      86             :     // See https://sourceware.org/bugzilla/show_bug.cgi?id=16694
      87          15 :     DwarfRegNumForCFI = true;
      88             :   }
      89          15 : }
      90             : 
      91           0 : void ARMCOFFMCAsmInfoMicrosoft::anchor() { }
      92             : 
      93          85 : ARMCOFFMCAsmInfoMicrosoft::ARMCOFFMCAsmInfoMicrosoft() {
      94          85 :   AlignmentIsInBytes = false;
      95          85 :   ExceptionsType = ExceptionHandling::WinEH;
      96          85 :   PrivateGlobalPrefix = "$M";
      97          85 :   PrivateLabelPrefix = "$M";
      98          85 :   CommentString = ";";
      99             : 
     100             :   // Conditional Thumb 4-byte instructions can have an implicit IT.
     101          85 :   MaxInstLength = 6;
     102          85 : }
     103             : 
     104           0 : void ARMCOFFMCAsmInfoGNU::anchor() { }
     105             : 
     106          66 : ARMCOFFMCAsmInfoGNU::ARMCOFFMCAsmInfoGNU() {
     107          66 :   AlignmentIsInBytes = false;
     108          66 :   HasSingleParameterDotFile = true;
     109             : 
     110          66 :   CommentString = "@";
     111          66 :   Code16Directive = ".code\t16";
     112          66 :   Code32Directive = ".code\t32";
     113          66 :   PrivateGlobalPrefix = ".L";
     114          66 :   PrivateLabelPrefix = ".L";
     115             : 
     116          66 :   SupportsDebugInformation = true;
     117          66 :   ExceptionsType = ExceptionHandling::DwarfCFI;
     118          66 :   UseParensForSymbolVariant = true;
     119             : 
     120          66 :   UseIntegratedAssembler = true;
     121          66 :   DwarfRegNumForCFI = false;
     122             : 
     123             :   // Conditional Thumb 4-byte instructions can have an implicit IT.
     124          66 :   MaxInstLength = 6;
     125          66 : }

Generated by: LCOV version 1.13