1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | |* *| |
3 | |* Calling Convention Implementation Fragment *| |
4 | |* *| |
5 | |* Automatically generated file, do not edit! *| |
6 | |* *| |
7 | \*===----------------------------------------------------------------------===*/ |
8 | |
9 | #ifndef GET_CC_REGISTER_LISTS |
10 | |
11 | static bool ArgCC_AVR_Vararg(unsigned ValNo, MVT ValVT, |
12 | MVT LocVT, CCValAssign::LocInfo LocInfo, |
13 | ISD::ArgFlagsTy ArgFlags, CCState &State); |
14 | static bool RetCC_AVR_BUILTIN(unsigned ValNo, MVT ValVT, |
15 | MVT LocVT, CCValAssign::LocInfo LocInfo, |
16 | ISD::ArgFlagsTy ArgFlags, CCState &State); |
17 | |
18 | |
19 | static bool ArgCC_AVR_Vararg(unsigned ValNo, MVT ValVT, |
20 | MVT LocVT, CCValAssign::LocInfo LocInfo, |
21 | ISD::ArgFlagsTy ArgFlags, CCState &State) { |
22 | |
23 | if (LocVT == MVT::i8) { |
24 | int64_t Offset1 = State.AllocateStack(Size: 1, Alignment: Align(1)); |
25 | State.addLoc(V: CCValAssign::getMem(ValNo, ValVT, Offset: Offset1, LocVT, HTP: LocInfo)); |
26 | return false; |
27 | } |
28 | |
29 | int64_t Offset2 = State.AllocateStack(Size: 2, Alignment: Align(1)); |
30 | State.addLoc(V: CCValAssign::getMem(ValNo, ValVT, Offset: Offset2, LocVT, HTP: LocInfo)); |
31 | return false; |
32 | |
33 | return true; // CC didn't match. |
34 | } |
35 | |
36 | |
37 | static bool RetCC_AVR_BUILTIN(unsigned ValNo, MVT ValVT, |
38 | MVT LocVT, CCValAssign::LocInfo LocInfo, |
39 | ISD::ArgFlagsTy ArgFlags, CCState &State) { |
40 | |
41 | if (LocVT == MVT::i8) { |
42 | static const MCPhysReg RegList1[] = { |
43 | AVR::R24, AVR::R25 |
44 | }; |
45 | if (unsigned Reg = State.AllocateReg(Regs: RegList1)) { |
46 | State.addLoc(V: CCValAssign::getReg(ValNo, ValVT, RegNo: Reg, LocVT, HTP: LocInfo)); |
47 | return false; |
48 | } |
49 | } |
50 | |
51 | if (LocVT == MVT::i16) { |
52 | static const MCPhysReg RegList2[] = { |
53 | AVR::R23R22, AVR::R25R24 |
54 | }; |
55 | if (unsigned Reg = State.AllocateReg(Regs: RegList2)) { |
56 | State.addLoc(V: CCValAssign::getReg(ValNo, ValVT, RegNo: Reg, LocVT, HTP: LocInfo)); |
57 | return false; |
58 | } |
59 | } |
60 | |
61 | return true; // CC didn't match. |
62 | } |
63 | |
64 | #else |
65 | |
66 | const MCRegister ArgCC_AVR_Vararg_ArgRegs[] = { 0 }; |
67 | const MCRegister RetCC_AVR_BUILTIN_ArgRegs[] = { AVR::R23R22, AVR::R24, AVR::R25, AVR::R25R24 }; |
68 | |
69 | #endif // CC_REGISTER_LIST |
70 | |