Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] [aarch64] Use SVE_VQ_BYTES instead of __SVE_VQ_BYTES
@ 2023-10-13 15:26 Luis Machado
  2023-10-13 15:28 ` Luis Machado
  0 siblings, 1 reply; 3+ messages in thread
From: Luis Machado @ 2023-10-13 15:26 UTC (permalink / raw)
  To: gdb-patches, tromey

__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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-16 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-13 15:26 [PATCH] [aarch64] Use SVE_VQ_BYTES instead of __SVE_VQ_BYTES Luis Machado
2023-10-13 15:28 ` Luis Machado
2023-10-16 14:12   ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox