Coverage Report

Created: 2018-11-16 02:38

/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
39
                                  ISD::ArgFlagsTy ArgFlags, CCState &State) {
20
39
21
39
  if (ArgFlags.isByVal()) {
22
0
    State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, 2, 2, ArgFlags);
23
0
    return false;
24
0
  }
25
39
26
39
  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
39
36
39
  if (LocVT == MVT::i16) {
37
39
    unsigned Offset1 = State.AllocateStack(2, 2);
38
39
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset1, LocVT, LocInfo));
39
39
    return false;
40
39
  }
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
982
                         ISD::ArgFlagsTy ArgFlags, CCState &State) {
49
982
50
982
  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
902
  }
59
902
60
902
  if (LocVT == MVT::i16) {
61
902
    static const MCPhysReg RegList2[] = {
62
902
      MSP430::R12, MSP430::R13, MSP430::R14, MSP430::R15
63
902
    };
64
902
    if (unsigned Reg = State.AllocateReg(RegList2)) {
65
901
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
66
901
      return false;
67
901
    }
68
1
  }
69
1
70
1
  return true;  // CC didn't match.
71
1
}