1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

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).

llvm-svn: 79031
This commit is contained in:
Daniel Dunbar 2009-08-14 19:59:24 +00:00
parent 4acb0629da
commit 3c9ab92a24
2 changed files with 3 additions and 2 deletions

View File

@ -210,7 +210,7 @@ void MCAsmStreamer::EmitZerofill(MCSection *Section, MCSymbol *Symbol,
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) {

View File

@ -31,9 +31,10 @@ TEST3:
# 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