llvm-mc: Fix bugs where bytes were unintentionally being printed as signed.
- We now print all of 403.gcc cleanly (llvm-mc -> 'as' as diffed to 'as'), minus two
'rep;movsl' instructions (which I missed before).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79031 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp
index 41f8833..273b17d 100644
--- a/lib/MC/MCAsmStreamer.cpp
+++ b/lib/MC/MCAsmStreamer.cpp
@@ -210,7 +210,7 @@
void MCAsmStreamer::EmitBytes(const StringRef &Data) {
assert(CurSection && "Cannot emit contents before setting section!");
for (unsigned i = 0, e = Data.size(); i != e; ++i)
- OS << ".byte " << (unsigned) Data[i] << '\n';
+ OS << ".byte " << (unsigned) (unsigned char) Data[i] << '\n';
}
void MCAsmStreamer::EmitValue(const MCValue &Value, unsigned Size) {