diff options
| author | Jay Foad <jay.foad@gmail.com> | 2011-06-23 09:09:15 +0000 |
|---|---|---|
| committer | Jay Foad <jay.foad@gmail.com> | 2011-06-23 09:09:15 +0000 |
| commit | 61ea0e469254e0c7ab0e190b463d994b9316846c (patch) | |
| tree | 4a3a7f1235a5366dc6d5c41a4edf7b8b86b15b87 /llvm/lib/MC/MCAsmStreamer.cpp | |
| parent | 25fbb92320fac0a9982d03cc1b00973440d4d475 (diff) | |
| download | bcm5719-llvm-61ea0e469254e0c7ab0e190b463d994b9316846c.tar.gz bcm5719-llvm-61ea0e469254e0c7ab0e190b463d994b9316846c.zip | |
Reinstate r133513 (reverted in r133700) with an additional fix for a
-Wshorten-64-to-32 warning in Instructions.h.
llvm-svn: 133708
Diffstat (limited to 'llvm/lib/MC/MCAsmStreamer.cpp')
| -rw-r--r-- | llvm/lib/MC/MCAsmStreamer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index 54e6b5d9b94..acf77558c33 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -1119,7 +1119,7 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst) { } else { // Otherwise, write out in binary. OS << "0b"; - for (int j = 7; j >= 0; j--) { + for (unsigned j = 8; j--;) { unsigned Bit = (Code[i] >> j) & 1; unsigned FixupBit; @@ -1128,9 +1128,9 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst) { else FixupBit = i * 8 + (7-j); - if (uint8_t FixupMapEntry = FixupMap[FixupBit]) { - //assert(Bit == 0 && "Encoder wrote into fixed up bit!"); - OS << char('A' + FixupMapEntry - 1); + if (uint8_t MapEntry = FixupMap[FixupBit]) { + assert(Bit == 0 && "Encoder wrote into fixed up bit!"); + OS << char('A' + MapEntry - 1); } else OS << Bit; } |

