[llvm-commits] [llvm] r79031 - in /llvm/trunk: lib/MC/MCAsmStreamer.cpp test/MC/AsmParser/directive_ascii.s
Daniel Dunbar
daniel at zuster.org
Fri Aug 14 12:59:25 PDT 2009
Author: ddunbar
Date: Fri Aug 14 14:59:24 2009
New Revision: 79031
URL: http://llvm.org/viewvc/llvm-project?rev=79031&view=rev
Log:
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).
Modified:
llvm/trunk/lib/MC/MCAsmStreamer.cpp
llvm/trunk/test/MC/AsmParser/directive_ascii.s
Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=79031&r1=79030&r2=79031&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Fri Aug 14 14:59:24 2009
@@ -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) {
Modified: llvm/trunk/test/MC/AsmParser/directive_ascii.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/directive_ascii.s?rev=79031&r1=79030&r2=79031&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/directive_ascii.s (original)
+++ llvm/trunk/test/MC/AsmParser/directive_ascii.s Fri Aug 14 14:59:24 2009
@@ -31,9 +31,10 @@
# CHECK: .byte 1
# CHECK: .byte 0
# CHECK: .byte 49
+# CHECK: .byte 128
# CHECK: .byte 0
TEST4:
- .ascii "\1\01\07\08\001\0001\b\0"
+ .ascii "\1\01\07\08\001\0001\200\0"
# CHECK: TEST5:
# CHECK: .byte 8
More information about the llvm-commits
mailing list