LCOV - code coverage report
Current view: top level - build-llvm/lib/Target/AVR - AVRGenCallingConv.inc (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 29 29 100.0 %
Date: 2018-10-20 13:21:21 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
       2             : |*                                                                            *|
       3             : |* Calling Convention Implementation Fragment                                 *|
       4             : |*                                                                            *|
       5             : |* Automatically generated file, do not edit!                                 *|
       6             : |*                                                                            *|
       7             : \*===----------------------------------------------------------------------===*/
       8             : 
       9             : static bool ArgCC_AVR_BUILTIN_DIV(unsigned ValNo, MVT ValVT,
      10             :                                   MVT LocVT, CCValAssign::LocInfo LocInfo,
      11             :                                   ISD::ArgFlagsTy ArgFlags, CCState &State);
      12             : static bool ArgCC_AVR_Vararg(unsigned ValNo, MVT ValVT,
      13             :                              MVT LocVT, CCValAssign::LocInfo LocInfo,
      14             :                              ISD::ArgFlagsTy ArgFlags, CCState &State);
      15             : static bool RetCC_AVR(unsigned ValNo, MVT ValVT,
      16             :                       MVT LocVT, CCValAssign::LocInfo LocInfo,
      17             :                       ISD::ArgFlagsTy ArgFlags, CCState &State);
      18             : static bool RetCC_AVR_BUILTIN(unsigned ValNo, MVT ValVT,
      19             :                               MVT LocVT, CCValAssign::LocInfo LocInfo,
      20             :                               ISD::ArgFlagsTy ArgFlags, CCState &State);
      21             : 
      22             : 
      23          16 : static bool ArgCC_AVR_BUILTIN_DIV(unsigned ValNo, MVT ValVT,
      24             :                                   MVT LocVT, CCValAssign::LocInfo LocInfo,
      25             :                                   ISD::ArgFlagsTy ArgFlags, CCState &State) {
      26             : 
      27          16 :   if (LocVT == MVT::i8) {
      28             :     static const MCPhysReg RegList1[] = {
      29             :       AVR::R24, AVR::R22
      30             :     };
      31           8 :     if (unsigned Reg = State.AllocateReg(RegList1)) {
      32           8 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
      33           8 :       return false;
      34             :     }
      35             :   }
      36             : 
      37           8 :   if (LocVT == MVT::i16) {
      38             :     static const MCPhysReg RegList2[] = {
      39             :       AVR::R25R24, AVR::R23R22
      40             :     };
      41           8 :     if (unsigned Reg = State.AllocateReg(RegList2)) {
      42           8 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
      43           8 :       return false;
      44             :     }
      45             :   }
      46             : 
      47             :   return true;  // CC didn't match.
      48             : }
      49             : 
      50             : 
      51           5 : static bool ArgCC_AVR_Vararg(unsigned ValNo, MVT ValVT,
      52             :                              MVT LocVT, CCValAssign::LocInfo LocInfo,
      53             :                              ISD::ArgFlagsTy ArgFlags, CCState &State) {
      54             : 
      55           5 :   unsigned Offset1 = State.AllocateStack(2, 1);
      56           5 :   State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset1, LocVT, LocInfo));
      57             :   return false;
      58             : 
      59             :   return true;  // CC didn't match.
      60             : }
      61             : 
      62             : 
      63        1116 : static bool RetCC_AVR(unsigned ValNo, MVT ValVT,
      64             :                       MVT LocVT, CCValAssign::LocInfo LocInfo,
      65             :                       ISD::ArgFlagsTy ArgFlags, CCState &State) {
      66             : 
      67        1116 :   if (LocVT == MVT::i8) {
      68             :     if (unsigned Reg = State.AllocateReg(AVR::R24)) {
      69         158 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
      70         158 :       return false;
      71             :     }
      72             :   }
      73             : 
      74         958 :   if (LocVT == MVT::i16) {
      75             :     static const MCPhysReg RegList1[] = {
      76             :       AVR::R25R24, AVR::R23R22, AVR::R21R20, AVR::R19R18
      77             :     };
      78         956 :     if (unsigned Reg = State.AllocateReg(RegList1)) {
      79         945 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
      80         945 :       return false;
      81             :     }
      82             :   }
      83             : 
      84             :   return true;  // CC didn't match.
      85             : }
      86             : 
      87             : 
      88          32 : static bool RetCC_AVR_BUILTIN(unsigned ValNo, MVT ValVT,
      89             :                               MVT LocVT, CCValAssign::LocInfo LocInfo,
      90             :                               ISD::ArgFlagsTy ArgFlags, CCState &State) {
      91             : 
      92          32 :   if (LocVT == MVT::i8) {
      93             :     static const MCPhysReg RegList1[] = {
      94             :       AVR::R24, AVR::R25
      95             :     };
      96           8 :     if (unsigned Reg = State.AllocateReg(RegList1)) {
      97           8 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
      98           8 :       return false;
      99             :     }
     100             :   }
     101             : 
     102          24 :   if (LocVT == MVT::i16) {
     103             :     static const MCPhysReg RegList2[] = {
     104             :       AVR::R23R22, AVR::R25R24
     105             :     };
     106          24 :     if (unsigned Reg = State.AllocateReg(RegList2)) {
     107          24 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
     108          24 :       return false;
     109             :     }
     110             :   }
     111             : 
     112             :   return true;  // CC didn't match.
     113             : }

Generated by: LCOV version 1.13