diff options
author | Eric Christopher <echristo@apple.com> | 2011-07-11 23:06:52 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-07-11 23:06:52 +0000 |
commit | d568b3f55294917d1cc701da14a8a7daeb6563e6 (patch) | |
tree | 44a2842bc0b635140d86fc4c7896e4ca1e2a6d87 /utils/TableGen/ARMDecoderEmitter.cpp | |
parent | d1c2bd8e6e37e08393f7c4980efc5bcb66b6f0d0 (diff) | |
download | external_llvm-d568b3f55294917d1cc701da14a8a7daeb6563e6.zip external_llvm-d568b3f55294917d1cc701da14a8a7daeb6563e6.tar.gz external_llvm-d568b3f55294917d1cc701da14a8a7daeb6563e6.tar.bz2 |
Revert r134921, 134917, 134908 and 134907. They're causing failures
in multiple buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/ARMDecoderEmitter.cpp')
-rw-r--r-- | utils/TableGen/ARMDecoderEmitter.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/utils/TableGen/ARMDecoderEmitter.cpp b/utils/TableGen/ARMDecoderEmitter.cpp index 3721ed4..8a5dc8b 100644 --- a/utils/TableGen/ARMDecoderEmitter.cpp +++ b/utils/TableGen/ARMDecoderEmitter.cpp @@ -114,7 +114,7 @@ enum { /// byteFromBitsInit - Return the byte value from a BitsInit. /// Called from getByteField(). -static uint8_t byteFromBitsInit(const BitsInit &init) { +static uint8_t byteFromBitsInit(BitsInit &init) { int width = init.getNumBits(); assert(width <= 8 && "Field is too large for uint8_t!"); @@ -125,7 +125,7 @@ static uint8_t byteFromBitsInit(const BitsInit &init) { uint8_t ret = 0; for (index = 0; index < width; index++) { - if (static_cast<const BitInit*>(init.getBit(index))->getValue()) + if (static_cast<BitInit*>(init.getBit(index))->getValue()) ret |= mask; mask <<= 1; @@ -135,12 +135,12 @@ static uint8_t byteFromBitsInit(const BitsInit &init) { } static uint8_t getByteField(const Record &def, const char *str) { - const BitsInit *bits = def.getValueAsBitsInit(str); + BitsInit *bits = def.getValueAsBitsInit(str); return byteFromBitsInit(*bits); } -static const BitsInit &getBitsField(const Record &def, const char *str) { - const BitsInit *bits = def.getValueAsBitsInit(str); +static BitsInit &getBitsField(const Record &def, const char *str) { + BitsInit *bits = def.getValueAsBitsInit(str); return *bits; } @@ -183,15 +183,15 @@ static bool ValueNotSet(bit_value_t V) { static int Value(bit_value_t V) { return ValueNotSet(V) ? -1 : (V == BIT_FALSE ? 0 : 1); } -static bit_value_t bitFromBits(const BitsInit &bits, unsigned index) { - if (const BitInit *bit = dynamic_cast<const BitInit*>(bits.getBit(index))) +static bit_value_t bitFromBits(BitsInit &bits, unsigned index) { + if (BitInit *bit = dynamic_cast<BitInit*>(bits.getBit(index))) return bit->getValue() ? BIT_TRUE : BIT_FALSE; // The bit is uninitialized. return BIT_UNSET; } // Prints the bit value for each position. -static void dumpBits(raw_ostream &o, const BitsInit &bits) { +static void dumpBits(raw_ostream &o, BitsInit &bits) { unsigned index; for (index = bits.getNumBits(); index > 0; index--) { @@ -424,8 +424,7 @@ protected: if (AllInstructions[Opcode]->isPseudo) return; - const BitsInit &Bits = getBitsField(*AllInstructions[Opcode]->TheDef, - "Inst"); + BitsInit &Bits = getBitsField(*AllInstructions[Opcode]->TheDef, "Inst"); for (unsigned i = 0; i < BIT_WIDTH; ++i) Insn[i] = bitFromBits(Bits, i); @@ -1559,7 +1558,7 @@ ARMDEBackend::populateInstruction(const CodeGenInstruction &CGI, const StringRef Name = Def.getName(); uint8_t Form = getByteField(Def, "Form"); - const BitsInit &Bits = getBitsField(Def, "Inst"); + BitsInit &Bits = getBitsField(Def, "Inst"); // If all the bit positions are not specified; do not decode this instruction. // We are bound to fail! For proper disassembly, the well-known encoding bits |