From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EaU8MV4/82ravD4AWB0awg (envelope-from ) for ; Tue, 10 Nov 2026 10:59:26 -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=UlfDAkqE; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C335A378002; Tue, 10 Nov 2026 10:59:26 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.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 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 2487E1E04F for ; Tue, 10 Nov 2026 10:59:26 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E5AEF4BA23CB for ; Tue, 10 Nov 2026 15:59:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E5AEF4BA23CB 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=UlfDAkqE Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by sourceware.org (Postfix) with ESMTPS id 2D9C24BA2E25 for ; Tue, 10 Nov 2026 15:57:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D9C24BA2E25 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 2D9C24BA2E25 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=192.198.163.18 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794326263; cv=none; b=WVt58nDdUWCPdLpdMTpm/vwPYX9Y+JpMQQCtDPCrn+RXsZUVARPYlDn05EEyu12DT5GEB+mPVM4o3hBOmnXegWlNvteZC0Y10Co39jtDv6DFZM4gg8flFfLQrUbeLddTDlbVJh6wBljyFgpJhrFxa8f68NkdPmMOC1jjWAhQ4l4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794326263; c=relaxed/simple; bh=Ce3+OclHT25pXNGd8v7Y9zskdoaGFP+dTgLPfDEhph8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZOq1TAZNpBk1sMzuFIpUezQ+5+mh9q2wxhdMG8WZXEkwfdei58eMQXauv/vywJWGpFN+5dQV8DeMG+v0XgGCDcfOTwnnxc0BApcq3cgkDteDKaedzEtLMZCU7A6c1baDLN4zKQx2kFwJQlSYTSGLMvEFVj0u0aUZnJQQN87lyjQ= 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=UlfDAkqE DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D9C24BA2E25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1794326263; x=1825862263; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ce3+OclHT25pXNGd8v7Y9zskdoaGFP+dTgLPfDEhph8=; b=UlfDAkqEzJ5IGwBT0HvbBIm11hCEsZ0MnGNJx3OnxoIKiZKwXmQs3CaA SBiVv16D+EVDNHlwxc5odjkMjGjZIsisA4EapBogP6MJnJY4ikFgs0prI tK75r82oMmxOgPzLOmuIokvDvs9cCtB2W6oCaryW1BP7f5JOHPEqF/237 qh/1nmz8y1beVUbASBj4Oa96jD32oGfoxrQO2ESkM6PbYzNBE0iNQ/jgL fdEHVIL9IREsq6/aO7h5MRFSGoboZicfdS4f5sjL4X7pKzY0Krkf1wk0W LdKw5GmgP7VkdTl1ciRJ4b2TDSmHDkZ8GokEcVGMNKxtp45ccnrQx0rKv Q==; X-CSE-ConnectionGUID: y9jN5toSTrOYmNOKhT1hGQ== X-CSE-MsgGUID: vXgE9KzQRnaRMS1cJdKmJw== X-IronPort-AV: E=McAfee;i="6800,10657,11962"; a="3109769" X-IronPort-AV: E=Sophos;i="6.27,206,1787036400"; d="scan'208";a="3109769" Received: from fmviesa012.fm.intel.com ([10.60.135.152]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2026 07:57:42 -0800 X-CSE-ConnectionGUID: 6REiIYjhTS6yoh8SVxU1Pg== X-CSE-MsgGUID: QXTWOKkJT56AiNMjk0OFYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,206,1787036400"; d="scan'208";a="9911489" Received: from dut1048pvc.igk.intel.com (HELO localhost) ([10.211.177.228]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2026 07:57:42 -0800 From: Stephan Rohr 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 Message-ID: <20261110155729.436474-2-stephan.rohr@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261110155729.436474-1-stephan.rohr@intel.com> References: <20261110155729.436474-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 Reviewed-By: Eli Zaretskii --- 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.