From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 85F213858419 for ; Sat, 5 Nov 2022 12:30:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 85F213858419 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id DA991300090; Sat, 5 Nov 2022 12:30:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1667651416; bh=vqNo83G71eKDw5we5U80MevNWF7rqNLJf20NGNla0Fg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=WWjmaTarCD4ew4tVB2W5fvDkzyBI4ttNss5lHTTpcb6WnvMzLwjScC+Ig2GWvz+EA 73tgKvcd/5W1CD5GvmA7LiVKQGfgI01UpYUR7JAlZtPGk30tA17FBYrC1W73QSMF1p xbjpdiagHAmHeyiCKgsCa0djDea4i/y1F5rxKitw= From: Tsukasa OI To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Cc: binutils@sourceware.org Subject: [PATCH 05/12] RISC-V: Redefine "nop" test Date: Sat, 5 Nov 2022 12:29:11 +0000 Message-Id: <6fc2851a4161edc429089bd2bbd9c2bb4c0c118f.1667651354.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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 List-Id: Seemingly, t_insns.[sd] was the first GAS test for RISC-V. This commit redefines this test as a template of the new testing utility for "nop" and "c.nop". gas/ChangeLog: * testsuite/gas/riscv/nop.s: New test. * testsuite/gas/riscv/nop.d: New test. * testsuite/gas/riscv/nop-noalias.d: New test. * testsuite/gas/riscv/nop-noarch.d: New failure test. * testsuite/gas/riscv/nop-noarch.l: Likewise. * testsuite/gas/riscv/t_insns.d: Removed. * testsuite/gas/riscv/t_insns.s: Removed. --- gas/testsuite/gas/riscv/nop-noalias.d | 13 +++++++++++++ gas/testsuite/gas/riscv/nop-noarch.d | 3 +++ gas/testsuite/gas/riscv/nop-noarch.l | 2 ++ gas/testsuite/gas/riscv/nop.d | 12 ++++++++++++ gas/testsuite/gas/riscv/nop.s | 9 +++++++++ gas/testsuite/gas/riscv/t_insns.d | 10 ---------- gas/testsuite/gas/riscv/t_insns.s | 2 -- 7 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 gas/testsuite/gas/riscv/nop-noalias.d create mode 100644 gas/testsuite/gas/riscv/nop-noarch.d create mode 100644 gas/testsuite/gas/riscv/nop-noarch.l create mode 100644 gas/testsuite/gas/riscv/nop.d create mode 100644 gas/testsuite/gas/riscv/nop.s delete mode 100644 gas/testsuite/gas/riscv/t_insns.d delete mode 100644 gas/testsuite/gas/riscv/t_insns.s diff --git a/gas/testsuite/gas/riscv/nop-noalias.d b/gas/testsuite/gas/riscv/nop-noalias.d new file mode 100644 index 00000000000..8dca3c8e01f --- /dev/null +++ b/gas/testsuite/gas/riscv/nop-noalias.d @@ -0,0 +1,13 @@ +#as: -march=rv32i -I$srcdir/$subdir +#source: nop.s +#objdump: -d -M no-aliases + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+00000013[ ]+addi[ ]+zero,zero,0 +[ ]+[0-9a-f]+:[ ]+0001[ ]+c\.addi[ ]+zero,0 +[ ]+[0-9a-f]+:[ ]+0001[ ]+c\.addi[ ]+zero,0 diff --git a/gas/testsuite/gas/riscv/nop-noarch.d b/gas/testsuite/gas/riscv/nop-noarch.d new file mode 100644 index 00000000000..d3fe5dc763e --- /dev/null +++ b/gas/testsuite/gas/riscv/nop-noarch.d @@ -0,0 +1,3 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym NOARCH=1 +#source: nop.s +#error_output: nop-noarch.l diff --git a/gas/testsuite/gas/riscv/nop-noarch.l b/gas/testsuite/gas/riscv/nop-noarch.l new file mode 100644 index 00000000000..4e418e1291d --- /dev/null +++ b/gas/testsuite/gas/riscv/nop-noarch.l @@ -0,0 +1,2 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `c\.nop', extension `c' required diff --git a/gas/testsuite/gas/riscv/nop.d b/gas/testsuite/gas/riscv/nop.d new file mode 100644 index 00000000000..19b5fc13b55 --- /dev/null +++ b/gas/testsuite/gas/riscv/nop.d @@ -0,0 +1,12 @@ +#as: -march=rv32i -I$srcdir/$subdir +#objdump: -d + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+00000013[ ]+nop +[ ]+[0-9a-f]+:[ ]+0001[ ]+nop +[ ]+[0-9a-f]+:[ ]+0001[ ]+nop diff --git a/gas/testsuite/gas/riscv/nop.s b/gas/testsuite/gas/riscv/nop.s new file mode 100644 index 00000000000..1a2dd75f3b1 --- /dev/null +++ b/gas/testsuite/gas/riscv/nop.s @@ -0,0 +1,9 @@ +.include "testutils.inc" + +target: + nop + # Architecture block: change disabled when NOARCH is defined. + SET_ARCH_START +c + nop + c.nop + SET_ARCH_END diff --git a/gas/testsuite/gas/riscv/t_insns.d b/gas/testsuite/gas/riscv/t_insns.d deleted file mode 100644 index 720f0db2930..00000000000 --- a/gas/testsuite/gas/riscv/t_insns.d +++ /dev/null @@ -1,10 +0,0 @@ -#as: -#objdump: -dr - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+0:[ ]+00000013[ ]+nop diff --git a/gas/testsuite/gas/riscv/t_insns.s b/gas/testsuite/gas/riscv/t_insns.s deleted file mode 100644 index 99456883315..00000000000 --- a/gas/testsuite/gas/riscv/t_insns.s +++ /dev/null @@ -1,2 +0,0 @@ -target: - nop -- 2.37.2