gdb XML type for SME ZA storage

Peter Maydell via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAFEAcA_A-K7X9ntGjJ8TN5q9J6oYO50LdSrxfMchAM1G2KTq-w@mail.gmail.com>
Hi; in implementing the QEMU gdbstub handling for SME registers,
we're not sure about the right type for the ZA storage. The docs say

https://sourceware.org/gdb/current/onlinedocs/gdb.html/AArch64-Features.html#AArch64-SME-registers-feature

"- ZA is a register represented by a vector of svlxsvl bytes."

but the code does this:

  /* Byte type.  */
  element_type = tdesc_named_type (feature, "uint8");
  /* Vector of bytes.  */
  element_type = tdesc_create_vector (feature, "sme_bv", element_type,
                                      svl);
  /* Vector of vector of bytes (Matrix).  */
  element_type = tdesc_create_vector (feature, "sme_bvv", element_type,
                                      svl);

  /* The following is the ZA register set.  */
  tdesc_create_reg (feature, "za", regnum++, 1, nullptr,
                    std::pow (svl, 2) * 8, "sme_bvv");

which looks like it sets up the XML as a vector of a vector of bytes,
rather than a simple vector of bytes. (I did want to try to run
gdbserver to dump the actual XML it outputs, but wasn't able to
get a working setup for that.)

Are the docs wrong, or the code, or are "vector of N*N bytes" and
"vector of N vectors of N bytes" the same type as far as GDB is
concerned, such that it doesn't matter which one the stub reports
in the XML ?

thanks
-- PMM
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.