LCOV - code coverage report
Current view: top level - build-llvm/lib/Target/Lanai - LanaiGenCallingConv.inc (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 25 36 69.4 %
Date: 2017-09-14 15:23:50 Functions: 3 3 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 CC_Lanai32(unsigned ValNo, MVT ValVT,
      10             :                        MVT LocVT, CCValAssign::LocInfo LocInfo,
      11             :                        ISD::ArgFlagsTy ArgFlags, CCState &State);
      12             : static bool CC_Lanai32_Fast(unsigned ValNo, MVT ValVT,
      13             :                             MVT LocVT, CCValAssign::LocInfo LocInfo,
      14             :                             ISD::ArgFlagsTy ArgFlags, CCState &State);
      15             : static bool RetCC_Lanai32(unsigned ValNo, MVT ValVT,
      16             :                           MVT LocVT, CCValAssign::LocInfo LocInfo,
      17             :                           ISD::ArgFlagsTy ArgFlags, CCState &State);
      18             : 
      19             : 
      20         164 : static bool CC_Lanai32(unsigned ValNo, MVT ValVT,
      21             :                        MVT LocVT, CCValAssign::LocInfo LocInfo,
      22             :                        ISD::ArgFlagsTy ArgFlags, CCState &State) {
      23             : 
      24         328 :   if (LocVT == MVT::i8 ||
      25         164 :       LocVT == MVT::i16) {
      26           0 :     LocVT = MVT::i32;
      27           0 :     if (ArgFlags.isSExt())
      28             :         LocInfo = CCValAssign::SExt;
      29           0 :     else if (ArgFlags.isZExt())
      30             :         LocInfo = CCValAssign::ZExt;
      31             :     else
      32           0 :         LocInfo = CCValAssign::AExt;
      33             :   }
      34             : 
      35         164 :   if (!State.isVarArg()) {
      36         164 :     if (ArgFlags.isInReg()) {
      37         110 :       if (LocVT == MVT::i32) {
      38             :         static const MCPhysReg RegList1[] = {
      39             :           Lanai::R6, Lanai::R7, Lanai::R18, Lanai::R19
      40             :         };
      41         110 :         if (unsigned Reg = State.AllocateReg(RegList1)) {
      42         220 :           State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
      43         110 :           return false;
      44             :         }
      45             :       }
      46             :     }
      47             :   }
      48             : 
      49          54 :   unsigned Offset2 = State.AllocateStack(4, 4);
      50         108 :   State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset2, LocVT, LocInfo));
      51          54 :   return false;
      52             : 
      53             :   return true;  // CC didn't match.
      54             : }
      55             : 
      56             : 
      57          14 : static bool CC_Lanai32_Fast(unsigned ValNo, MVT ValVT,
      58             :                             MVT LocVT, CCValAssign::LocInfo LocInfo,
      59             :                             ISD::ArgFlagsTy ArgFlags, CCState &State) {
      60             : 
      61          28 :   if (LocVT == MVT::i8 ||
      62          14 :       LocVT == MVT::i16) {
      63           0 :     LocVT = MVT::i32;
      64           0 :     if (ArgFlags.isSExt())
      65             :         LocInfo = CCValAssign::SExt;
      66           0 :     else if (ArgFlags.isZExt())
      67             :         LocInfo = CCValAssign::ZExt;
      68             :     else
      69           0 :         LocInfo = CCValAssign::AExt;
      70             :   }
      71             : 
      72          14 :   if (!State.isVarArg()) {
      73          14 :     if (LocVT == MVT::i32) {
      74             :       static const MCPhysReg RegList1[] = {
      75             :         Lanai::R6, Lanai::R7, Lanai::R18, Lanai::R19
      76             :       };
      77          14 :       if (unsigned Reg = State.AllocateReg(RegList1)) {
      78          28 :         State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
      79          14 :         return false;
      80             :       }
      81             :     }
      82             :   }
      83             : 
      84           0 :   unsigned Offset2 = State.AllocateStack(4, 4);
      85           0 :   State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset2, LocVT, LocInfo));
      86           0 :   return false;
      87             : 
      88             :   return true;  // CC didn't match.
      89             : }
      90             : 
      91             : 
      92          97 : static bool RetCC_Lanai32(unsigned ValNo, MVT ValVT,
      93             :                           MVT LocVT, CCValAssign::LocInfo LocInfo,
      94             :                           ISD::ArgFlagsTy ArgFlags, CCState &State) {
      95             : 
      96         194 :   if (LocVT == MVT::i32) {
      97             :     static const MCPhysReg RegList1[] = {
      98             :       Lanai::RV, Lanai::R9
      99             :     };
     100          97 :     if (unsigned Reg = State.AllocateReg(RegList1)) {
     101         194 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
     102          97 :       return false;
     103             :     }
     104             :   }
     105             : 
     106             :   return true;  // CC didn't match.
     107             : }

Generated by: LCOV version 1.13