Coverage Report

Created: 2018-11-13 17:19

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/lib/Target/XCore/XCoreGenCallingConv.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_XCore(unsigned ValNo, MVT ValVT,
10
                     MVT LocVT, CCValAssign::LocInfo LocInfo,
11
                     ISD::ArgFlagsTy ArgFlags, CCState &State);
12
static bool RetCC_XCore(unsigned ValNo, MVT ValVT,
13
                        MVT LocVT, CCValAssign::LocInfo LocInfo,
14
                        ISD::ArgFlagsTy ArgFlags, CCState &State);
15
16
17
static bool CC_XCore(unsigned ValNo, MVT ValVT,
18
                     MVT LocVT, CCValAssign::LocInfo LocInfo,
19
445
                     ISD::ArgFlagsTy ArgFlags, CCState &State) {
20
445
21
445
  if (LocVT == MVT::i8 ||
22
445
      LocVT == MVT::i16) {
23
0
    LocVT = MVT::i32;
24
0
    if (ArgFlags.isSExt())
25
0
        LocInfo = CCValAssign::SExt;
26
0
    else if (ArgFlags.isZExt())
27
0
        LocInfo = CCValAssign::ZExt;
28
0
    else
29
0
        LocInfo = CCValAssign::AExt;
30
0
  }
31
445
32
445
  if (ArgFlags.isNest()) {
33
1
    if (unsigned Reg = State.AllocateReg(XCore::R11)) {
34
1
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
35
1
      return false;
36
1
    }
37
444
  }
38
444
39
444
  if (LocVT == MVT::i32) {
40
444
    static const MCPhysReg RegList1[] = {
41
444
      XCore::R0, XCore::R1, XCore::R2, XCore::R3
42
444
    };
43
444
    if (unsigned Reg = State.AllocateReg(RegList1)) {
44
430
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
45
430
      return false;
46
430
    }
47
14
  }
48
14
49
14
  if (LocVT == MVT::i32) {
50
14
    unsigned Offset2 = State.AllocateStack(4, 4);
51
14
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset2, LocVT, LocInfo));
52
14
    return false;
53
14
  }
54
0
55
0
  return true;  // CC didn't match.
56
0
}
57
58
59
static bool RetCC_XCore(unsigned ValNo, MVT ValVT,
60
                        MVT LocVT, CCValAssign::LocInfo LocInfo,
61
584
                        ISD::ArgFlagsTy ArgFlags, CCState &State) {
62
584
63
584
  if (LocVT == MVT::i32) {
64
584
    static const MCPhysReg RegList1[] = {
65
584
      XCore::R0, XCore::R1, XCore::R2, XCore::R3
66
584
    };
67
584
    if (unsigned Reg = State.AllocateReg(RegList1)) {
68
579
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
69
579
      return false;
70
579
    }
71
5
  }
72
5
73
5
  if (LocVT == MVT::i32) {
74
5
    unsigned Offset2 = State.AllocateStack(4, 4);
75
5
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset2, LocVT, LocInfo));
76
5
    return false;
77
5
  }
78
0
79
0
  return true;  // CC didn't match.
80
0
}