projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[TableGen] Use 'size_t' instead of 'unsigned' to better match the argument types...
[oota-llvm.git]
/
utils
/
TableGen
/
X86DisassemblerTables.cpp
diff --git
a/utils/TableGen/X86DisassemblerTables.cpp
b/utils/TableGen/X86DisassemblerTables.cpp
index 9d55d1427f785318c2737c614aec28309aad5d8f..ad36dc427a562a1c954c8677aea38cfb00f5a435 100644
(file)
--- a/
utils/TableGen/X86DisassemblerTables.cpp
+++ b/
utils/TableGen/X86DisassemblerTables.cpp
@@
-243,6
+243,9
@@
static inline bool inheritsFrom(InstructionContext child,
case IC_EVEX_OPSIZE_KZ_B:
return false;
case IC_EVEX_W_K:
case IC_EVEX_OPSIZE_KZ_B:
return false;
case IC_EVEX_W_K:
+ case IC_EVEX_W_B:
+ case IC_EVEX_W_K_B:
+ case IC_EVEX_W_KZ_B:
case IC_EVEX_W_XS_K:
case IC_EVEX_W_XD_K:
case IC_EVEX_W_OPSIZE_K:
case IC_EVEX_W_XS_K:
case IC_EVEX_W_XD_K:
case IC_EVEX_W_OPSIZE_K:
@@
-252,6
+255,8
@@
static inline bool inheritsFrom(InstructionContext child,
case IC_EVEX_L_K:
case IC_EVEX_L_XS_K:
case IC_EVEX_L_XD_K:
case IC_EVEX_L_K:
case IC_EVEX_L_XS_K:
case IC_EVEX_L_XD_K:
+ case IC_EVEX_L_XD_B:
+ case IC_EVEX_L_XD_K_B:
case IC_EVEX_L_OPSIZE_K:
case IC_EVEX_L_OPSIZE_B:
case IC_EVEX_L_OPSIZE_K_B:
case IC_EVEX_L_OPSIZE_K:
case IC_EVEX_L_OPSIZE_B:
case IC_EVEX_L_OPSIZE_K_B:
@@
-270,19
+275,32
@@
static inline bool inheritsFrom(InstructionContext child,
return false;
case IC_EVEX_L_KZ:
case IC_EVEX_L_XS_KZ:
return false;
case IC_EVEX_L_KZ:
case IC_EVEX_L_XS_KZ:
+ case IC_EVEX_L_XS_B:
+ case IC_EVEX_L_XS_K_B:
+ case IC_EVEX_L_XS_KZ_B:
case IC_EVEX_L_XD_KZ:
case IC_EVEX_L_XD_KZ:
+ case IC_EVEX_L_XD_KZ_B:
case IC_EVEX_L_OPSIZE_KZ:
case IC_EVEX_L_OPSIZE_KZ_B:
return false;
case IC_EVEX_L_W_K:
case IC_EVEX_L_OPSIZE_KZ:
case IC_EVEX_L_OPSIZE_KZ_B:
return false;
case IC_EVEX_L_W_K:
+ case IC_EVEX_L_W_B:
+ case IC_EVEX_L_W_K_B:
case IC_EVEX_L_W_XS_K:
case IC_EVEX_L_W_XS_K:
- case IC_EVEX_L_W_XD_K:
+ case IC_EVEX_L_W_XS_B:
+ case IC_EVEX_L_W_XS_K_B:
+ case IC_EVEX_L_W_XS_KZ:
+ case IC_EVEX_L_W_XS_KZ_B:
case IC_EVEX_L_W_OPSIZE_K:
case IC_EVEX_L_W_OPSIZE_B:
case IC_EVEX_L_W_OPSIZE_K_B:
case IC_EVEX_L_W_KZ:
case IC_EVEX_L_W_OPSIZE_K:
case IC_EVEX_L_W_OPSIZE_B:
case IC_EVEX_L_W_OPSIZE_K_B:
case IC_EVEX_L_W_KZ:
- case IC_EVEX_L_W_XS_KZ:
+ case IC_EVEX_L_W_KZ_B:
+ case IC_EVEX_L_W_XD_K:
+ case IC_EVEX_L_W_XD_B:
+ case IC_EVEX_L_W_XD_K_B:
case IC_EVEX_L_W_XD_KZ:
case IC_EVEX_L_W_XD_KZ:
+ case IC_EVEX_L_W_XD_KZ_B:
case IC_EVEX_L_W_OPSIZE_KZ:
case IC_EVEX_L_W_OPSIZE_KZ_B:
return false;
case IC_EVEX_L_W_OPSIZE_KZ:
case IC_EVEX_L_W_OPSIZE_KZ_B:
return false;
@@
-291,21
+309,29
@@
static inline bool inheritsFrom(InstructionContext child,
case IC_EVEX_L2_K_B:
case IC_EVEX_L2_KZ_B:
case IC_EVEX_L2_XS_K:
case IC_EVEX_L2_K_B:
case IC_EVEX_L2_KZ_B:
case IC_EVEX_L2_XS_K:
+ case IC_EVEX_L2_XS_K_B:
case IC_EVEX_L2_XS_B:
case IC_EVEX_L2_XD_B:
case IC_EVEX_L2_XD_K:
case IC_EVEX_L2_XS_B:
case IC_EVEX_L2_XD_B:
case IC_EVEX_L2_XD_K:
+ case IC_EVEX_L2_XD_K_B:
case IC_EVEX_L2_OPSIZE_K:
case IC_EVEX_L2_OPSIZE_B:
case IC_EVEX_L2_OPSIZE_K_B:
case IC_EVEX_L2_KZ:
case IC_EVEX_L2_XS_KZ:
case IC_EVEX_L2_OPSIZE_K:
case IC_EVEX_L2_OPSIZE_B:
case IC_EVEX_L2_OPSIZE_K_B:
case IC_EVEX_L2_KZ:
case IC_EVEX_L2_XS_KZ:
+ case IC_EVEX_L2_XS_KZ_B:
case IC_EVEX_L2_XD_KZ:
case IC_EVEX_L2_XD_KZ:
+ case IC_EVEX_L2_XD_KZ_B:
case IC_EVEX_L2_OPSIZE_KZ:
case IC_EVEX_L2_OPSIZE_KZ_B:
return false;
case IC_EVEX_L2_W_K:
case IC_EVEX_L2_W_B:
case IC_EVEX_L2_OPSIZE_KZ:
case IC_EVEX_L2_OPSIZE_KZ_B:
return false;
case IC_EVEX_L2_W_K:
case IC_EVEX_L2_W_B:
+ case IC_EVEX_L2_W_K_B:
+ case IC_EVEX_L2_W_KZ_B:
case IC_EVEX_L2_W_XS_K:
case IC_EVEX_L2_W_XS_K:
+ case IC_EVEX_L2_W_XS_B:
+ case IC_EVEX_L2_W_XS_K_B:
case IC_EVEX_L2_W_XD_K:
case IC_EVEX_L2_W_XD_B:
case IC_EVEX_L2_W_OPSIZE_K:
case IC_EVEX_L2_W_XD_K:
case IC_EVEX_L2_W_XD_B:
case IC_EVEX_L2_W_OPSIZE_K:
@@
-313,7
+339,10
@@
static inline bool inheritsFrom(InstructionContext child,
case IC_EVEX_L2_W_OPSIZE_K_B:
case IC_EVEX_L2_W_KZ:
case IC_EVEX_L2_W_XS_KZ:
case IC_EVEX_L2_W_OPSIZE_K_B:
case IC_EVEX_L2_W_KZ:
case IC_EVEX_L2_W_XS_KZ:
+ case IC_EVEX_L2_W_XS_KZ_B:
case IC_EVEX_L2_W_XD_KZ:
case IC_EVEX_L2_W_XD_KZ:
+ case IC_EVEX_L2_W_XD_K_B:
+ case IC_EVEX_L2_W_XD_KZ_B:
case IC_EVEX_L2_W_OPSIZE_KZ:
case IC_EVEX_L2_W_OPSIZE_KZ_B:
return false;
case IC_EVEX_L2_W_OPSIZE_KZ:
case IC_EVEX_L2_W_OPSIZE_KZ_B:
return false;
@@
-597,7
+626,8
@@
void DisassemblerTables::emitInstructionInfo(raw_ostream &o,
o << "static const struct OperandSpecifier x86OperandSets[]["
<< X86_MAX_OPERANDS << "] = {\n";
o << "static const struct OperandSpecifier x86OperandSets[]["
<< X86_MAX_OPERANDS << "] = {\n";
- typedef std::vector<std::pair<OperandEncoding, OperandType> > OperandListTy;
+ typedef SmallVector<std::pair<OperandEncoding, OperandType>,
+ X86_MAX_OPERANDS> OperandListTy;
std::map<OperandListTy, unsigned> OperandSets;
unsigned OperandSetNum = 0;
std::map<OperandListTy, unsigned> OperandSets;
unsigned OperandSetNum = 0;
@@
-633,7
+663,7
@@
void DisassemblerTables::emitInstructionInfo(raw_ostream &o,
i++;
for (unsigned index = 0; index < NumInstructions; ++index) {
i++;
for (unsigned index = 0; index < NumInstructions; ++index) {
- o.indent(i * 2) << "{ /* " << index << " */
" << "
\n";
+ o.indent(i * 2) << "{ /* " << index << " */\n";
i++;
OperandListTy OperandList;
i++;
OperandListTy OperandList;
@@
-647,16
+677,10
@@
void DisassemblerTables::emitInstructionInfo(raw_ostream &o,
}
o.indent(i * 2) << (OperandSets[OperandList] - 1) << ",\n";
}
o.indent(i * 2) << (OperandSets[OperandList] - 1) << ",\n";
- o.indent(i * 2) << "/* " << InstructionSpecifiers[index].name << " */";
- o << "\n";
+ o.indent(i * 2) << "/* " << InstructionSpecifiers[index].name << " */\n";
i--;
i--;
- o.indent(i * 2) << "}";
-
- if (index + 1 < NumInstructions)
- o << ",";
-
- o << "\n";
+ o.indent(i * 2) << "},\n";
}
i--;
}
i--;