diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-03-01 17:30:35 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-03-01 17:30:35 +0000 |
commit | 194f3fa9eadc7dfe9f1750c16e1c2a8ebe11c88c (patch) | |
tree | 7cae3c194a7719ef4767351b64027420a0ac03a6 /utils/TableGen/AsmMatcherEmitter.cpp | |
parent | 1e33b461b4f6700721e14376c372edd132d29b11 (diff) |
Revert "Emit the SubRegTable with the smallest possible integer type."
This reverts commit 151760.
We want to move getSubReg() from TargetRegisterInfo into MCRegisterInfo,
but to do that, the type of the lookup table needs to be the same for
all targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/AsmMatcherEmitter.cpp')
-rw-r--r-- | utils/TableGen/AsmMatcherEmitter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 88e787cfd2..80467ff3dc 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -2008,6 +2008,15 @@ static bool EmitMnemonicAliases(raw_ostream &OS, const AsmMatcherInfo &Info) { return true; } +static const char *getMinimalTypeForRange(uint64_t Range) { + assert(Range < 0xFFFFFFFFULL && "Enum too large"); + if (Range > 0xFFFF) + return "uint32_t"; + if (Range > 0xFF) + return "uint16_t"; + return "uint8_t"; +} + static void EmitCustomOperandParsing(raw_ostream &OS, CodeGenTarget &Target, const AsmMatcherInfo &Info, StringRef ClassName) { // Emit the static custom operand parsing table; |