From: Guinevere Larsen via Gdb <gdb@sourceware.org>
To: gdb@sourceware.org
Subject: Question about YMM register availability in x86 CPUs
Date: Wed, 12 Jun 2024 17:31:00 -0300 [thread overview]
Message-ID: <1ea5f9b9-3e73-4d51-ae77-fe0d1f77a161@redhat.com> (raw)
Hello gdb list!
TL;DR: Is it reasonable to assume that all x86 CPUs that have AVX
capabilities will have both XMM and YMM registers?
Some background, I'm trying to implement record full support for AVX and
AVX2 instructions. As part of this effort, I have to decide when we
should record the full YMM (or ZMM if available) and when we should
record just XMM. This had me wondering if I can just decide to always
record YMM registers, or if I need to query avx-capable targets about
whether they have those registers.
At least at some points I am pretty sure I should record the biggest
vector register available since, for example, vmovd/vmovq will overwrite
all higher bits, so we'll lose information if we just use the provided
register instead of recording the full size of register available.
Looking at gdb/amd64-tdep.c, it seems like ymm can be assumed, as on
lines 3193-3197 we seem to set the number of available ymm registers
just by looking for avx, and not checking for avx2 at all, but I wanted
to see if anyone could say for certain, not just me extrapolating from
code I don't really understand :)
--
Cheers,
Guinevere Larsen
She/Her/Hers
next reply other threads:[~2024-06-12 20:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-12 20:31 Guinevere Larsen via Gdb [this message]
2024-06-13 13:19 ` Willgerodt, Felix via Gdb
2024-06-13 14:04 ` Guinevere Larsen via Gdb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ea5f9b9-3e73-4d51-ae77-fe0d1f77a161@redhat.com \
--to=gdb@sourceware.org \
--cc=blarsen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox