summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-02-19 05:34:21 +0000
committerCraig Topper <craig.topper@gmail.com>2014-02-19 05:34:21 +0000
commit82a644adf2c1241e02ff820c496314da33a3c821 (patch)
treeb1870b03f2b63aee48b57c16f95e5eb17e0be317 /utils
parentb7e1ab795944263b663593085f7fee404f72475f (diff)
downloadllvm-82a644adf2c1241e02ff820c496314da33a3c821.tar.gz
llvm-82a644adf2c1241e02ff820c496314da33a3c821.tar.bz2
llvm-82a644adf2c1241e02ff820c496314da33a3c821.tar.xz
Remove A6/A7 opcode maps. They can all be handled with a TB map, opcode of 0xa6/0xa7, and adding MRM_C0/MRM_E0 forms. Removes 376K from the disassembler tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/X86DisassemblerTables.cpp8
-rw-r--r--utils/TableGen/X86DisassemblerTables.h13
-rw-r--r--utils/TableGen/X86RecognizableInstr.cpp13
3 files changed, 14 insertions, 20 deletions
diff --git a/utils/TableGen/X86DisassemblerTables.cpp b/utils/TableGen/X86DisassemblerTables.cpp
index 4d81d06e39..17773bb6a3 100644
--- a/utils/TableGen/X86DisassemblerTables.cpp
+++ b/utils/TableGen/X86DisassemblerTables.cpp
@@ -737,11 +737,9 @@ void DisassemblerTables::emitContextDecisions(raw_ostream &o1, raw_ostream &o2,
emitContextDecision(o1, o2, i1, i2, ModRMTableNum, *Tables[1], TWOBYTE_STR);
emitContextDecision(o1, o2, i1, i2, ModRMTableNum, *Tables[2], THREEBYTE38_STR);
emitContextDecision(o1, o2, i1, i2, ModRMTableNum, *Tables[3], THREEBYTE3A_STR);
- emitContextDecision(o1, o2, i1, i2, ModRMTableNum, *Tables[4], THREEBYTEA6_STR);
- emitContextDecision(o1, o2, i1, i2, ModRMTableNum, *Tables[5], THREEBYTEA7_STR);
- emitContextDecision(o1, o2, i1, i2, ModRMTableNum, *Tables[6], XOP8_MAP_STR);
- emitContextDecision(o1, o2, i1, i2, ModRMTableNum, *Tables[7], XOP9_MAP_STR);
- emitContextDecision(o1, o2, i1, i2, ModRMTableNum, *Tables[8], XOPA_MAP_STR);
+ emitContextDecision(o1, o2, i1, i2, ModRMTableNum, *Tables[4], XOP8_MAP_STR);
+ emitContextDecision(o1, o2, i1, i2, ModRMTableNum, *Tables[5], XOP9_MAP_STR);
+ emitContextDecision(o1, o2, i1, i2, ModRMTableNum, *Tables[6], XOPA_MAP_STR);
}
void DisassemblerTables::emit(raw_ostream &o) const {
diff --git a/utils/TableGen/X86DisassemblerTables.h b/utils/TableGen/X86DisassemblerTables.h
index bf8b1271e9..1327375f79 100644
--- a/utils/TableGen/X86DisassemblerTables.h
+++ b/utils/TableGen/X86DisassemblerTables.h
@@ -38,12 +38,10 @@ private:
/// [1] two-byte opcodes of the form 0f __
/// [2] three-byte opcodes of the form 0f 38 __
/// [3] three-byte opcodes of the form 0f 3a __
- /// [4] three-byte opcodes of the form 0f a6 __
- /// [5] three-byte opcodes of the form 0f a7 __
- /// [6] XOP8 map opcode
- /// [7] XOP9 map opcode
- /// [8] XOPA map opcode
- ContextDecision* Tables[9];
+ /// [4] XOP8 map opcode
+ /// [5] XOP9 map opcode
+ /// [6] XOPA map opcode
+ ContextDecision* Tables[7];
// Table of ModRM encodings.
typedef std::map<std::vector<unsigned>, unsigned> ModRMMapTy;
@@ -132,8 +130,7 @@ private:
/// }
///
/// NAME is the name of the ContextDecision (typically one of the four names
- /// ONEBYTE_SYM, TWOBYTE_SYM, THREEBYTE38_SYM, THREEBYTE3A_SYM,
- /// THREEBYTEA6_SYM, and THREEBYTEA7_SYM from
+ /// ONEBYTE_SYM, TWOBYTE_SYM, THREEBYTE38_SYM, THREEBYTE3A_SYM from
/// X86DisassemblerDecoderCommon.h).
/// IC is one of the contexts in InstructionContext. There is an opcode
/// decision for each possible context.
diff --git a/utils/TableGen/X86RecognizableInstr.cpp b/utils/TableGen/X86RecognizableInstr.cpp
index 70852e84de..1b5b965892 100644
--- a/utils/TableGen/X86RecognizableInstr.cpp
+++ b/utils/TableGen/X86RecognizableInstr.cpp
@@ -23,6 +23,7 @@
using namespace llvm;
#define MRM_MAPPING \
+ MAP(C0, 32) \
MAP(C1, 33) \
MAP(C2, 34) \
MAP(C3, 35) \
@@ -47,7 +48,8 @@ using namespace llvm;
MAP(DC, 56) \
MAP(DD, 57) \
MAP(DE, 58) \
- MAP(DF, 59)
+ MAP(DF, 59) \
+ MAP(E0, 60)
// A clone of X86 since we can't depend on something that is generated.
namespace X86Local {
@@ -79,8 +81,7 @@ namespace X86Local {
enum {
OB = 0, TB = 1, T8 = 2, TA = 3, XOP8 = 4, XOP9 = 5, XOPA = 6,
D8 = 7, D9 = 8, DA = 9, DB = 10,
- DC = 11, DD = 12, DE = 13, DF = 14,
- A6 = 15, A7 = 16
+ DC = 11, DD = 12, DE = 13, DF = 14
};
enum {
@@ -731,6 +732,7 @@ void RecognizableInstr::emitInstructionSpecifier() {
HANDLE_OPERAND(relocation)
}
break;
+ case X86Local::MRM_C0:
case X86Local::MRM_C1:
case X86Local::MRM_C2:
case X86Local::MRM_C3:
@@ -755,6 +757,7 @@ void RecognizableInstr::emitInstructionSpecifier() {
case X86Local::MRM_DD:
case X86Local::MRM_DE:
case X86Local::MRM_DF:
+ case X86Local::MRM_E0:
// Ignored.
break;
}
@@ -782,8 +785,6 @@ void RecognizableInstr::emitDecodePath(DisassemblerTables &tables) const {
case X86Local::TB:
case X86Local::T8:
case X86Local::TA:
- case X86Local::A6:
- case X86Local::A7:
case X86Local::XOP8:
case X86Local::XOP9:
case X86Local::XOPA:
@@ -793,8 +794,6 @@ void RecognizableInstr::emitDecodePath(DisassemblerTables &tables) const {
case X86Local::TB: opcodeType = TWOBYTE; break;
case X86Local::T8: opcodeType = THREEBYTE_38; break;
case X86Local::TA: opcodeType = THREEBYTE_3A; break;
- case X86Local::A6: opcodeType = THREEBYTE_A6; break;
- case X86Local::A7: opcodeType = THREEBYTE_A7; break;
case X86Local::XOP8: opcodeType = XOP8_MAP; break;
case X86Local::XOP9: opcodeType = XOP9_MAP; break;
case X86Local::XOPA: opcodeType = XOPA_MAP; break;