mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
correct the fixup comment printer to work on big endian platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119122 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7192eb8732
commit
3170a3bc04
@ -692,7 +692,14 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst) {
|
|||||||
OS << "0b";
|
OS << "0b";
|
||||||
for (unsigned j = 8; j--;) {
|
for (unsigned j = 8; j--;) {
|
||||||
unsigned Bit = (Code[i] >> j) & 1;
|
unsigned Bit = (Code[i] >> j) & 1;
|
||||||
if (uint8_t MapEntry = FixupMap[i * 8 + j]) {
|
|
||||||
|
unsigned FixupBit;
|
||||||
|
if (IsLittleEndian)
|
||||||
|
FixupBit = i * 8 + j;
|
||||||
|
else
|
||||||
|
FixupBit = i * 8 + (7-j);
|
||||||
|
|
||||||
|
if (uint8_t MapEntry = FixupMap[FixupBit]) {
|
||||||
assert(Bit == 0 && "Encoder wrote into fixed up bit!");
|
assert(Bit == 0 && "Encoder wrote into fixed up bit!");
|
||||||
OS << char('A' + MapEntry - 1);
|
OS << char('A' + MapEntry - 1);
|
||||||
} else
|
} else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user