public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nelson Chu <nelson@rivosinc.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>
Cc: Kito Cheng <kito.cheng@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	binutils@sourceware.org
Subject: Re: [PATCH 05/12] RISC-V: Redefine "nop" test
Date: Tue, 29 Nov 2022 15:58:25 +0800	[thread overview]
Message-ID: <CAPpQWtDyWYta+xzYU1hintF4EQ2XYhkW9yQe-N9QrTvDcwS6tw@mail.gmail.com> (raw)
In-Reply-To: <6fc2851a4161edc429089bd2bbd9c2bb4c0c118f.1667651354.git.research_trasio@irq.a4lg.com>

On Sat, Nov 5, 2022 at 8:30 PM Tsukasa OI <research_trasio@irq.a4lg.com> wrote:
>
> 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 <target>:
> +[      ]+[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 <target>:
> +[      ]+[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

It should be the ".option arch, +c", so that's why I don't agree with
the related changes.  Please make the test cases simple and don't make
them too complicated.

> 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 <target>:
> -[      ]+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
> --

I prefer to keep the old one.

Nelson

> 2.37.2
>

  reply	other threads:[~2022-11-29  7:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-05 12:29 [PATCH 00/12] RISC-V: Test refinements (Batch 1) Tsukasa OI
2022-11-05 12:29 ` [PATCH 01/12] RISC-V: Remove unnecessary empty matching file Tsukasa OI
2022-11-29  7:38   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 02/12] RISC-V: Tidy disassembler corner case tests Tsukasa OI
2022-11-29  7:48   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 03/12] RISC-V: Tidying related to 'Zfinx' disassembler test Tsukasa OI
2022-11-29  7:50   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 04/12] RISC-V: GAS: Add basic shared test utilities Tsukasa OI
2022-11-29  7:53   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 05/12] RISC-V: Redefine "nop" test Tsukasa OI
2022-11-29  7:58   ` Nelson Chu [this message]
2022-11-05 12:29 ` [PATCH 06/12] RISC-V: Reorganize/enhance {sign,zero}-extension instructions Tsukasa OI
2022-11-29  8:10   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 07/12] RISC-V: Combine complex extension error handling tests Tsukasa OI
2022-11-29  8:16   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 08/12] RISC-V: Refine/enhance 'M'/'Zmmul' extension tests Tsukasa OI
2022-11-29  8:23   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 09/12] RISC-V: Combine/enhance 'Zicbo[mz]' " Tsukasa OI
2022-11-29  8:38   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 10/12] RISC-V: Enhance 'Zicbop' testcases Tsukasa OI
2022-11-29  8:51   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 11/12] RISC-V: Reorganize/enhance 'Zb*' extension tests Tsukasa OI
2022-11-29  8:57   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 12/12] RISC-V: Combine/enhance 'Zk*'/'Zbk*' " Tsukasa OI
2022-11-29  9:00   ` Nelson Chu
2022-11-20  2:28 ` [PING^1][PATCH 00/12] RISC-V: Test refinements (Batch 1) Tsukasa OI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPpQWtDyWYta+xzYU1hintF4EQ2XYhkW9yQe-N9QrTvDcwS6tw@mail.gmail.com \
    --to=nelson@rivosinc.com \
    --cc=binutils@sourceware.org \
    --cc=kito.cheng@sifive.com \
    --cc=palmer@dabbelt.com \
    --cc=research_trasio@irq.a4lg.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).