Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: <gdb-patches@sourceware.org>, <tromey@adacore.com>
Subject: [PATCH] [aarch64] Use SVE_VQ_BYTES instead of __SVE_VQ_BYTES
Date: Fri, 13 Oct 2023 16:26:55 +0100	[thread overview]
Message-ID: <20231013152655.2435663-1-luis.machado@arm.com> (raw)

__SVE_VQ_BYTES is only available if SVE definitions are available in
the system's headers, and this is not true for all systems.

For this purpose, we define SVE_VQ_BYTES.  This patch fixes the
name of the constant being used.

---
 gdb/nat/aarch64-scalable-linux-sigcontext.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/nat/aarch64-scalable-linux-sigcontext.h b/gdb/nat/aarch64-scalable-linux-sigcontext.h
index 18623443744..7c858294ac9 100644
--- a/gdb/nat/aarch64-scalable-linux-sigcontext.h
+++ b/gdb/nat/aarch64-scalable-linux-sigcontext.h
@@ -301,8 +301,8 @@ struct user_za_header {
 
 /* Offset from the start of struct user_za_header to the register data */
 #define ZA_PT_ZA_OFFSET						  \
-	((sizeof (struct user_za_header) + (__SVE_VQ_BYTES - 1))  \
-		/ __SVE_VQ_BYTES * __SVE_VQ_BYTES)
+	((sizeof (struct user_za_header) + (SVE_VQ_BYTES - 1))  \
+		/ SVE_VQ_BYTES * SVE_VQ_BYTES)
 
 /* The payload starts at offset ZA_PT_ZA_OFFSET, and is of size
    ZA_PT_ZA_SIZE(vq, flags).
@@ -317,9 +317,9 @@ struct user_za_header {
    systems: see sigcontext.h for more explanation.  */
 
 #define ZA_PT_ZAV_OFFSET(vq, n)				\
-	(ZA_PT_ZA_OFFSET + ((vq * __SVE_VQ_BYTES) * n))
+	(ZA_PT_ZA_OFFSET + ((vq * SVE_VQ_BYTES) * n))
 
-#define ZA_PT_ZA_SIZE(vq) ((vq * __SVE_VQ_BYTES) * (vq * __SVE_VQ_BYTES))
+#define ZA_PT_ZA_SIZE(vq) ((vq * SVE_VQ_BYTES) * (vq * SVE_VQ_BYTES))
 
 #define ZA_PT_SIZE(vq)			      \
 	(ZA_PT_ZA_OFFSET + ZA_PT_ZA_SIZE(vq))
-- 
2.25.1


             reply	other threads:[~2023-10-13 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 15:26 Luis Machado [this message]
2023-10-13 15:28 ` Luis Machado
2023-10-16 14:12   ` Tom Tromey

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=20231013152655.2435663-1-luis.machado@arm.com \
    --to=luis.machado@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.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