[llvm] [llvm-mc] Add --hex to disassemble hex pairs (PR #119992)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 14 18:00:03 PST 2024


MaskRay wrote:

> Maybe require hex pairs to be space separated? Otherwise a sequence of pairs looks like a single hex number and may cause confusion regarding endianness.

Thanks for the quick response. Actually, it's intentional to make spaces optional. The hex pair form is used by tools like `xxd -p` (`xxd -p -r`) and rz-asm.

To interpret 0x12345678 as 0x78 0x56 0x34 0x12, we can keep using the existing functionality, or add another option if there is sufficient demand (I personally I don't think it is useful; easily misused as the length is not clear).

https://github.com/llvm/llvm-project/pull/119992


More information about the llvm-commits mailing list