llvm.org GIT mirror llvm / 5cfd40c
Remove modifierType/Base from X86 disassembler tables as they are no longer used. Removes ~11.5K from static tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198284 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 6 years ago
4 changed file(s) with 0 addition(s) and 31 deletion(s). Raw diff Collapse all Expand all
540540 * its operands.
541541 */
542542 struct InstructionSpecifier {
543 uint8_t modifierType;
544 uint8_t modifierBase;
545
546543 /* The macro below must be defined wherever this file is included. */
547544 INSTRUCTION_SPECIFIER_FIELDS
548545 };
2222 filtered = false; \
2323 insnContext = IC; \
2424 name = ""; \
25 modifierType = MODIFIER_NONE; \
26 modifierBase = 0; \
2725 memset(operands, 0, sizeof(operands)); \
2826 }
2927
361361 #undef ENUM_ENTRY
362362 }
363363
364 /// stringForModifierType - Returns a statically-allocated string corresponding
365 /// to an opcode modifier type.
366 ///
367 /// @param mt - The modifier type.
368 /// @return - A pointer to the statically-allocated string (e.g.,
369 /// "MODIFIER_NONE" for MODIFIER_NONE).
370 static const char* stringForModifierType(ModifierType mt) {
371 #define ENUM_ENTRY(n) case n: return #n;
372 switch(mt) {
373 default:
374 llvm_unreachable("Unknown modifier type");
375 MODIFIER_TYPES
376 };
377 #undef ENUM_ENTRY
378 }
379
380364 DisassemblerTables::DisassemblerTables() {
381365 unsigned i;
382366
601585 for (unsigned index = 0; index < NumInstructions; ++index) {
602586 o.indent(i * 2) << "{ /* " << index << " */" << "\n";
603587 i++;
604
605 o.indent(i * 2) << stringForModifierType(
606 (ModifierType)InstructionSpecifiers[index].modifierType);
607 o << ",\n";
608
609 o.indent(i * 2) << "0x";
610 o << format("%02hhx", (uint16_t)InstructionSpecifiers[index].modifierBase);
611 o << ",\n";
612588
613589 OperandListTy OperandList;
614590 for (unsigned OperandIndex = 0; OperandIndex < X86_MAX_OPERANDS;
11811181 *filter,
11821182 UID, Is32Bit, IgnoresVEX_L);
11831183 }
1184 Spec->modifierType = MODIFIER_NONE;
1185 Spec->modifierBase = opcodeToSet;
11861184
11871185 delete filter;
11881186