From patchwork Sat Nov 19 07:10:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 23223 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp591954wrr; Fri, 18 Nov 2022 23:12:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf5e4sc4AgtIzvuhDclna1XNQKpQfQdbBXlZ/Z1lHqz2ON4eAxUqnhKVgxK8SrpRKjr+43jZ X-Received: by 2002:a05:6402:c0b:b0:463:a83c:e0af with SMTP id co11-20020a0564020c0b00b00463a83ce0afmr8559813edb.158.1668841969177; Fri, 18 Nov 2022 23:12:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668841969; cv=none; d=google.com; s=arc-20160816; b=WOMCZvkN2JrLoYAQn+VxuOnZffiCBqbnSh9PfjyJAcUO2Y1RS7BFNe1/vKoHE16gHZ /pheiBgVRw9gvmaUvmQONDhtuu3vsH/RN6HolmTvJ6+Qo1jq7V0iCgFAgWkMN5yFEEX/ rWC/H8W5Kge7ia+7o84TM4mu79M6BK/wgLlErOqEQhzuP/8XnqJ2KEHgwoOTVtV80DOr MsQu4bvj5QXCor5z2aXr1NtAytHje5spWrE5c5sWr595A0JCOqaY9/Z0LWQyqP2kvdHe OMUIfPjgK4DdxSTnwOHOn1jH9plMMogxUlfs1bXC2+exhB6xJ83kmIXl1jeX5ocyaCR/ qRsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=lMbwzV8pxc4MFXKs32W+YM7Qn3NCimwyMcbeUOY+7XU=; b=HHqATNjzk2cttE2DguauEJOK2s3rEn6rfoJe+w+d3U9ECKR2c7bBj81xaSN+g2Ws2n cxTEqnLH6jPcv2kM9/ezgY1O6jYxploGGy7g4gnT7PXNWT5tZxrVUGXJL5ENHXdpraXr R8IE+qspuEVUIkj+S2zVc8ydIDnX/HwPysODmFcjp5/gMecHSY2dUhlffN43GCl0aiE9 Is4OC+YBVAHHeJLqYj+WYL///xm/4N9sqJzdFWXQGgFGOHzy1BdZGSQl12J8lTalVe2s Hk8HqOLRxwO1J9arNB4ru9OeCy8f8NPxTuQv6iUdo3QM8N8N5uA4sJugiPr2c7XTofnf B5MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=U6HTfV6S; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id w16-20020aa7cb50000000b00461fa05b004si1022326edt.105.2022.11.18.23.12.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 23:12:49 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=U6HTfV6S; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 353CA385841D for ; Sat, 19 Nov 2022 07:12:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 353CA385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668841968; bh=lMbwzV8pxc4MFXKs32W+YM7Qn3NCimwyMcbeUOY+7XU=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=U6HTfV6SmdSH5JdEKfXsdDZmeQSlPKW2dzYr8TCwAxaB5bhjRVZ/mbnYvX95n5fVJ 6mb79BT9oXBEmDDMbeQ8+0qpAHR5DXuIwUlZlD+WNtBM9kMXPwt7WzZ9TIAgNEu4eo EMdramI4eC9jBvydsgIbP+0t0WsLj0pK34m8ISw8= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 3E1B1385842E for ; Sat, 19 Nov 2022 07:11:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3E1B1385842E Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 8F329300089; Sat, 19 Nov 2022 07:11:33 +0000 (UTC) To: Tsukasa OI , Jan Beulich , Nelson Chu , Kito Cheng , Palmer Dabbelt Cc: binutils@sourceware.org Subject: [PATCH 1/2] RISC-V: Make .insn tests stricter Date: Sat, 19 Nov 2022 07:10:33 +0000 Message-Id: <2e469b6dd7d8b93ffd3cac333dd58d172a8f28d6.1668841829.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749907636693184017?= X-GMAIL-MSGID: =?utf-8?q?1749907636693184017?= From: Tsukasa OI To make sure that all instruction bits are dumped through ".byte", this commit makes matching patterns stricter (to cover all instruction bits). gas/ChangeLog: * testsuite/gas/riscv/insn.d: Make pattern stricter. * testsuite/gas/riscv/insn-na.d: Likewise. --- gas/testsuite/gas/riscv/insn-na.d | 20 ++++++++++---------- gas/testsuite/gas/riscv/insn.d | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/gas/testsuite/gas/riscv/insn-na.d b/gas/testsuite/gas/riscv/insn-na.d index 66dce71ebc21..be6c9f9dd66a 100644 --- a/gas/testsuite/gas/riscv/insn-na.d +++ b/gas/testsuite/gas/riscv/insn-na.d @@ -61,15 +61,15 @@ Disassembly of section .text: [^:]+:[ ]+022180d7[ ]+vadd\.vv[ ]+v1,v2,v3 [^:]+:[ ]+0001[ ]+c\.addi[ ]+zero,0 [^:]+:[ ]+00000013[ ]+addi[ ]+zero,zero,0 -[^:]+:[ ]+001f 0000 0000[ ].* -[^:]+:[ ]+0000003f 00000000[ ].* -[^:]+:[ ]+007f 0000 0000 0000 0000[ ]+[._a-z].* -[^:]+:[ ]+0000107f 00000000 00000000[ ]+[._a-z].* -[^:]+:[ ]+607f 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000[ ]+[._a-z].* +[^:]+:[ ]+001f 0000 0000[ ]+\.byte[ ]+0x1f, 0x00, 0x00, 0x00, 0x00, 0x00 +[^:]+:[ ]+0000003f 00000000[ ]+\.8byte[ ]+0x3f +[^:]+:[ ]+007f 0000 0000 0000 0000[ ]+\.byte[ ]+0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +[^:]+:[ ]+0000107f 00000000 00000000[ ]+\.byte[ ]+0x7f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +[^:]+:[ ]+607f 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000[ ]+\.byte[ ]+0x7f, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 [^:]+:[ ]+0001[ ]+c\.addi[ ]+zero,0 [^:]+:[ ]+00000013[ ]+addi[ ]+zero,zero,0 -[^:]+:[ ]+001f 0000 0000[ ].* -[^:]+:[ ]+0000003f 00000000[ ].* -[^:]+:[ ]+007f 0000 0000 0000 0000[ ]+[._a-z].* -[^:]+:[ ]+0000107f 00000000 00000000[ ]+[._a-z].* -[^:]+:[ ]+607f 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000[ ]+[._a-z].* +[^:]+:[ ]+001f 0000 0000[ ]+\.byte[ ]+0x1f, 0x00, 0x00, 0x00, 0x00, 0x00 +[^:]+:[ ]+0000003f 00000000[ ]+\.8byte[ ]+0x3f +[^:]+:[ ]+007f 0000 0000 0000 0000[ ]+\.byte[ ]+0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +[^:]+:[ ]+0000107f 00000000 00000000[ ]+\.byte[ ]+0x7f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +[^:]+:[ ]+607f 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000[ ]+\.byte[ ]+0x7f, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 diff --git a/gas/testsuite/gas/riscv/insn.d b/gas/testsuite/gas/riscv/insn.d index 2e5d35b39702..cf84f177af39 100644 --- a/gas/testsuite/gas/riscv/insn.d +++ b/gas/testsuite/gas/riscv/insn.d @@ -83,12 +83,12 @@ Disassembly of section .text: [^:]+:[ ]+0000 0000 0000 ? [^:]+:[ ]+0001[ ]+nop [^:]+:[ ]+00000013[ ]+nop -[^:]+:[ ]+001f 0000 0000[ ].* -[^:]+:[ ]+0000003f 00000000[ ].* -[^:]+:[ ]+007f 0000 0000 0000[ ]+[._a-z].* +[^:]+:[ ]+001f 0000 0000[ ]+\.byte[ ]+0x1f, 0x00, 0x00, 0x00, 0x00, 0x00 +[^:]+:[ ]+0000003f 00000000[ ]+\.8byte[ ]+0x3f +[^:]+:[ ]+007f 0000 0000 0000[ ]+\.byte[ ]+0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 [^:]+:[ ]+0000 ? -[^:]+:[ ]+0000107f 00000000[ ]+[._a-z].* +[^:]+:[ ]+0000107f 00000000[ ]+\.byte[ ]+0x7f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 [^:]+:[ ]+00000000 ? -[^:]+:[ ]+607f 0000 0000 0000[ ]+[._a-z].* +[^:]+:[ ]+607f 0000 0000 0000[ ]+\.byte[ ]+0x7f, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 [^:]+:[ ]+0000 0000 0000 0000 ? [^:]+:[ ]+0000 0000 0000 ?