diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2011-01-13 21:45:26 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2011-01-13 21:45:26 +0000 |
| commit | 0447d30939b6c1b04e9a057f9fd771ec1aa24556 (patch) | |
| tree | 1030817f84027ddc2762843edec1793dec08e363 /llvm | |
| parent | f59e80e0ed35679cbe80546a69f8f8f44a1eb03a (diff) | |
| download | bcm5719-llvm-0447d30939b6c1b04e9a057f9fd771ec1aa24556.tar.gz bcm5719-llvm-0447d30939b6c1b04e9a057f9fd771ec1aa24556.zip | |
Relax an assertion. On archs like ARM, an immediate field may be scattered. So it's possible for some bits of every 8 bits to be encoded already, and the rest still needs to be fixed up.
llvm-svn: 123403
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/MC/MCAsmStreamer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index f8c3a8acae7..109572471de 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -824,8 +824,12 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst) { if (MapEntry == 0) { OS << format("0x%02x", uint8_t(Code[i])); } else { - assert(Code[i] == 0 && "Encoder wrote into fixed up bit!"); - OS << char('A' + MapEntry - 1); + if (Code[i]) { + // some of the 8 bits require fix up. + OS << format("0x%02x", uint8_t(Code[i])) << '\'' + << char('A' + MapEntry - 1) << '\''; + } else + OS << char('A' + MapEntry - 1); } } else { // Otherwise, write out in binary. |

