From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by sourceware.org (Postfix) with ESMTPS id E9BEE385222A for ; Tue, 29 Nov 2022 07:58:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E9BEE385222A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-142306beb9aso16053040fac.11 for ; Mon, 28 Nov 2022 23:58:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9afBUvhaNQTddoPidyQ3v0QmEIIQFf6SOnVjj6MJVIg=; b=fbaMUdV4VmQpRkTIjyrmdpmzYmLsdmWqFN9w6OeNpelKp/vCDhfdiVNWOzZAXOxkc7 KB8gvBd3Cjzeab20XxkHAq4Ds9iYxBAWdxRawjTnhOKiWdV5zjky5/pz59opA/Voi2s2 c1pxGaNMmi7OUODbloKAQhakEDzPjIhc8z3kuA5haQZQljFCdu0Li0gT4qoavMozuT7z ZwGgEeB9pzDgcbE0o7UqeXzDkiwGGNmjVVRPckkwu9gDhjghA5N/3BDmt9MItlE3mjv6 eyf2OgTPdXHzaEQq0UTEn1GM1elCvy+IoM5c81qpWL6Y70uxQcKXetw27C4eQ29Vp8dC wcsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9afBUvhaNQTddoPidyQ3v0QmEIIQFf6SOnVjj6MJVIg=; b=fhB35HwDWM+6+gCnoQPadycf8LPyJKT6JaC2ggsyKLTP0qanL0bggUS8Hf1MMziHzZ yjJLJ1kcISmlXGJAuECXlpC4iIJczpB+ejgEHtcaYBCuhMJynG1J+dkNLT4dbTuWecUY je1dgy6/k8w9/brPVbZvOQhG/heYCyCqOKuNn6LtxrpfRs4sBg9Qte5M4+7hL/rDvISM VtYz9YY+KeCWBYGSHhmvkLEk38WaHsx7s+Fro/pzEOQyfZ2HoZbb5hiP8tGZR3MGD6wf JPw1RLK83qzgYq8EzUbRFOlKteFq6IUqzE9/xbdWtagL5HEkXO1R+uB1XMFDq9F0Qnv+ r1LA== X-Gm-Message-State: ANoB5pkVJmbTAljIC5226AKFwJQumPe8eiohr9qIMfhLQiSxTuR6BChz IFjos1aAFHayCW66m5dCi5zPiiQFg9SlWvruLolhZsb5xpClLLbZ X-Google-Smtp-Source: AA0mqf4Gu7Ofrw8/vCiFiQU5avM8Q7X5cqVtAWkcn13OlebjqNlJFmix8PiXmfRmqEkKdUHrODvZ93HEhRFFkRdS+Xg= X-Received: by 2002:a05:6870:9110:b0:142:6390:4724 with SMTP id o16-20020a056870911000b0014263904724mr1635487oae.82.1669708716372; Mon, 28 Nov 2022 23:58:36 -0800 (PST) MIME-Version: 1.0 References: <6fc2851a4161edc429089bd2bbd9c2bb4c0c118f.1667651354.git.research_trasio@irq.a4lg.com> In-Reply-To: <6fc2851a4161edc429089bd2bbd9c2bb4c0c118f.1667651354.git.research_trasio@irq.a4lg.com> From: Nelson Chu Date: Tue, 29 Nov 2022 15:58:25 +0800 Message-ID: Subject: Re: [PATCH 05/12] RISC-V: Redefine "nop" test To: Tsukasa OI Cc: Kito Cheng , Palmer Dabbelt , binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,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 List-Id: On Sat, Nov 5, 2022 at 8:30 PM Tsukasa OI 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 : > +[ ]+[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 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 : > -[ ]+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 >