diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-14 19:59:24 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-14 19:59:24 +0000 |
commit | e44313e0ca7ca3504dd9dc906e2eff8b36bc4ee4 (patch) | |
tree | 8fb617cf72a46286750e2366e576df23f8b3fece | |
parent | dac19a7951e7b8ce62f311dee208936e60e02516 (diff) | |
download | llvm-e44313e0ca7ca3504dd9dc906e2eff8b36bc4ee4.tar.gz llvm-e44313e0ca7ca3504dd9dc906e2eff8b36bc4ee4.tar.bz2 llvm-e44313e0ca7ca3504dd9dc906e2eff8b36bc4ee4.tar.xz |
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
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 2 | ||||
-rw-r--r-- | test/MC/AsmParser/directive_ascii.s | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index 41f88334e2..273b17d3c2 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -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) { diff --git a/test/MC/AsmParser/directive_ascii.s b/test/MC/AsmParser/directive_ascii.s index 68328f51c8..cc6d23b751 100644 --- a/test/MC/AsmParser/directive_ascii.s +++ b/test/MC/AsmParser/directive_ascii.s @@ -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 |