Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stephan Rohr <stephan.rohr@intel.com>
To: gdb-patches@sourceware.org
Cc: pedro@palves.net, jhb@FreeBSD.org, luis.machado@arm.com,
	christina.joos@intel.com
Subject: [PATCH v4 1/5] gdb: define additional integer built-in types
Date: Tue, 10 Nov 2026 15:57:25 +0000	[thread overview]
Message-ID: <20261110155729.436474-2-stephan.rohr@intel.com> (raw)
In-Reply-To: <20261110155729.436474-1-stephan.rohr@intel.com>

From: Aleksandar Paunovic <aleksandar.paunovic@intel.com>

Allow using int256/int512 and uint256/uint512 as built-in types,
particularly for the target descriptions.

This is in preparation to add Intel AMX registers.

Co-Authored-By: Stephan Rohr <stephan.rohr@intel.com>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
---
 gdb/doc/gdb.texinfo       |  4 ++++
 gdb/gdbtypes.c            |  8 ++++++++
 gdb/gdbtypes.h            |  4 ++++
 gdb/target-descriptions.c | 12 ++++++++++++
 gdbsupport/tdesc.cc       |  4 ++++
 gdbsupport/tdesc.h        |  4 ++++
 6 files changed, 36 insertions(+)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index bfc5b8760b9..2f8869a174c 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -49861,6 +49861,8 @@ Boolean type, occupying a single bit.
 @itemx int32
 @itemx int64
 @itemx int128
+@itemx int256
+@itemx int512
 Signed integer types holding the specified number of bits.
 
 @item uint8
@@ -49869,6 +49871,8 @@ Signed integer types holding the specified number of bits.
 @itemx uint32
 @itemx uint64
 @itemx uint128
+@itemx uint256
+@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 f86549aca88..132f30a08b7 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -5727,6 +5727,14 @@ create_gdbtypes_data (struct gdbarch *gdbarch)
     = init_integer_type (alloc, 128, 0, "int128_t");
   builtin_type->builtin_uint128
     = init_integer_type (alloc, 128, 1, "uint128_t");
+  builtin_type->builtin_int256
+    = init_integer_type (alloc, 256, 0, "int256_t");
+  builtin_type->builtin_uint256
+    = init_integer_type (alloc, 256, 1, "uint256_t");
+  builtin_type->builtin_int512
+    = init_integer_type (alloc, 512, 0, "int512_t");
+  builtin_type->builtin_uint512
+    = init_integer_type (alloc, 512, 1, "uint512_t");
 
   builtin_type->builtin_int8->set_nottext (true);
   builtin_type->builtin_uint8->set_nottext (true);
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 2c49b83246c..afb9a65ee3d 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -2144,6 +2144,10 @@ struct builtin_type
   struct type *builtin_uint64 = nullptr;
   struct type *builtin_int128 = nullptr;
   struct type *builtin_uint128 = nullptr;
+  struct type *builtin_int256 = nullptr;
+  struct type *builtin_uint256 = nullptr;
+  struct type *builtin_int512 = nullptr;
+  struct type *builtin_uint512 = nullptr;
 
   /* Wide character types.  */
   struct type *builtin_char16 = nullptr;
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index e1821fe7114..f8e102872ca 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -86,6 +86,12 @@ 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_INT256:
+	  m_type = builtin_type (m_gdbarch)->builtin_int256;
+	  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;
@@ -101,6 +107,12 @@ 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_UINT256:
+	  m_type = builtin_type (m_gdbarch)->builtin_uint256;
+	  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 4b6aa815c81..19995a2d407 100644
--- a/gdbsupport/tdesc.cc
+++ b/gdbsupport/tdesc.cc
@@ -42,11 +42,15 @@ static tdesc_type_builtin tdesc_predefined_types[] =
   { "int32", TDESC_TYPE_INT32 },
   { "int64", TDESC_TYPE_INT64 },
   { "int128", TDESC_TYPE_INT128 },
+  { "int256", TDESC_TYPE_INT256 },
+  { "int512", TDESC_TYPE_INT512 },
   { "uint8", TDESC_TYPE_UINT8 },
   { "uint16", TDESC_TYPE_UINT16 },
   { "uint32", TDESC_TYPE_UINT32 },
   { "uint64", TDESC_TYPE_UINT64 },
   { "uint128", TDESC_TYPE_UINT128 },
+  { "uint256", TDESC_TYPE_UINT256 },
+  { "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 a2ef21987bf..cadaa38410c 100644
--- a/gdbsupport/tdesc.h
+++ b/gdbsupport/tdesc.h
@@ -163,11 +163,15 @@ enum tdesc_type_kind
   TDESC_TYPE_INT32,
   TDESC_TYPE_INT64,
   TDESC_TYPE_INT128,
+  TDESC_TYPE_INT256,
+  TDESC_TYPE_INT512,
   TDESC_TYPE_UINT8,
   TDESC_TYPE_UINT16,
   TDESC_TYPE_UINT32,
   TDESC_TYPE_UINT64,
   TDESC_TYPE_UINT128,
+  TDESC_TYPE_UINT256,
+  TDESC_TYPE_UINT512,
   TDESC_TYPE_CODE_PTR,
   TDESC_TYPE_DATA_PTR,
   TDESC_TYPE_IEEE_HALF,
-- 
2.43.0

________________________________________
Intel Deutschland GmbH 

Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany 

Tel: +49 (89) 99143-0 

www.intel.de 

Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman

Chairperson of the Supervisory Board: Sonja Pierer

Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


  reply	other threads:[~2026-11-10 15:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 15:57 [PATCH v4 0/5] Add Intel AMX support Stephan Rohr
2026-11-10 15:57 ` Stephan Rohr [this message]
2026-11-10 15:57 ` [PATCH v4 2/5] gdb, gdbserver: Add Intel AMX registers Stephan Rohr
2026-11-10 15:57 ` [PATCH v4 3/5] gdb: support register groups for user registers Stephan Rohr
2026-11-10 15:57 ` [PATCH v4 4/5] gdb: add a "matrix" register group Stephan Rohr
2026-11-10 15:57 ` [PATCH v4 5/5] gdb: add Intel AMX tile registers as user registers Stephan Rohr
2026-11-24 14:01 ` [PING][PATCH v4 0/5] Add Intel AMX support Rohr, Stephan

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=20261110155729.436474-2-stephan.rohr@intel.com \
    --to=stephan.rohr@intel.com \
    --cc=christina.joos@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.org \
    --cc=luis.machado@arm.com \
    --cc=pedro@palves.net \
    /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