From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id idJmAqZr7GqGjh8AWB0awg (envelope-from ) for ; Thu, 05 Nov 2026 06:42:30 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=LoKDIXwC; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id ECE02378002; Thu, 05 Nov 2026 06:42:29 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C3A1F1E023 for ; Thu, 05 Nov 2026 06:42:28 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 86CD64BA23D6 for ; Thu, 5 Nov 2026 11:42:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86CD64BA23D6 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=LoKDIXwC Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by sourceware.org (Postfix) with ESMTPS id DCA1A4BA2E27 for ; Thu, 5 Nov 2026 11:41:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DCA1A4BA2E27 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DCA1A4BA2E27 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793878886; cv=none; b=E2dxXa3xPoG9r6rgzYmVT5y4h50NkKZiHU2njbMmMWk4XYkZKn7TGAwE5UIpH/NVBhOj+hqIEqAguI64kawvvUjlCa/wLFW/oZA8xdlxY+a3KRnf5YQ0wIp+vN+bp8saqSBxymZU8kD9Kx+Gj3b66eJDm/ZPLzRWfqE/DGdwJUk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793878886; c=relaxed/simple; bh=8uqlYyH2KulGVNaK2K5/odVGPlxluDpXXC22YRWYo0A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=n1umbIGDsNKnbykipP/iwDC4Eq3bIvLzIJJ0ODjXmuZh5ECTtXUXQsx3qOqWrWgcrwGxpDJGlH+aukzLiKarOoH/gL5A5Nrr7onFDr9mubt2QpnP4UsEDSlmDalAHgDxCtkW/hx2s50RQa4Pkw+jqrFqzxkLpQnuHE5CTSVj5Ic= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=LoKDIXwC DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCA1A4BA2E27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1793878886; x=1825414886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8uqlYyH2KulGVNaK2K5/odVGPlxluDpXXC22YRWYo0A=; b=LoKDIXwC5Irtft8r/uRXX4dRIQ+xzIP/znj3WQnMDfeqFwDRhPmPHD/M a3h5IIahQO+7oMhS1y1/VImMkKD4iHZvAPrVyb/qhLmEMKoyCtPJGKXqj EBJ5gxoGt3ObAxGQYRW9AXRX1HY/EMInIH/IMOnNq+ZoFkTgrzYlTxBmU EHaYtVzvqUOMrnUYkPlf0yEtuRYuBaQ6sFHn0iNXWEcif4jSe9eDOsaLQ y43ScefF3aORCU6ZxIGz2gP9AtRxpviLA9CeScKE4GHkg9SUNLClp+juc 2cJP34k6t8WV3dfp6n/FYA+4Y9mstJHlwCiqnIAJ8BU2+otA4drkrR9Io Q==; X-CSE-ConnectionGUID: K5+oC9ASTpaonSogJoWb2w== X-CSE-MsgGUID: pRbYp4zPSVSvm4vMbqHihQ== X-IronPort-AV: E=McAfee;i="6800,10657,11956"; a="2551071" X-IronPort-AV: E=Sophos;i="6.27,197,1787036400"; d="scan'208";a="2551071" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2026 03:41:24 -0800 X-CSE-ConnectionGUID: fqnW0vylTDiNwT5ErizuSA== X-CSE-MsgGUID: SWj1IL4CRvWJwgyHDXkcRA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,197,1787036400"; d="scan'208";a="7313623" Received: from dut1048pvc.igk.intel.com (HELO localhost) ([10.211.177.228]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2026 03:41:23 -0800 From: Stephan Rohr To: gdb-patches@sourceware.org Cc: pedro@palves.net, eliz@gnu.org, jhb@FreeBSD.org, luis.machado@arm.com, christina.joos@intel.com Subject: [PATCH v3 1/5] gdb: define additional integer built-in types Date: Thu, 5 Nov 2026 11:41:05 +0000 Message-ID: <20261105114109.153949-2-stephan.rohr@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261105114109.153949-1-stephan.rohr@intel.com> References: <20261105114109.153949-1-stephan.rohr@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org From: Aleksandar Paunovic 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 --- 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 66152d2582e..53773780b56 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -49859,6 +49859,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 @@ -49867,6 +49869,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.