From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id eUCcN7WE5Go2mRMAWB0awg (envelope-from ) for ; Fri, 30 Oct 2026 07:51:17 -0400 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=J3pr8mDr; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DDCC0378002; Fri, 30 Oct 2026 07:51:17 -0400 (EDT) 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_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 38FD01E023 for ; Fri, 30 Oct 2026 07:51:16 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 304224BA900D for ; Fri, 30 Oct 2026 11:51:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 304224BA900D 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=J3pr8mDr Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by sourceware.org (Postfix) with ESMTPS id 287FF4BA23E2 for ; Fri, 30 Oct 2026 11:50:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 287FF4BA23E2 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 287FF4BA23E2 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793361032; cv=none; b=luN4N2w4moVuKwbRiirDp/E+XPxFcKHFnmzGTKnyYv87bPFjSUNO5ZTIpAJPkYmrLsqNhN48dT18E6/JSMCAfG0alPiCL8n4vQUrvuHjDh6ZTxwFCNz6eesHn/v0uUrilBSJSUQsQ+bnboVo3zWhxjLK/WjwoXrgi6yPZlrNdhw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793361032; c=relaxed/simple; bh=8uqlYyH2KulGVNaK2K5/odVGPlxluDpXXC22YRWYo0A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=l4rHuDTCn1T2HHyMfzv9VEURcH2nZzEeRhgKSxW4k5tiVqDgeMPd+ekL4mWiePV+s4G9zV+RYxG/OXhVXnrGCGA/w4S4IF7pNWmrepJcHu1fCaFtrGhCU9PZuXHtXUMxiEYfXu1G6gWdS/ZWJbbzc9ptQOBtyNFki+0oG5Ws77w= 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=J3pr8mDr DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 287FF4BA23E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1793361032; x=1824897032; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8uqlYyH2KulGVNaK2K5/odVGPlxluDpXXC22YRWYo0A=; b=J3pr8mDrjdT4yHLr6oG8P+bUp3aWB49tWWWhCPHwZ/yvod+x28A2ccIx oRbC2mA+7Dk0nhEUl/+tsKw5GhSRN9WV0M+NnEBL3Ul9YlNjcLBN0qaCN Yo6kjbGy2cbkEABF7ACiXLAlQZn55ehdE+AAcczd3ngff7DZHhSUM4/If 4tzVwdx/vetsRsxUeNlQG3dgSI8wiFEQz9nU8iL332H8o7M2iGMcUY6YU WeKAsN61DUAHp/wcFLlD/hxxPOqc770OGvza6BCvEwcOJ5NXY8ustwhGo T2yXu5g0usKNZrL8TMjsuSi97g/Qmvh7zyCLMcQH/yM5bDks8gu0VBL24 g==; X-CSE-ConnectionGUID: esEmemTBQlSgPFbQopixJQ== X-CSE-MsgGUID: bVikxDfCQhmEA2198y25fA== X-IronPort-AV: E=McAfee;i="6800,10657,11950"; a="1998809" X-IronPort-AV: E=Sophos;i="6.27,186,1787036400"; d="scan'208";a="1998809" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2026 04:50:31 -0700 X-CSE-ConnectionGUID: 8EJqOnHiQ9qUtPeo75ECmQ== X-CSE-MsgGUID: cWe6Ip9mTbK29DB9Q/8Fpw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,186,1787036400"; d="scan'208";a="5379240" Received: from dut1048pvc.igk.intel.com (HELO localhost) ([10.211.177.228]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2026 04:50:31 -0700 From: Stephan Rohr To: gdb-patches@sourceware.org Cc: pedro@palves.net, eliz@gnu.org, jhb@FreeBSD.org, luis.machado@arm.com Subject: [PATCH v2 1/5] gdb: define additional integer built-in types Date: Fri, 30 Oct 2026 11:50:12 +0000 Message-ID: <20261030115016.45786-2-stephan.rohr@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261030115016.45786-1-stephan.rohr@intel.com> References: <20261030115016.45786-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.