mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-06 20:30:08 +00:00
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
This commit is contained in:
parent
924ac6dc0c
commit
5cfd40ccd4
@ -541,9 +541,6 @@ typedef enum {
|
|||||||
* its operands.
|
* its operands.
|
||||||
*/
|
*/
|
||||||
struct InstructionSpecifier {
|
struct InstructionSpecifier {
|
||||||
uint8_t modifierType;
|
|
||||||
uint8_t modifierBase;
|
|
||||||
|
|
||||||
/* The macro below must be defined wherever this file is included. */
|
/* The macro below must be defined wherever this file is included. */
|
||||||
INSTRUCTION_SPECIFIER_FIELDS
|
INSTRUCTION_SPECIFIER_FIELDS
|
||||||
};
|
};
|
||||||
|
@ -23,8 +23,6 @@
|
|||||||
filtered = false; \
|
filtered = false; \
|
||||||
insnContext = IC; \
|
insnContext = IC; \
|
||||||
name = ""; \
|
name = ""; \
|
||||||
modifierType = MODIFIER_NONE; \
|
|
||||||
modifierBase = 0; \
|
|
||||||
memset(operands, 0, sizeof(operands)); \
|
memset(operands, 0, sizeof(operands)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -362,22 +362,6 @@ static const char* stringForDecisionType(ModRMDecisionType dt) {
|
|||||||
#undef ENUM_ENTRY
|
#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() {
|
DisassemblerTables::DisassemblerTables() {
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
@ -603,14 +587,6 @@ void DisassemblerTables::emitInstructionInfo(raw_ostream &o,
|
|||||||
o.indent(i * 2) << "{ /* " << index << " */" << "\n";
|
o.indent(i * 2) << "{ /* " << index << " */" << "\n";
|
||||||
i++;
|
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;
|
OperandListTy OperandList;
|
||||||
for (unsigned OperandIndex = 0; OperandIndex < X86_MAX_OPERANDS;
|
for (unsigned OperandIndex = 0; OperandIndex < X86_MAX_OPERANDS;
|
||||||
++OperandIndex) {
|
++OperandIndex) {
|
||||||
|
@ -1182,8 +1182,6 @@ void RecognizableInstr::emitDecodePath(DisassemblerTables &tables) const {
|
|||||||
*filter,
|
*filter,
|
||||||
UID, Is32Bit, IgnoresVEX_L);
|
UID, Is32Bit, IgnoresVEX_L);
|
||||||
}
|
}
|
||||||
Spec->modifierType = MODIFIER_NONE;
|
|
||||||
Spec->modifierBase = opcodeToSet;
|
|
||||||
|
|
||||||
delete filter;
|
delete filter;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user