From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IQrfN6iE5Go2mRMAWB0awg (envelope-from ) for ; Fri, 30 Oct 2026 07:51:04 -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=bNQaHGc4; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DFF7D378002; Fri, 30 Oct 2026 07:51:04 -0400 (EDT) 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 22DFC1E023 for ; Fri, 30 Oct 2026 07:51:03 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D04414BA9032 for ; Fri, 30 Oct 2026 11:50:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D04414BA9032 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=bNQaHGc4 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by sourceware.org (Postfix) with ESMTPS id 01F264BA23D9 for ; Fri, 30 Oct 2026 11:50:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01F264BA23D9 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 01F264BA23D9 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=1793361026; cv=none; b=emMwcSe+8VqRO6I8suwioUghtC18azOc6u/+OftSS2huAZMJ2CAjTKeXWfUk0MNenh7nYPJDXTsM9lAkb2lwAroj7Ns1rXTJ2BKbw5l0rpNOhZ5KZuDyojiEVdVudF81l9kDeTgjC9JjZP39FsU/Axlp02hS4JtujyauVYZiwW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793361026; c=relaxed/simple; bh=5IxLmts4x6XrB1KmPAPuuWNJYQFi5/GUfmokzQAzCBw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=axMh49GAbxfE9IkopsLV56mMaMQPyDtnmtARDGRh4pwa69CqCdq28rnoBnQHU6xuPehnCaKPKF0SalAoxbAdyirWrkJWJZELFVjA/RtYF/GVFu4bO+0nGPEW0f3+y7Ci9si3nwQ5DKjaUl+tzngVCulpGOQg1+O634TEg5JJ30s= 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=bNQaHGc4 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01F264BA23D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1793361026; x=1824897026; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5IxLmts4x6XrB1KmPAPuuWNJYQFi5/GUfmokzQAzCBw=; b=bNQaHGc4ADbOKcjUjlfsvBPdiqVAGhrovzC9zb+vvksV/pW+zGTboDjl 5bTPXOTDTMQ3ZxfMEZSix8g/mgmB2Ssj4HYsUu2+9qeCvzhP80e+kFnrm CNnnCU3wNe1JWt81Rm49lZVBs+xh/WiQV1pcjntAA66rEcffzxidCPlfz zQuIC4slijh+HXLxXHaLZzAJ80xxcCEBsSWA4k5ZXK5gnwT0jbDNNkEm2 dZNYa2U5XtyG8M8g7puyCbNMm56yBFf4QVnQ9mF7PtiVtSvHSWdEAQclK Y+rIYbW72f80wLn1yozsbf66R7FtJYJQqfn7aGhUW4GocBVogTgWFbgTv A==; X-CSE-ConnectionGUID: IV3OLopxRpiaUvKkUFY2fg== X-CSE-MsgGUID: rmdL9QOXQY6F18LqQW6s/w== X-IronPort-AV: E=McAfee;i="6800,10657,11950"; a="1998796" X-IronPort-AV: E=Sophos;i="6.27,186,1787036400"; d="scan'208";a="1998796" 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:24 -0700 X-CSE-ConnectionGUID: Upzi/G4+QaGsjLCrwnB1Ww== X-CSE-MsgGUID: U+ACQLnjQpeoOMTE5noiUw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,186,1787036400"; d="scan'208";a="5379209" 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:23 -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 0/5] Add Intel AMX support Date: Fri, 30 Oct 2026 11:50:11 +0000 Message-ID: <20261030115016.45786-1-stephan.rohr@intel.com> X-Mailer: git-send-email 2.43.0 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: "Rohr, Stephan" Hi all, this is our version 2 of the "Add AMX support" series to bring Intel AMX support to upstream GDB. Patch gdb: define additional integer built-in types adds additional 256-bit and 512-bit integer types similar to the patch we posted in v1. 256-bit types are currently not used but added for completeness. Patch gdb, gdbserver: Add Intel AMX registers. implements basic support by adding the raw Intel AMX registers $tmm0_raw .. $tmm7_raw and both the raw $tilecfg_raw and a $tilecfg pseudo register. $tilecfg provides a parsed and user friendly view of the raw register. The raw tile registers are added as a vector of uint512 to avoid polluting the screen when printing a raw tile register. The raw registers are hidden by removing them from the "all" and "general" register groups. Patch gdb: support register groups for user registers adds support to include user registers in register groups. We use this in the following patches to include the tile user registers in the "info registers all" command. By default, user registers are not added to any group so that the current behavior is preserved for the existing user registers. Next, we add a new register group "matrix" to include both the $tilecfg pseudo register and the tile user registers. Patch gdb: add Intel AMX tile registers as user registers implements the tile registers as user registers. The registers are printed with respect to the configured dimensions using an array type with a fixed stride. This naturally supports remote targets and writing the registers, too. The tile user registers are added to the "all" and "matrix" register groups. Changes since v1 ================ v1: https://sourceware.org/pipermail/gdb-patches/2022-May/188790.html v1 patch 1/4: gdb: define int512 and uint512 as built-in types The patch now introduces additional 256-bit integer types for completeness. v1 patch 2/4: gdb, gdbserver: Add AMX registers - The patch now only adds the raw tile registers, the raw tilecfg register and a tilecfg pseudo-register. - The raw registers naturally support the user history. - I386_MAX_REGISTER_SIZE is 1024 bytes, the size of a single raw tile register. - Removed the dynamically sized tile pseudo registers and replaced them with user registers as part of this series. - Addressed Pedro's feedback on tilecfg_reg, no std::pair any more, members are initialized at their declaration, and a fixed-size std::array replaces the vector that was sized by a delegated constructor. - Addressed Eli's documentation feedback (index entries, @acronym, @dots, long lines). The documentation was largely rewritten. A NEWS entry was added. v1 patch 3/4: gdb, gdbserver: Allocate only a sane amount of buffer when fetching registers Dropped. The maximum register size is now 1024 bytes. v1 patch 4/4: gdb: Clear tilecfg.start_row for any PC modification Not included in this series. We can confirm the concerns raised by Pedro when unconditionally resetting start_row in write_pc. We are planning to submit a proper fix in a second series which will also include fixes for: - Write $pc, e.g., set $pc = . - Inferior calls. - The jump command. I appreciate your feedback. Thanks Stephan Aleksandar Paunovic (1): gdb: define additional integer built-in types Felix Willgerodt (1): gdb, gdbserver: Add Intel AMX registers. Rohr, Stephan (3): gdb: support register groups for user registers gdb: add a "matrix" register group gdb: add Intel AMX tile registers as user registers gdb/NEWS | 17 ++ gdb/amd64-linux-tdep.c | 2 + gdb/amd64-tdep.c | 150 ++++++++++- gdb/amd64-tdep.h | 3 + gdb/arch/amd64.c | 4 + gdb/arch/x86-linux-tdesc-features.c | 5 +- gdb/doc/gdb.texinfo | 68 ++++- gdb/features/Makefile | 1 + gdb/features/i386/64bit-amx.c | 26 ++ gdb/features/i386/64bit-amx.xml | 26 ++ gdb/gdbtypes.c | 8 + gdb/gdbtypes.h | 4 + gdb/i386-tdep.c | 230 ++++++++++++++++- gdb/i386-tdep.h | 106 +++++++- gdb/i387-tdep.c | 196 ++++++++++++++- gdb/i387-tdep.h | 6 + gdb/infcmd.c | 28 +++ gdb/nat/x86-xstate.c | 2 + gdb/reggroups.c | 3 + gdb/reggroups.h | 1 + gdb/target-debug.h | 2 + gdb/target-descriptions.c | 12 + gdb/testsuite/gdb.arch/amd64-amx.c | 124 ++++++++++ gdb/testsuite/gdb.arch/amd64-amx.exp | 356 +++++++++++++++++++++++++++ gdb/testsuite/lib/amd64-amx.h | 41 +++ gdb/testsuite/lib/gdb.exp | 75 ++++++ gdb/user-regs.c | 46 +++- gdb/user-regs.h | 17 +- gdbserver/i387-fp.cc | 70 +++++- gdbserver/linux-x86-low.cc | 2 + gdbsupport/tdesc.cc | 4 + gdbsupport/tdesc.h | 4 + gdbsupport/x86-xstate.h | 26 +- 33 files changed, 1630 insertions(+), 35 deletions(-) create mode 100644 gdb/features/i386/64bit-amx.c create mode 100644 gdb/features/i386/64bit-amx.xml create mode 100644 gdb/testsuite/gdb.arch/amd64-amx.c create mode 100644 gdb/testsuite/gdb.arch/amd64-amx.exp create mode 100644 gdb/testsuite/lib/amd64-amx.h -- 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.