Coverage Report

Created: 2018-09-19 20:53

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