Use the AttributeSet instead of AttributeWithIndex.
[oota-llvm.git] / utils / TableGen / FixedLenDecoderEmitter.cpp
index b2dc878880908087bf0611b61af190f93381254f..0c3017f38920dd5e2828c478a3ac6ef22a5810cd 100644 (file)
@@ -1866,7 +1866,7 @@ static void emitFieldFromInstruction(formatted_raw_ostream &OS) {
      << "    if (numBits == sizeof(InsnType)*8)\n"
      << "      fieldMask = (InsnType)(-1LL);\n"
      << "    else\n"
-     << "      fieldMask = ((1 << numBits) - 1) << startBit;\n"
+     << "      fieldMask = (((InsnType)1 << numBits) - 1) << startBit;\n"
      << "    return (insn & fieldMask) >> startBit;\n"
      << "}\n\n";
 }