Thumb's forced-PC-alignment requirement applies to the _total_ displacement, not...
[oota-llvm.git] / lib / MC / MCStreamer.cpp
index 6f9692d22740c675770a404fed06455a8601d07b..076b4d608cbc8f21abbccf8e48160251ec04475a 100644 (file)
@@ -48,7 +48,8 @@ void MCStreamer::EmitDwarfSetLineAddr(int64_t LineDelta,
 void MCStreamer::EmitIntValue(uint64_t Value, unsigned Size,
                               unsigned AddrSpace) {
   assert(Size <= 8 && "Invalid size");
-  assert(!(Size == 1 && (signed)Value > 255) && "Invalid size");
+  assert((isUIntN(8 * Size, Value) || isIntN(8 * Size, Value)) &&
+         "Invalid size");
   char buf[8];
   // FIXME: Endianness assumption.
   for (unsigned i = 0; i != Size; ++i)