LCOV - code coverage report
Current view: top level - build-llvm/lib/Target/MSP430 - MSP430GenCallingConv.inc (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 16 22 72.7 %
Date: 2017-09-14 15:23:50 Functions: 2 2 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_MSP430_AssignStack(unsigned ValNo, MVT ValVT,
      10             :                                   MVT LocVT, CCValAssign::LocInfo LocInfo,
      11             :                                   ISD::ArgFlagsTy ArgFlags, CCState &State);
      12             : static bool RetCC_MSP430(unsigned ValNo, MVT ValVT,
      13             :                          MVT LocVT, CCValAssign::LocInfo LocInfo,
      14             :                          ISD::ArgFlagsTy ArgFlags, CCState &State);
      15             : 
      16             : 
      17          39 : static bool CC_MSP430_AssignStack(unsigned ValNo, MVT ValVT,
      18             :                                   MVT LocVT, CCValAssign::LocInfo LocInfo,
      19             :                                   ISD::ArgFlagsTy ArgFlags, CCState &State) {
      20             : 
      21          39 :   if (ArgFlags.isByVal()) {
      22           0 :     State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, 2, 2, ArgFlags);
      23           0 :     return false;
      24             :   }
      25             : 
      26          39 :   if (LocVT == MVT::i8) {
      27           0 :     LocVT = MVT::i16;
      28           0 :     if (ArgFlags.isSExt())
      29             :         LocInfo = CCValAssign::SExt;
      30           0 :     else if (ArgFlags.isZExt())
      31             :         LocInfo = CCValAssign::ZExt;
      32             :     else
      33           0 :         LocInfo = CCValAssign::AExt;
      34             :   }
      35             : 
      36          39 :   if (LocVT == MVT::i16) {
      37          39 :     unsigned Offset1 = State.AllocateStack(2, 2);
      38          78 :     State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset1, LocVT, LocInfo));
      39          39 :     return false;
      40             :   }
      41             : 
      42             :   return true;  // CC didn't match.
      43             : }
      44             : 
      45             : 
      46         984 : static bool RetCC_MSP430(unsigned ValNo, MVT ValVT,
      47             :                          MVT LocVT, CCValAssign::LocInfo LocInfo,
      48             :                          ISD::ArgFlagsTy ArgFlags, CCState &State) {
      49             : 
      50         984 :   if (LocVT == MVT::i8) {
      51             :     static const MCPhysReg RegList1[] = {
      52             :       MSP430::R12B, MSP430::R13B, MSP430::R14B, MSP430::R15B
      53             :     };
      54          80 :     if (unsigned Reg = State.AllocateReg(RegList1)) {
      55         160 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
      56          80 :       return false;
      57             :     }
      58             :   }
      59             : 
      60         904 :   if (LocVT == MVT::i16) {
      61             :     static const MCPhysReg RegList2[] = {
      62             :       MSP430::R12, MSP430::R13, MSP430::R14, MSP430::R15
      63             :     };
      64         904 :     if (unsigned Reg = State.AllocateReg(RegList2)) {
      65        1806 :       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
      66         903 :       return false;
      67             :     }
      68             :   }
      69             : 
      70             :   return true;  // CC didn't match.
      71             : }

Generated by: LCOV version 1.13