The clause in `dumpARMELFData` that dumps a single byte as a `.byte`
directive was printing the operand of that directive as `Bytes[0]`,
not `Bytes[Index]`. In particular, this led to the `dumpBytes` output
to its left not matching it!
Reviewed By: DavidSpickett
Differential Revision: https://reviews.llvm.org/D130360
.section .myothersection,"ax",@progbits
adrp x1,mystr
mystr:
- .asciz "blah"
+ .ascii "blah"
.size mystr, 4
+ .byte 0x9a
# CHECK: Disassembly of section .mysection:
# CHECK: <_start>:
# CHECK: 0: 01 00 00 90 adrp x1, 0x0
# CHECK: <mystr>:
# CHECK: 4: 62 6c 61 68 .word
-# CHECK: 8: 00 .byte 0x01
+# CHECK: 8: 9a .byte 0x9a
return 2;
}
dumpBytes(Bytes.slice(Index, 1), OS);
- OS << "\t\t.byte\t" << format_hex(Bytes[0], 4);
+ OS << "\t\t.byte\t" << format_hex(Bytes[Index], 4);
return 1;
}