From 3321c99a06e178a26438bb4eaf2e6d7e3fcdc6af Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 1 Jan 2014 21:52:57 +0000 Subject: [PATCH] Remove modifierType/Base from X86 disassembler tables as they are no longer used. Removes ~11.5K from static tables. llvm-svn: 198284 --- .../X86DisassemblerDecoderCommon.h | 3 --- llvm/utils/TableGen/X86DisassemblerShared.h | 2 -- llvm/utils/TableGen/X86DisassemblerTables.cpp | 24 ------------------- llvm/utils/TableGen/X86RecognizableInstr.cpp | 2 -- 4 files changed, 31 deletions(-) diff --git a/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h b/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h index 8ecda65d9890..1acaef1b9472 100644 --- a/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h +++ b/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h @@ -541,9 +541,6 @@ typedef enum { * its operands. */ struct InstructionSpecifier { - uint8_t modifierType; - uint8_t modifierBase; - /* The macro below must be defined wherever this file is included. */ INSTRUCTION_SPECIFIER_FIELDS }; diff --git a/llvm/utils/TableGen/X86DisassemblerShared.h b/llvm/utils/TableGen/X86DisassemblerShared.h index 3ff922b8225c..6bcb78307a2c 100644 --- a/llvm/utils/TableGen/X86DisassemblerShared.h +++ b/llvm/utils/TableGen/X86DisassemblerShared.h @@ -23,8 +23,6 @@ filtered = false; \ insnContext = IC; \ name = ""; \ - modifierType = MODIFIER_NONE; \ - modifierBase = 0; \ memset(operands, 0, sizeof(operands)); \ } diff --git a/llvm/utils/TableGen/X86DisassemblerTables.cpp b/llvm/utils/TableGen/X86DisassemblerTables.cpp index 02f78f13a9fe..6ef924a882f8 100644 --- a/llvm/utils/TableGen/X86DisassemblerTables.cpp +++ b/llvm/utils/TableGen/X86DisassemblerTables.cpp @@ -362,22 +362,6 @@ static const char* stringForDecisionType(ModRMDecisionType dt) { #undef ENUM_ENTRY } -/// stringForModifierType - Returns a statically-allocated string corresponding -/// to an opcode modifier type. -/// -/// @param mt - The modifier type. -/// @return - A pointer to the statically-allocated string (e.g., -/// "MODIFIER_NONE" for MODIFIER_NONE). -static const char* stringForModifierType(ModifierType mt) { -#define ENUM_ENTRY(n) case n: return #n; - switch(mt) { - default: - llvm_unreachable("Unknown modifier type"); - MODIFIER_TYPES - }; -#undef ENUM_ENTRY -} - DisassemblerTables::DisassemblerTables() { unsigned i; @@ -603,14 +587,6 @@ void DisassemblerTables::emitInstructionInfo(raw_ostream &o, o.indent(i * 2) << "{ /* " << index << " */" << "\n"; i++; - o.indent(i * 2) << stringForModifierType( - (ModifierType)InstructionSpecifiers[index].modifierType); - o << ",\n"; - - o.indent(i * 2) << "0x"; - o << format("%02hhx", (uint16_t)InstructionSpecifiers[index].modifierBase); - o << ",\n"; - OperandListTy OperandList; for (unsigned OperandIndex = 0; OperandIndex < X86_MAX_OPERANDS; ++OperandIndex) { diff --git a/llvm/utils/TableGen/X86RecognizableInstr.cpp b/llvm/utils/TableGen/X86RecognizableInstr.cpp index 4016116de131..15212d3f250b 100644 --- a/llvm/utils/TableGen/X86RecognizableInstr.cpp +++ b/llvm/utils/TableGen/X86RecognizableInstr.cpp @@ -1182,8 +1182,6 @@ void RecognizableInstr::emitDecodePath(DisassemblerTables &tables) const { *filter, UID, Is32Bit, IgnoresVEX_L); } - Spec->modifierType = MODIFIER_NONE; - Spec->modifierBase = opcodeToSet; delete filter;