On Mon, 14 Jul 2025 at 18:44, Vacha Bhavsar <vacha.bhav...@oss.qualcomm.com> wrote: > Regarding your question on whether the code handling the reading of the ZA > storage would work on a big-endian host, I believe it would. I think this > also applies to the pre-existing SVE code as well, based off of what I have > read from this GDB documentation > (https://sourceware.org/gdb/download/onlinedocs/gdb#Packets) which states the > following: > > ‘P n…=r…’ > Write register n… with value r…. The register number n is in hexadecimal, and > r… contains two hex digits for each byte in the register (target byte order). > > From this, I believe the QEMU GDB stub is already expecting the register > content in target byte order, leaving this responsibility to the client. > Based on this, I believe the pre-existing SVE code and my SME code should > correctly work on big-endian hosts.
"target byte order" from gdb's point of view means "the byte order of the guest, i.e. arm", which is always little endian. This is not the same as the order of bytes within a uint64_t in QEMU's CPU struct, which is host byte order. -- PMM