Lines Matching refs:O

31   void EmitCallingConv(Record *CC, raw_ostream &O);
32 void EmitAction(Record *Action, unsigned Indent, raw_ostream &O);
37 void CallingConvEmitter::run(raw_ostream &O) { in run() argument
44 O << "static bool " << CCs[i]->getName() in run()
56 EmitCallingConv(CCs[i], O); in run()
61 void CallingConvEmitter::EmitCallingConv(Record *CC, raw_ostream &O) { in EmitCallingConv() argument
65 O << "\n\nstatic bool " << CC->getName() in EmitCallingConv()
73 O << "\n"; in EmitCallingConv()
74 EmitAction(CCActions->getElementAsRecord(i), 2, O); in EmitCallingConv()
77 O << "\n return true; // CC didn't match.\n"; in EmitCallingConv()
78 O << "}\n"; in EmitCallingConv()
82 unsigned Indent, raw_ostream &O) { in EmitAction() argument
86 O << IndentStr << "if ("; in EmitAction()
92 if (i != 0) O << " ||\n " << IndentStr; in EmitAction()
93 O << "LocVT == " << getEnumName(getValueType(VT)); in EmitAction()
97 O << Action->getValueAsString("Predicate"); in EmitAction()
103 O << ") {\n"; in EmitAction()
104 EmitAction(Action->getValueAsDef("SubAction"), Indent+2, O); in EmitAction()
105 O << IndentStr << "}\n"; in EmitAction()
109 O << IndentStr << "if (!" << CC->getName() in EmitAction()
115 O << IndentStr << "if (unsigned Reg = State.AllocateReg("; in EmitAction()
116 O << getQualifiedName(RegList->getElementAsRecord(0)) << ")) {\n"; in EmitAction()
118 O << IndentStr << "static const MCPhysReg RegList" << ++Counter in EmitAction()
120 O << IndentStr << " "; in EmitAction()
122 if (i != 0) O << ", "; in EmitAction()
123 O << getQualifiedName(RegList->getElementAsRecord(i)); in EmitAction()
125 O << "\n" << IndentStr << "};\n"; in EmitAction()
126 O << IndentStr << "if (unsigned Reg = State.AllocateReg(RegList" in EmitAction()
129 O << IndentStr << " State.addLoc(CCValAssign::getReg(ValNo, ValVT, " in EmitAction()
131 O << IndentStr << " return false;\n"; in EmitAction()
132 O << IndentStr << "}\n"; in EmitAction()
140 O << IndentStr << "if (unsigned Reg = State.AllocateReg("; in EmitAction()
141 O << getQualifiedName(RegList->getElementAsRecord(0)); in EmitAction()
142 O << ", " << getQualifiedName(ShadowRegList->getElementAsRecord(0)); in EmitAction()
143 O << ")) {\n"; in EmitAction()
148 O << IndentStr << "static const MCPhysReg RegList" << RegListNumber in EmitAction()
150 O << IndentStr << " "; in EmitAction()
152 if (i != 0) O << ", "; in EmitAction()
153 O << getQualifiedName(RegList->getElementAsRecord(i)); in EmitAction()
155 O << "\n" << IndentStr << "};\n"; in EmitAction()
157 O << IndentStr << "static const MCPhysReg RegList" in EmitAction()
159 O << IndentStr << " "; in EmitAction()
161 if (i != 0) O << ", "; in EmitAction()
162 O << getQualifiedName(ShadowRegList->getElementAsRecord(i)); in EmitAction()
164 O << "\n" << IndentStr << "};\n"; in EmitAction()
166 O << IndentStr << "if (unsigned Reg = State.AllocateReg(RegList" in EmitAction()
170 O << IndentStr << " State.addLoc(CCValAssign::getReg(ValNo, ValVT, " in EmitAction()
172 O << IndentStr << " return false;\n"; in EmitAction()
173 O << IndentStr << "}\n"; in EmitAction()
178 O << IndentStr << "unsigned Offset" << ++Counter in EmitAction()
181 O << Size << ", "; in EmitAction()
183 O << "\n" << IndentStr in EmitAction()
188 O << Align; in EmitAction()
190 O << "\n" << IndentStr in EmitAction()
194 O << ");\n" << IndentStr in EmitAction()
197 O << IndentStr << "return false;\n"; in EmitAction()
205 O << IndentStr << "static const MCPhysReg ShadowRegList" in EmitAction()
207 O << IndentStr << " "; in EmitAction()
209 if (i != 0) O << ", "; in EmitAction()
210 O << getQualifiedName(ShadowRegList->getElementAsRecord(i)); in EmitAction()
212 O << "\n" << IndentStr << "};\n"; in EmitAction()
214 O << IndentStr << "unsigned Offset" << ++Counter in EmitAction()
218 O << IndentStr << "State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset" in EmitAction()
220 O << IndentStr << "return false;\n"; in EmitAction()
224 O << IndentStr << "LocVT = " << getEnumName(DestVT) <<";\n"; in EmitAction()
226 O << IndentStr << "LocInfo = CCValAssign::FPExt;\n"; in EmitAction()
228 O << IndentStr << "if (ArgFlags.isSExt())\n" in EmitAction()
238 O << IndentStr << "LocVT = " << getEnumName(DestVT) << ";\n"; in EmitAction()
243 O << IndentStr << "if (ArgFlags.isSExt())\n" in EmitAction()
252 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
253 O << IndentStr << "LocInfo = CCValAssign::BCvt;\n"; in EmitAction()
256 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
257 O << IndentStr << "LocInfo = CCValAssign::Indirect;\n"; in EmitAction()
261 O << IndentStr in EmitAction()
264 O << IndentStr << "return false;\n"; in EmitAction()
266 O << IndentStr in EmitAction()
269 O << IndentStr << IndentStr << "return false;\n"; in EmitAction()