From patchwork Sat May 4 00:05:16 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: 56948 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3AB92386F421 for ; Sat, 4 May 2024 00:06:01 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id 42A0E3846079 for ; Sat, 4 May 2024 00:05:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 42A0E3846079 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 42A0E3846079 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::533 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714781128; cv=none; b=RRykm6ERPTbjrenDsL8HLzSOSxYahiC1b+sP7jK8gmdZSzbeXYRwQTVPZGe3JwysYzEbGoAVOc3s0Rzgp98tzeQg4gRQXIJm6ZLHjGqBxDBFz0gSqLuj0tHLBZ+6oXWF08BgvdV6WTnp/6lqCR+wMeGPYivni4Xckk1UUkoQK9s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714781128; c=relaxed/simple; bh=VdYRMfBk+VjAzPnnGmlOZuQ5ebsPmu2i8qtUrdCXfoM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=oE15oiZXsYjhfzNAvDQWjpMZQDlAUCxcLPY0f9Qeqk6ZhdHunrF64ySwtVaqz3fpA05qVZsigBTs/UMR2DXwupmkoiLKFIINOvh97UCkMZc/mVTqxsviziqvnzIa+nGqBwZNH5F+Spie0eZFDa+iOH3D+6qs8ALGHIsEI+y+vdY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-5dca1efad59so147932a12.2 for ; Fri, 03 May 2024 17:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714781125; x=1715385925; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=MC0RQJO6o0txy4jcN9puNfUsGsyBUpFF+hTWPH3TZNY=; b=qy72dcdjcMxOM6My2rt6NoUUGwQZSmD8BN+bBgU3YXicZO5jlgiYEuGdagvvhxjPWt MufgcGm9A2Aoxt/TKJEbFXGFx/XHTjes2FIWCRB4Ul0X4DpRyMQPoHI6ywqAt/rW4Y/E 1mDHfOxM2wttxtMc7bYSgtj9vWhHd7TpNEhi1K4jEgZLdwDKXlh+wpTBurp8EBc7eIPt HT1dIgM+VQwzrq7EZodvuOBF4/xiJ6dFrpEru2Utcxqnh9AaquPYkwOdkWKjdc2FB/54 C7KJhQlDiSvKIaWUtS75aYGpO0uvCNWjqQsS7u90J3a/DGd4lrx4eHLeH1Hql79o6Xs5 eLMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714781125; x=1715385925; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MC0RQJO6o0txy4jcN9puNfUsGsyBUpFF+hTWPH3TZNY=; b=Ny/JVzb9aEwvk+usQDQ+/s4ro6osFcr0RQECFR870/LIaF4WA9TOFEY4k15OLEZ4LW 1AkKvE+HalXAXkFsRSC54hEEfiJMUmifJymA1kMcoALD9D5JJ8/F5ZyxV/YNS3yxIRg1 lB84nl42tV0uaplHUZjJKRNLe7qvm1xfoeXLjPK0R3+IVD/xAIOAwpdZHiQsvL3MWeNM ha/SpUkDvJPqppXzJbAa6/ywJNGDoWn+3G9wUTDJdr1coYoS/ykk2g1wf1MFZefFToUQ LTU+ak35Zu5Uu+blOJBf7qoQEbOTTdxVFOzvDRYrOY5QkaqRvAVhBdm6ciFkicCkBP2W Bo0w== X-Gm-Message-State: AOJu0Yy5z8WPCA+yoPuBVFEu3DHKclzhb0Yg8BSbqURK6kljSIyxSYa5 ACEGH1OCfs9wDaoFo8Ulek/P+AwCOzkynB6tCa3hAKRj1jb1mC2ANH3iuhwz8zmE9MEYfYazLV7 Q X-Google-Smtp-Source: AGHT+IGfWOOrDo8UszJfy3KAVFGdC7PlEBUO8DSBXddmtVHjrsOqoa7Pem/awztV9aDJqC47FLGz4g== X-Received: by 2002:a17:903:32c9:b0:1e4:9ad5:7537 with SMTP id i9-20020a17090332c900b001e49ad57537mr4353666plr.34.1714781124955; Fri, 03 May 2024 17:05:24 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:50e3:94e0:79b0:c9f9]) by smtp.gmail.com with ESMTPSA id c21-20020a170902c1d500b001e20afa1038sm3849892plc.8.2024.05.03.17.05.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 17:05:24 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Subject: [PATCH 0/5] Add support for AArch64 MOPS instructions Date: Fri, 3 May 2024 21:05:16 -0300 Message-ID: <20240504000521.314531-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+patchwork=sourceware.org@sourceware.org Hello, 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 | 62 ++++++ .../gdb.arch/aarch64-mops-atomic-inst.exp | 97 +++++++++ .../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, 796 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