Coverage Report

Created: 2019-02-15 18:59

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/lib/Target/MSP430/MSP430GenCallingConv.inc
Line
Count
Source (jump to first uncovered line)
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
static bool CC_MSP430_AssignStack(unsigned ValNo, MVT ValVT,
18
                                  MVT LocVT, CCValAssign::LocInfo LocInfo,
19
59
                                  ISD::ArgFlagsTy ArgFlags, CCState &State) {
20
59
21
59
  if (ArgFlags.isByVal()) {
22
0
    State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, 2, 2, ArgFlags);
23
0
    return false;
24
0
  }
25
59
26
59
  if (LocVT == MVT::i8) {
27
0
    LocVT = MVT::i16;
28
0
    if (ArgFlags.isSExt())
29
0
        LocInfo = CCValAssign::SExt;
30
0
    else if (ArgFlags.isZExt())
31
0
        LocInfo = CCValAssign::ZExt;
32
0
    else
33
0
        LocInfo = CCValAssign::AExt;
34
0
  }
35
59
36
59
  if (LocVT == MVT::i16) {
37
59
    unsigned Offset1 = State.AllocateStack(2, 2);
38
59
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset1, LocVT, LocInfo));
39
59
    return false;
40
59
  }
41
0
42
0
  return true;  // CC didn't match.
43
0
}
44
45
46
static bool RetCC_MSP430(unsigned ValNo, MVT ValVT,
47
                         MVT LocVT, CCValAssign::LocInfo LocInfo,
48
1.04k
                         ISD::ArgFlagsTy ArgFlags, CCState &State) {
49
1.04k
50
1.04k
  if (LocVT == MVT::i8) {
51
80
    static const MCPhysReg RegList1[] = {
52
80
      MSP430::R12B, MSP430::R13B, MSP430::R14B, MSP430::R15B
53
80
    };
54
80
    if (unsigned Reg = State.AllocateReg(RegList1)) {
55
80
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
56
80
      return false;
57
80
    }
58
962
  }
59
962
60
962
  if (LocVT == MVT::i16) {
61
962
    static const MCPhysReg RegList2[] = {
62
962
      MSP430::R12, MSP430::R13, MSP430::R14, MSP430::R15
63
962
    };
64
962
    if (unsigned Reg = State.AllocateReg(RegList2)) {
65
961
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
66
961
      return false;
67
961
    }
68
1
  }
69
1
70
1
  return true;  // CC didn't match.
71
1
}