Coverage Report

Created: 2018-09-19 20:53

/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
0
                     ISD::ArgFlagsTy ArgFlags, CCState &State) {
20
0
21
0
  if (LocVT == MVT::i8 ||
22
0
      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
0
32
0
  if (ArgFlags.isNest()) {
33
0
    if (unsigned Reg = State.AllocateReg(XCore::R11)) {
34
0
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
35
0
      return false;
36
0
    }
37
0
  }
38
0
39
0
  if (LocVT == MVT::i32) {
40
0
    static const MCPhysReg RegList1[] = {
41
0
      XCore::R0, XCore::R1, XCore::R2, XCore::R3
42
0
    };
43
0
    if (unsigned Reg = State.AllocateReg(RegList1)) {
44
0
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
45
0
      return false;
46
0
    }
47
0
  }
48
0
49
0
  if (LocVT == MVT::i32) {
50
0
    unsigned Offset2 = State.AllocateStack(4, 4);
51
0
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset2, LocVT, LocInfo));
52
0
    return false;
53
0
  }
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
0
                        ISD::ArgFlagsTy ArgFlags, CCState &State) {
62
0
63
0
  if (LocVT == MVT::i32) {
64
0
    static const MCPhysReg RegList1[] = {
65
0
      XCore::R0, XCore::R1, XCore::R2, XCore::R3
66
0
    };
67
0
    if (unsigned Reg = State.AllocateReg(RegList1)) {
68
0
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
69
0
      return false;
70
0
    }
71
0
  }
72
0
73
0
  if (LocVT == MVT::i32) {
74
0
    unsigned Offset2 = State.AllocateStack(4, 4);
75
0
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset2, LocVT, LocInfo));
76
0
    return false;
77
0
  }
78
0
79
0
  return true;  // CC didn't match.
80
0
}