Lines Matching refs:Indentation
180 void emit(raw_ostream &o, unsigned &Indentation);
281 void emitTop(raw_ostream &o, unsigned Indentation, std::string Namespace);
335 bool emitPredicateMatch(raw_ostream &o, unsigned &Indentation,unsigned Opc);
339 bool emitSingletonDecoder(raw_ostream &o, unsigned &Indentation,unsigned Opc);
342 void emitSingletonDecoder(raw_ostream &o, unsigned &Indentation,Filter &Best);
344 void emitBinaryParser(raw_ostream &o , unsigned &Indentation,
369 bool emit(raw_ostream &o, unsigned &Indentation);
498 void Filter::emit(raw_ostream &o, unsigned &Indentation) { in emit() argument
499 o.indent(Indentation) << "// Check Inst{"; in emit()
506 o.indent(Indentation) << "switch (fieldFromInstruction" << Owner->BitWidth in emit()
522 o.indent(Indentation) << "default:\n"; in emit()
523 o.indent(Indentation) << " break; // fallthrough\n"; in emit()
529 o.indent(Indentation) << "}\n"; in emit()
532 o.indent(Indentation) << "case " << filterIterator->first << ":\n"; in emit()
538 if (!DefaultCase) { ++Indentation; ++Indentation; } in emit()
540 bool finished = filterIterator->second->emit(o, Indentation); in emit()
545 o.indent(Indentation) << "break;\n"; in emit()
547 if (!DefaultCase) { --Indentation; --Indentation; } in emit()
553 o.indent(Indentation) << "}\n"; in emit()
573 void FilterChooser::emitTop(raw_ostream &o, unsigned Indentation, in emitTop() argument
575 o.indent(Indentation) << in emitTop()
579 o.indent(Indentation) << " unsigned tmp = 0;\n (void)tmp;\n" << Emitter->Locals << "\n"; in emitTop()
580 o.indent(Indentation) << " uint64_t Bits = STI.getFeatureBits();\n"; in emitTop()
582 ++Indentation; ++Indentation; in emitTop()
584 emit(o, Indentation); in emitTop()
587 o.indent(Indentation) << "return " << Emitter->ReturnFail << ";\n"; in emitTop()
588 --Indentation; --Indentation; in emitTop()
590 o.indent(Indentation) << "}\n"; in emitTop()
738 void FilterChooser::emitBinaryParser(raw_ostream &o, unsigned &Indentation, in emitBinaryParser() argument
744 o.indent(Indentation) << " tmp = fieldFromInstruction" << BitWidth in emitBinaryParser()
748 o.indent(Indentation) << " tmp = 0;\n"; in emitBinaryParser()
751 o.indent(Indentation) << " tmp |= (fieldFromInstruction" << BitWidth in emitBinaryParser()
758 o.indent(Indentation) << " " << Emitter->GuardPrefix << Decoder in emitBinaryParser()
761 o.indent(Indentation) << " MI.addOperand(MCOperand::CreateImm(tmp));\n"; in emitBinaryParser()
774 bool FilterChooser::emitPredicateMatch(raw_ostream &o, unsigned &Indentation, in emitPredicateMatch() argument
804 bool FilterChooser::emitSingletonDecoder(raw_ostream &o, unsigned &Indentation, in emitSingletonDecoder() argument
820 o.indent(Indentation) << "if ("; in emitSingletonDecoder()
821 if (!emitPredicateMatch(o, Indentation, Opc)) in emitSingletonDecoder()
824 o.indent(Indentation) << " MI.setOpcode(" << Opc << ");\n"; in emitSingletonDecoder()
830 o.indent(Indentation) << " " << Emitter->GuardPrefix << I->Decoder in emitSingletonDecoder()
835 emitBinaryParser(o, Indentation, *I); in emitSingletonDecoder()
838 o.indent(Indentation) << " return " << Emitter->ReturnOK << "; // " << nameWithID(Opc) in emitSingletonDecoder()
840 o.indent(Indentation) << "}\n"; // Closing predicate block. in emitSingletonDecoder()
847 o.indent(Indentation) << "// Check "; in emitSingletonDecoder()
857 o.indent(Indentation) << "if ("; in emitSingletonDecoder()
858 if (emitPredicateMatch(o, Indentation, Opc)) { in emitSingletonDecoder()
860 o.indent(Indentation+4); in emitSingletonDecoder()
873 o.indent(Indentation) << " MI.setOpcode(" << Opc << ");\n"; in emitSingletonDecoder()
879 o.indent(Indentation) << " " << Emitter->GuardPrefix << I->Decoder in emitSingletonDecoder()
884 emitBinaryParser(o, Indentation, *I); in emitSingletonDecoder()
886 o.indent(Indentation) << " return " << Emitter->ReturnOK << "; // " << nameWithID(Opc) in emitSingletonDecoder()
888 o.indent(Indentation) << "}\n"; in emitSingletonDecoder()
894 void FilterChooser::emitSingletonDecoder(raw_ostream &o, unsigned &Indentation, in emitSingletonDecoder() argument
899 emitSingletonDecoder(o, Indentation, Opc); in emitSingletonDecoder()
902 o.indent(Indentation) << "else\n"; in emitSingletonDecoder()
904 Indentation += 2; in emitSingletonDecoder()
905 Best.getVariableFC().emit(o, Indentation); in emitSingletonDecoder()
906 Indentation -= 2; in emitSingletonDecoder()
1192 bool FilterChooser::emit(raw_ostream &o, unsigned &Indentation) { in emit() argument
1197 return emitSingletonDecoder(o, Indentation, Opcodes[0]); in emit()
1203 emitSingletonDecoder(o, Indentation, Best); in emit()
1205 bestFilter().emit(o, Indentation); in emit()
1211 o.indent(Indentation) << "return 0;" << " // Conflict set: "; in emit()
1399 unsigned Indentation = 0; in emitHelper() local
1404 o.indent(Indentation) << "static " << WidthStr << in emitHelper()
1408 o.indent(Indentation) << "{\n"; in emitHelper()
1410 ++Indentation; ++Indentation; in emitHelper()
1411 o.indent(Indentation) << "assert(startBit + numBits <= " << BitWidth in emitHelper()
1414 o.indent(Indentation) << WidthStr << " fieldMask;\n"; in emitHelper()
1416 o.indent(Indentation) << "if (numBits == " << BitWidth << ")\n"; in emitHelper()
1418 ++Indentation; ++Indentation; in emitHelper()
1419 o.indent(Indentation) << "fieldMask = (" << WidthStr << ")-1;\n"; in emitHelper()
1420 --Indentation; --Indentation; in emitHelper()
1422 o.indent(Indentation) << "else\n"; in emitHelper()
1424 ++Indentation; ++Indentation; in emitHelper()
1425 o.indent(Indentation) << "fieldMask = ((1 << numBits) - 1) << startBit;\n"; in emitHelper()
1426 --Indentation; --Indentation; in emitHelper()
1429 o.indent(Indentation) << "return (insn & fieldMask) >> startBit;\n"; in emitHelper()
1430 --Indentation; --Indentation; in emitHelper()
1432 o.indent(Indentation) << "}\n"; in emitHelper()