[PATCH] D130902: [llvm-objdump,ARM] Fix big-endian AArch32 disassembly.
Simon Tatham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 1 07:57:37 PDT 2022
simon_tatham added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARM.td:748
+ "BigEndianInstructions", "true", "Expect instructions to be stored "
+ "big-endian in memory.">;
+
----------------
DavidSpickett wrote:
> When you say "in memory" here, does it refer to "memory" on the device or "memory" in the object file? I think from the last sentence, you mean inside the object file, which is what objdump cares about.
>
> Because if I had an object file that was going to be byte reversed by the linker then I'd need to disassemble the object file in one endian, but if I was disassembling the content of memory on the device. I'd have to use the opposite endian.
Hmmm. It's true, of course, that when you read a relocatable object file, the endianness in memory //after linking// is not yet specified, because the linker may or may not choose to byte-reverse the instructions and set the BE8 flag. But I had imagined it would be clear that "in memory" here means in the memory that the disassembler is reading from, not the memory on the target!
Do you have a suggested alternative wording that doesn't end up being a whole paragraph? Perhaps just deleting "in memory" would be simplest?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130902/new/
https://reviews.llvm.org/D130902
More information about the llvm-commits
mailing list