Lines Matching defs:Table
70 DecoderTable Table;
98 // Emit the decoder state machine table.
99 void emitTable(formatted_raw_ostream &o, DecoderTable &Table,
268 // Emit table entries to decode instructions given a segment or segments of
314 // Lookup table for the operand decoding of instructions.
448 // Emits table entries to decode the singleton.
608 static void resolveTableFixups(DecoderTable &Table, const FixupList &Fixups,
621 // Our NumToSkip entries are 16-bits. Make sure our table isn't too
623 assert(Delta < 65536U && "disassembler decoding table too large!");
624 Table[FixupIdx] = (uint8_t)Delta;
625 Table[FixupIdx + 1] = (uint8_t)(Delta >> 8);
629 // Emit table entries to decode instructions given a segment or segments
632 TableInfo.Table.push_back(MCD::OPC_ExtractField);
633 TableInfo.Table.push_back(StartBit);
634 TableInfo.Table.push_back(NumBits);
641 DecoderTable &Table = TableInfo.Table;
658 resolveTableFixups(Table, CurScope, Table.size());
662 Table.push_back(MCD::OPC_FilterValue);
666 Table.insert(Table.end(), Buffer, Buffer + Len);
669 PrevFilter = Table.size();
670 Table.push_back(0);
671 Table.push_back(0);
684 uint32_t NumToSkip = Table.size() - PrevFilter - 2;
685 assert(NumToSkip < 65536U && "disassembler decoding table too large!");
686 Table[PrevFilter] = (uint8_t)NumToSkip;
687 Table[PrevFilter + 1] = (uint8_t)(NumToSkip >> 8);
719 // Emit the decoder state machine table.
721 DecoderTable &Table,
732 DecoderTable::const_iterator I = Table.begin();
733 DecoderTable::const_iterator E = Table.end();
735 assert (I < E && "incomplete decode table entry!");
737 uint64_t Pos = I - Table.begin();
743 PrintFatalError("invalid decode table opcode");
770 OS << "// Skip to: " << ((I - Table.begin()) + NumToSkip) << "\n";
790 OS << "// Skip to: " << ((I - Table.begin()) + NumToSkip) << "\n";
807 OS << "// Skip to: " << ((I - Table.begin()) + NumToSkip) << "\n";
1129 // Make sure the predicate is in the table.
1131 // Now figure out the index for when we write out the table.
1202 // Make sure the predicate is in the table.
1204 // Now figure out the index for when we write out the table.
1224 // Figure out the index into the predicate table for the predicate just
1232 TableInfo.Table.push_back(MCD::OPC_CheckPredicate);
1235 TableInfo.Table.push_back(PBytes[i]);
1237 TableInfo.FixupStack.back().push_back(TableInfo.Table.size());
1238 TableInfo.Table.push_back(0);
1239 TableInfo.Table.push_back(0);
1283 TableInfo.Table.push_back(MCD::OPC_SoftFail);
1291 TableInfo.Table.push_back(MaskBytes[i]);
1293 TableInfo.Table.push_back(0);
1300 TableInfo.Table.push_back(MaskBytes[i]);
1302 TableInfo.Table.push_back(0);
1305 // Emits table entries to decode the singleton.
1319 // Emit the predicate table entry if one is needed.
1325 TableInfo.Table.push_back(MCD::OPC_CheckField);
1326 TableInfo.Table.push_back(StartBits[I-1]);
1327 TableInfo.Table.push_back(NumBits);
1331 TableInfo.Table.push_back(*p);
1332 TableInfo.Table.push_back(*p);
1334 TableInfo.FixupStack.back().push_back(TableInfo.Table.size());
1336 // in the table so all our relative position calculations work OK even
1338 TableInfo.Table.push_back(0);
1339 TableInfo.Table.push_back(0);
1345 TableInfo.Table.push_back(MCD::OPC_Decode);
1349 TableInfo.Table.push_back(*p);
1350 TableInfo.Table.push_back(*p);
1360 TableInfo.Table.push_back(Bytes[i]);
1363 // Emits table entries to decode the singleton, and then to decode the rest.
1374 resolveTableFixups(TableInfo.Table, TableInfo.FixupStack.back(),
1375 TableInfo.Table.size());
2059 << " errs() << Loc << \": Unexpected decode table opcode!\\n\";\n"
2213 // The decode table is cleared for each top level decoder function. The
2216 TableInfo.Table.clear();
2218 TableInfo.Table.reserve(16384);
2222 // OPC_Fail at the end of the table.
2225 resolveTableFixups(TableInfo.Table, TableInfo.FixupStack.back(),
2226 TableInfo.Table.size());
2229 TableInfo.Table.push_back(MCD::OPC_Fail);
2231 // Print the table to the output stream.
2232 emitTable(OS, TableInfo.Table, 0, FC.getBitWidth(), I->first.first);