From: Felix Willgerodt <felix.willgerodt@intel.com>
To: gdb-patches@sourceware.org
Cc: Aleksandar Paunovic <aleksandar.paunovic@intel.com>
Subject: [PATCH 1/4] gdb: define int512 and uint512 as built-in types.
Date: Fri, 6 May 2022 14:12:23 +0200 [thread overview]
Message-ID: <20220506121226.137608-2-felix.willgerodt@intel.com> (raw)
In-Reply-To: <20220506121226.137608-1-felix.willgerodt@intel.com>
From: Aleksandar Paunovic <aleksandar.paunovic@intel.com>
Allow using int512 and uint512 as built-in types, particularly
for the target descriptions.
---
gdb/doc/gdb.texinfo | 2 ++
gdb/gdbtypes.c | 4 ++++
gdb/gdbtypes.h | 2 ++
gdb/target-descriptions.c | 6 ++++++
gdbsupport/tdesc.cc | 2 ++
gdbsupport/tdesc.h | 2 ++
6 files changed, 18 insertions(+)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 38ad2ac32b0..3972b85fe79 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -46457,6 +46457,7 @@ Boolean type, occupying a single bit.
@itemx int32
@itemx int64
@itemx int128
+@itemx int512
Signed integer types holding the specified number of bits.
@item uint8
@@ -46465,6 +46466,7 @@ Signed integer types holding the specified number of bits.
@itemx uint32
@itemx uint64
@itemx uint128
+@itemx uint512
Unsigned integer types holding the specified number of bits.
@item code_ptr
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 2a51372a037..bba7e7bf288 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -6279,6 +6279,10 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
= arch_integer_type (gdbarch, 128, 0, "int128_t");
builtin_type->builtin_uint128
= arch_integer_type (gdbarch, 128, 1, "uint128_t");
+ builtin_type->builtin_int512
+ = arch_integer_type (gdbarch, 512, 0, "int512_t");
+ builtin_type->builtin_uint512
+ = arch_integer_type (gdbarch, 512, 1, "uint512_t");
builtin_type->builtin_int8->set_instance_flags
(builtin_type->builtin_int8->instance_flags ()
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 7437e1db8ab..6df2df2f13d 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -2358,6 +2358,8 @@ struct builtin_type
struct type *builtin_uint64;
struct type *builtin_int128;
struct type *builtin_uint128;
+ struct type *builtin_int512;
+ struct type *builtin_uint512;
/* Wide character types. */
struct type *builtin_char16;
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 85954ac2939..f56aa2b669e 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -89,6 +89,9 @@ make_gdb_type (struct gdbarch *gdbarch, struct tdesc_type *ttype)
case TDESC_TYPE_INT128:
m_type = builtin_type (m_gdbarch)->builtin_int128;
return;
+ case TDESC_TYPE_INT512:
+ m_type = builtin_type (m_gdbarch)->builtin_int512;
+ return;
case TDESC_TYPE_UINT8:
m_type = builtin_type (m_gdbarch)->builtin_uint8;
return;
@@ -104,6 +107,9 @@ make_gdb_type (struct gdbarch *gdbarch, struct tdesc_type *ttype)
case TDESC_TYPE_UINT128:
m_type = builtin_type (m_gdbarch)->builtin_uint128;
return;
+ case TDESC_TYPE_UINT512:
+ m_type = builtin_type (m_gdbarch)->builtin_uint512;
+ return;
case TDESC_TYPE_CODE_PTR:
m_type = builtin_type (m_gdbarch)->builtin_func_ptr;
return;
diff --git a/gdbsupport/tdesc.cc b/gdbsupport/tdesc.cc
index 4d41d0b168a..90280a69d5c 100644
--- a/gdbsupport/tdesc.cc
+++ b/gdbsupport/tdesc.cc
@@ -43,11 +43,13 @@ static tdesc_type_builtin tdesc_predefined_types[] =
{ "int32", TDESC_TYPE_INT32 },
{ "int64", TDESC_TYPE_INT64 },
{ "int128", TDESC_TYPE_INT128 },
+ { "int512", TDESC_TYPE_INT512 },
{ "uint8", TDESC_TYPE_UINT8 },
{ "uint16", TDESC_TYPE_UINT16 },
{ "uint32", TDESC_TYPE_UINT32 },
{ "uint64", TDESC_TYPE_UINT64 },
{ "uint128", TDESC_TYPE_UINT128 },
+ { "uint512", TDESC_TYPE_UINT512 },
{ "code_ptr", TDESC_TYPE_CODE_PTR },
{ "data_ptr", TDESC_TYPE_DATA_PTR },
{ "ieee_half", TDESC_TYPE_IEEE_HALF },
diff --git a/gdbsupport/tdesc.h b/gdbsupport/tdesc.h
index 403aa2c3d19..0e0f65e123b 100644
--- a/gdbsupport/tdesc.h
+++ b/gdbsupport/tdesc.h
@@ -161,11 +161,13 @@ enum tdesc_type_kind
TDESC_TYPE_INT32,
TDESC_TYPE_INT64,
TDESC_TYPE_INT128,
+ TDESC_TYPE_INT512,
TDESC_TYPE_UINT8,
TDESC_TYPE_UINT16,
TDESC_TYPE_UINT32,
TDESC_TYPE_UINT64,
TDESC_TYPE_UINT128,
+ TDESC_TYPE_UINT512,
TDESC_TYPE_CODE_PTR,
TDESC_TYPE_DATA_PTR,
TDESC_TYPE_IEEE_HALF,
--
2.34.1
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2022-05-06 12:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-06 12:12 [PATCH 0/4] Add AMX support Felix Willgerodt
2022-05-06 12:12 ` Felix Willgerodt [this message]
2022-05-06 12:19 ` [PATCH 1/4] gdb: define int512 and uint512 as built-in types Eli Zaretskii
2022-06-27 18:17 ` Pedro Alves
2022-05-06 12:12 ` [PATCH 2/4] gdb, gdbserver: Add AMX registers Felix Willgerodt
2022-05-06 12:25 ` Eli Zaretskii
2022-05-11 8:14 ` Willgerodt, Felix
2022-05-11 11:41 ` Eli Zaretskii
2022-06-27 18:16 ` Pedro Alves
2022-06-27 18:24 ` Eli Zaretskii
2022-06-27 19:15 ` Pedro Alves
2022-06-28 12:09 ` Eli Zaretskii
2022-06-28 13:35 ` Pedro Alves
2022-05-06 16:17 ` John Baldwin
2022-05-09 7:04 ` Willgerodt, Felix
2022-05-09 16:31 ` John Baldwin
2022-06-27 18:12 ` Pedro Alves
2022-07-14 10:54 ` Willgerodt, Felix
2022-07-15 11:51 ` Willgerodt, Felix
2022-08-08 9:15 ` Willgerodt, Felix
2022-08-08 17:16 ` John Baldwin
2022-05-06 12:12 ` [PATCH 3/4] gdb, gdbserver: Allocate only a sane amount of buffer when fetching registers Felix Willgerodt
2022-05-06 16:08 ` John Baldwin
2022-05-09 7:04 ` Willgerodt, Felix
2022-06-27 18:30 ` Pedro Alves
2022-05-06 12:12 ` [PATCH 4/4] gdb: Clear tilecfg.start_row for any PC modification Felix Willgerodt
2022-06-27 18:55 ` Pedro Alves
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=20220506121226.137608-2-felix.willgerodt@intel.com \
--to=felix.willgerodt@intel.com \
--cc=aleksandar.paunovic@intel.com \
--cc=gdb-patches@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).