From patchwork Tue May 7 02:22:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 795196 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:34e:ceec:bfcd with SMTP id k28csp88513wrc; Mon, 6 May 2024 19:23:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWY1PKATLkWwdyS9Vrh3qDI5nkIDRomy++Ih530FiopvnWwMZfaOXaOHMYAQudp4eqeacsRE1CJs+oHxpVrqV+j X-Google-Smtp-Source: AGHT+IG9Jberh5Eq1fFXKqaA2HJW+gD9UIsbD7y4Udio7ZDBPcx+YHHuy4wemQkwiR7YPXqQl9qR X-Received: by 2002:a05:620a:31a5:b0:78e:df1f:4c30 with SMTP id bi37-20020a05620a31a500b0078edf1f4c30mr15047520qkb.55.1715048612798; Mon, 06 May 2024 19:23:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715048612; cv=pass; d=google.com; s=arc-20160816; b=unPugdBSRsIaYtPk6BBuwYGVUSXd9fg5q/VCvvbv6OzCqh3jMpAB3I1b3maBU9YVCN HYUq7H2q2Fo2YE5ox7fuj8ywEzYdz/98Nb9/+SRjA8Jhw5gmjQwR0SKBt/Tig3F0N2WX 6jySz0VxBqRA8yS7VbXEOG30U8fBf18kJQ9JH6WppKl3fqmaUBWykYT10ki2mL/qUTKo cdBw5yGDInVhuffnZrG8EwpO8tb1+ynHyf06LZhkQFpLcYPDdOa5TkR0XQZZJmllBlYI xITEEw47sQRJ2AI93noaYeWTiLRS4lCAAEn2UcShEHCmiXQfTPUIpYcc8r3/yBXyiu4R I0Kw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=SQ/MGPqC2TZsilITiqbI8A69+DcADKLNoOTCz/HTzcc=; fh=AA1/l1kx9p7hoPrYVWA5ku4B9TvBXTIEFDQu7s+joq4=; b=qhj0XB5UmPUQ7aAbNk1zbs9MQEpFBtFYNhSsiw+D8CNi9JilzzQJvJ4gjHE+reyl3H sYyENIxkxXOR/BAlz7auawDuWbejlwWf3Y9w8cqTqrMikfe5xdpUlCaHgvaiOTckSjbE XyC/354Y6X/3g6PaGh7k/ZV9kMXMklIMS6USKQZyXhxWq1zO5ZCiWjoym6JfaxkXzSuU SaRM/6HcdHPiGuCz3GfPJADDjMnb27giqVSxHRr+VwzOMv/mnLiSzUXxJErMma0Nu1Rn S+hCu0X9EQp4PlMdl60FpA5ZfnQNH/7oi30mwdN+CXqf/SURddYKvRl0RMKOLOhGnure GbwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jl6zXrGw; arc=pass (i=1); spf=pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gdb-patches-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 9-20020a0562140d0900b006a0cb8c467asi10381906qvh.448.2024.05.06.19.23.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 19:23:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jl6zXrGw; arc=pass (i=1); spf=pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gdb-patches-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6BF08384AB51 for ; Tue, 7 May 2024 02:23:32 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id BEAAA3858D1E for ; Tue, 7 May 2024 02:22:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BEAAA3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BEAAA3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::229 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715048574; cv=none; b=ElV6V/bbCLFIrwJkL+cqXbScreCF9EQJQ2Q9YdhAY2FmZRveaOoqqbDgBE89OrMCdm4VWDUnB2zH5cuTrIx7gmlp0c7W19x6t3en+F2Jy45HFPhG28MuBcKBPeTL4E9TW0ISPNhcAysbN8pwEc0waVYfMitj/cmSjv05+NR8zsU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715048574; c=relaxed/simple; bh=fcCh/Gr/Z1jGDSoJEOGJ8Y/RclTItY7og8t6CjUgQ9Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bvfeOQrhUpensaezfqHm2RhyBWsQjh2ACKfC6x9RKm1VX3esyDq8CUWGbkABCSD9tr31HvexddSWp/czJPWFC4TlqfDIffqvkI7/2ntNW+eYhN5EiLh/I8TiZi0dJXp2oTmWCTnutTCI/+yLyctyziRPwgihU1DsvxQkM7SzSr0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3c97a48575eso240354b6e.2 for ; Mon, 06 May 2024 19:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715048572; x=1715653372; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SQ/MGPqC2TZsilITiqbI8A69+DcADKLNoOTCz/HTzcc=; b=jl6zXrGwp61S9Ge61FhRjDEk9FQk147kxtpJWY+81kWlfQuhmy8Ml6HkUz3EqvVluR 0eRjw12Y0KzGEhSfB3b0/CxIOEUco7EMA63UwTR1NhLMJCZJI5uUI2J6NlYS4HoZEswP 8xvC6yFP3UDNxQlIU3mhvHAA1DeUtD6a1n0Uloocxa8DfD/UQyYzYi0okC26Xn/Jdjfo k7Z7rU5qc+cRrB8rJygC15hxpd9NB39kBTptM0YI8ZQ6tuj4yoj0KX/ZiGWXJlq2qjvp PkgmYzWZF3qz8dg1seSFfvylUE5GkXXdlVyBHozQVeTOyDpUZwJuTXFpJpCup511BoiH bDBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715048572; x=1715653372; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SQ/MGPqC2TZsilITiqbI8A69+DcADKLNoOTCz/HTzcc=; b=HsFPUxhQr0PPwXyAxEqIXWYkr1ao9MdXeRJGoNdDlH4V5pQWy1GixXGZ088trSfsed 1Gj+M7Z2FpX5YRs8lcaMLWOYvoChfvHwKY8/hMlgdcPJOvjN8aLTWyKQnlCKaLr093q/ LRcmawekMHqungJ6/VqyOL/xH6c5RqZlmYr5m9RuDvR1GI4wDi3LOLhC+50rZY50VYe1 CCOaeWClL3Ogl3aleUyN7P+GWKCVo7RimihUbMOHHVTPPpGdNqkq93dvQQAyzUpT8VxQ lA3nhLijXaOzAl8NmKCklROjLTHQo+JPOwV1z1eWgqdz8e3/uQ9vxILJiFi04LjDBd1j l3+g== X-Gm-Message-State: AOJu0Yx4KBEWMnGYoM/9E1075e448EYKKIqPxsRZB7T9Cliw+nJ3Jm6u 8oGB5AUwttJ0cfosuQPyR7uugMhky6NVe3fMYGlgpQ8+rMyK3LdzYQn/pgzaOXsTDmjYBKYZ6gn p X-Received: by 2002:a05:6808:1706:b0:3c9:6e10:b088 with SMTP id bc6-20020a056808170600b003c96e10b088mr5614390oib.25.1715048571950; Mon, 06 May 2024 19:22:51 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:38ad:4156:59df:8141]) by smtp.gmail.com with ESMTPSA id u10-20020aa7838a000000b006f456b23f90sm5236861pfm.31.2024.05.06.19.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 19:22:51 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Cc: Christophe Lyon Subject: [PATCH v2 0/5] Add support for AArch64 MOPS instructions Date: Mon, 6 May 2024 23:22:44 -0300 Message-ID: <20240507022249.554831-1-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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+patch=linaro.org@sourceware.org Hello, I'm sending v2 because Christophe made a suggestion for the gdb.arch/aarch64-mops-atomic-inst.exp testcase, so patch 4 incoroporates it. The other patches are unchanged from v1. Here is the original cover letter for convenience: This patch series implements GDB support for the new instructions in AArch64's MOPS feature. Patch 1 has a small overview. What is needed from GDB is recognizing the MOPS sequences of instructions as atomic so that they can be stepped over during instruction single stepping, and also to avoid doing displaced stepping with them. This is done in patch 1. Patch 2 adds support for the new instructions to the record an replay target. The other patches add testcases to test each of the aspects above, plus one testcase to verify the interaction of the MOPS instructions with watchpoints. Tested on Ubuntu 23.10 aarch64-linux-gnu with no regressions, using the Arm FVP emulator as well as QEMU v8.2. Thiago Jung Bauermann (5): gdb/aarch64: Implement software single stepping for MOPS instructions gdb/aarch64: Add record support for MOPS instructions. gdb/testsuite: Add gdb.arch/aarch64-mops-watchpoint.exp gdb/testsuite: Add gdb.arch/aarch64-mops-atomic-inst.exp gdb/testsuite: Add gdb.reverse/aarch64-mops.exp gdb/aarch64-tdep.c | 191 +++++++++++++++++- .../gdb.arch/aarch64-mops-atomic-inst.c | 69 +++++++ .../gdb.arch/aarch64-mops-atomic-inst.exp | 94 +++++++++ .../gdb.arch/aarch64-mops-watchpoint.c | 66 ++++++ .../gdb.arch/aarch64-mops-watchpoint.exp | 79 ++++++++ gdb/testsuite/gdb.reverse/aarch64-mops.c | 71 +++++++ gdb/testsuite/gdb.reverse/aarch64-mops.exp | 171 ++++++++++++++++ gdb/testsuite/lib/gdb.exp | 61 ++++++ 8 files changed, 800 insertions(+), 2 deletions(-) create mode 100644 gdb/testsuite/gdb.arch/aarch64-mops-atomic-inst.c create mode 100644 gdb/testsuite/gdb.arch/aarch64-mops-atomic-inst.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-mops-watchpoint.c create mode 100644 gdb/testsuite/gdb.arch/aarch64-mops-watchpoint.exp create mode 100644 gdb/testsuite/gdb.reverse/aarch64-mops.c create mode 100644 gdb/testsuite/gdb.reverse/aarch64-mops.exp base-commit: 84a069db6714ddcf444095ed09dbcd7404834694