Lines Matching refs:O
20 void CallingConvEmitter::run(raw_ostream &O) { in run() argument
21 EmitSourceFileHeader("Calling Convention Implementation Fragment", O); in run()
28 O << "static bool " << CCs[i]->getName() in run()
38 EmitCallingConv(CCs[i], O); in run()
42 void CallingConvEmitter::EmitCallingConv(Record *CC, raw_ostream &O) { in EmitCallingConv() argument
46 O << "\n\nstatic bool " << CC->getName() in EmitCallingConv()
54 O << "\n"; in EmitCallingConv()
55 EmitAction(CCActions->getElementAsRecord(i), 2, O); in EmitCallingConv()
58 O << "\n return true; // CC didn't match.\n"; in EmitCallingConv()
59 O << "}\n"; in EmitCallingConv()
63 unsigned Indent, raw_ostream &O) { in EmitAction() argument
67 O << IndentStr << "if ("; in EmitAction()
73 if (i != 0) O << " ||\n " << IndentStr; in EmitAction()
74 O << "LocVT == " << getEnumName(getValueType(VT)); in EmitAction()
78 O << Action->getValueAsString("Predicate"); in EmitAction()
84 O << ") {\n"; in EmitAction()
85 EmitAction(Action->getValueAsDef("SubAction"), Indent+2, O); in EmitAction()
86 O << IndentStr << "}\n"; in EmitAction()
90 O << IndentStr << "if (!" << CC->getName() in EmitAction()
96 O << IndentStr << "if (unsigned Reg = State.AllocateReg("; in EmitAction()
97 O << getQualifiedName(RegList->getElementAsRecord(0)) << ")) {\n"; in EmitAction()
99 O << IndentStr << "static const unsigned RegList" << ++Counter in EmitAction()
101 O << IndentStr << " "; in EmitAction()
103 if (i != 0) O << ", "; in EmitAction()
104 O << getQualifiedName(RegList->getElementAsRecord(i)); in EmitAction()
106 O << "\n" << IndentStr << "};\n"; in EmitAction()
107 O << IndentStr << "if (unsigned Reg = State.AllocateReg(RegList" in EmitAction()
110 O << IndentStr << " State.addLoc(CCValAssign::getReg(ValNo, ValVT, " in EmitAction()
112 O << IndentStr << " return false;\n"; in EmitAction()
113 O << IndentStr << "}\n"; in EmitAction()
122 O << IndentStr << "if (unsigned Reg = State.AllocateReg("; in EmitAction()
123 O << getQualifiedName(RegList->getElementAsRecord(0)); in EmitAction()
124 O << ", " << getQualifiedName(ShadowRegList->getElementAsRecord(0)); in EmitAction()
125 O << ")) {\n"; in EmitAction()
130 O << IndentStr << "static const unsigned RegList" << RegListNumber in EmitAction()
132 O << IndentStr << " "; in EmitAction()
134 if (i != 0) O << ", "; in EmitAction()
135 O << getQualifiedName(RegList->getElementAsRecord(i)); in EmitAction()
137 O << "\n" << IndentStr << "};\n"; in EmitAction()
139 O << IndentStr << "static const unsigned RegList" in EmitAction()
141 O << IndentStr << " "; in EmitAction()
143 if (i != 0) O << ", "; in EmitAction()
144 O << getQualifiedName(ShadowRegList->getElementAsRecord(i)); in EmitAction()
146 O << "\n" << IndentStr << "};\n"; in EmitAction()
148 O << IndentStr << "if (unsigned Reg = State.AllocateReg(RegList" in EmitAction()
152 O << IndentStr << " State.addLoc(CCValAssign::getReg(ValNo, ValVT, " in EmitAction()
154 O << IndentStr << " return false;\n"; in EmitAction()
155 O << IndentStr << "}\n"; in EmitAction()
160 O << IndentStr << "unsigned Offset" << ++Counter in EmitAction()
163 O << Size << ", "; in EmitAction()
165 O << "\n" << IndentStr << " State.getTarget().getTargetData()" in EmitAction()
168 O << Align; in EmitAction()
170 O << "\n" << IndentStr << " State.getTarget().getTargetData()" in EmitAction()
173 O << ", " << getQualifiedName(Action->getValueAsDef("ShadowReg")); in EmitAction()
174 O << ");\n" << IndentStr in EmitAction()
177 O << IndentStr << "return false;\n"; in EmitAction()
180 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
181 O << IndentStr << "if (ArgFlags.isSExt())\n" in EmitAction()
189 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
190 O << IndentStr << "LocInfo = CCValAssign::BCvt;\n"; in EmitAction()
193 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
194 O << IndentStr << "LocInfo = CCValAssign::Indirect;\n"; in EmitAction()
198 O << IndentStr in EmitAction()
201 O << IndentStr << "return false;\n"; in EmitAction()
203 O << IndentStr in EmitAction()
206 O << IndentStr << IndentStr << "return false;\n"; in EmitAction()