From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by sourceware.org (Postfix) with ESMTPS id 419E238582BC for ; Tue, 29 Nov 2022 08:39:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 419E238582BC 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-x34.google.com with SMTP id 586e51a60fabf-142faa7a207so16129186fac.13 for ; Tue, 29 Nov 2022 00:39:11 -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=n8+nd7LgVz4kVmqJNs0RH4HaD8IDbxSYKsO9ThyoEy0=; b=ToBCP3idGsYRgU2XUDfZcqCl2WufxlgjrmTFGSfh1G7OqLBoQeUCz6SXw6wJmtwoH/ FlsNylItoXEDRC4L0aLG2h0csYihyZKm9Mht8xynJVZ0LQFUZsODFrO8R85eoKg5ASzc WM50IZKbqLjS0krDnGGWi3yxtq6b697SHL+IYuQqrg5yfntEtP1l2ZRN16ju+AAcidUq QxBPt/mhQnAD0+btMrzXTp9GYbF1cpJAjeAuaricJO7iKkoksXaNFBJqq9sNoYK5rAWo KAnhrJQfASg5XVF/7O5OFNhdeDVdvZlgc95pP8OdnTu03a56/vIGm8c7HVL+3bA1VW5p j5RQ== 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=n8+nd7LgVz4kVmqJNs0RH4HaD8IDbxSYKsO9ThyoEy0=; b=ipI5gU0Jxth0/kM68SnFsmqpp9JRmOIkkd6aMd01tt3WvmcsFS1JV+XK5Nsb4Ir7z0 terPG/25rAkQvIWHcqoXOfP78bqTZJLstUjhV93YZCuoTMHSSDY8usgxHqDLCAytsTme fKM1QTA5OOW9O+UnAxycA9F+hFsOAYW8c8CS7wpkLIVoX7v2HT4BDp4WrNJJR25nmL0n RlK1h0Q7+33uYnD8oB2WQJo/RfT3pQzoZmPMrPRBTRs/GdjX4Lf3HEQyVJnDqdIr4EVL G2Bz4BJhFgvFEdeDeuXdCVTbGNV+LGkNjAc8nGD3Gx7UTEWoijvijr8/qoZciYYlFFUC eQEg== X-Gm-Message-State: ANoB5pkMBE5RdJBDSNmxoZKM28Mlnqpr7AqHSTNzAxEAbGQKT1twfNkB PHzSdrLV1mhoJfMvNO/IIwF+JPh/79GxtGyqFBWvZow7r/CQAg== X-Google-Smtp-Source: AA0mqf6Mc5PIBHHnS7yFjbQSHY2r0PjEEhiZStuiz5L9xKWq6K+v+7eqUCf+TPDqJl2dkeZ139KgA3jvT4lrsX2kiRU= X-Received: by 2002:a05:6870:808c:b0:142:b3c0:5099 with SMTP id q12-20020a056870808c00b00142b3c05099mr21623672oab.107.1669711150607; Tue, 29 Nov 2022 00:39:10 -0800 (PST) MIME-Version: 1.0 References: <82832a67f240d5857fd502d4b74fd7d841ee2d6e.1667651354.git.research_trasio@irq.a4lg.com> In-Reply-To: <82832a67f240d5857fd502d4b74fd7d841ee2d6e.1667651354.git.research_trasio@irq.a4lg.com> From: Nelson Chu Date: Tue, 29 Nov 2022 16:38:59 +0800 Message-ID: Subject: Re: [PATCH 09/12] RISC-V: Combine/enhance 'Zicbo[mz]' extension tests To: Tsukasa OI Cc: Kito Cheng , Palmer Dabbelt , binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.0 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: > > This commit combines tests for 'Zicbom' and 'Zicboz' extensions and adds > "no required extension" testcases based on new test utilities. It also > contains minor tidying (such as minimizing base from RV64G to RV32I). > > gas/ChangeLog: > > * testsuite/gas/riscv/zicbo-mz-ext.s: Combine zicbo[mz].s. > * testsuite/gas/riscv/zicbo-mz-ext.d: Likewise. > Minimize extension requirements and remove source. > * testsuite/gas/riscv/zicbo-mz-ext-noarch.d: New test for > architecture failure. > * testsuite/gas/riscv/zicbo-mz-ext-noarch.l: Likewise. > * testsuite/gas/riscv/zicbo-mz-ext-fail.s: Combine > zicbo[mz]-fail.s. > * testsuite/gas/riscv/zicbo-mz-ext-fail.d: Likewise. > Minimize extension requirements. > * testsuite/gas/riscv/zicbo-mz-ext-fail.l: Likewise. > Make matching pattern stricter. > * testsuite/gas/riscv/zicbom.s: Removed. > * testsuite/gas/riscv/zicbom.d: Removed. > * testsuite/gas/riscv/zicbom-fail.s: Removed. > * testsuite/gas/riscv/zicbom-fail.d: Removed. > * testsuite/gas/riscv/zicbom-fail.l: Removed. > * testsuite/gas/riscv/zicboz.s: Removed. > * testsuite/gas/riscv/zicboz.d: Removed. > * testsuite/gas/riscv/zicboz-fail.s: Removed. > * testsuite/gas/riscv/zicboz-fail.d: Removed. > * testsuite/gas/riscv/zicboz-fail.l: Removed. > --- > gas/testsuite/gas/riscv/zicbo-mz-ext-fail.d | 2 ++ > gas/testsuite/gas/riscv/zicbo-mz-ext-fail.l | 11 +++++++++++ > .../riscv/{zicbom-fail.s => zicbo-mz-ext-fail.s} | 4 ++++ > gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.d | 3 +++ > gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.l | 11 +++++++++++ > .../gas/riscv/{zicbom.d => zicbo-mz-ext.d} | 9 ++++++--- > gas/testsuite/gas/riscv/zicbo-mz-ext.s | 16 ++++++++++++++++ One testcase for zicbom-zicboz.s/d, and the other testcase for zicbom-zicboz-fail.s/d. Use .option arch directly rather than those new defined macros. Personally, I think we don't need the no-arch test cases since it's trivial, but that's just my personal thought. Thanks Nelson > gas/testsuite/gas/riscv/zicbom-fail.d | 3 --- > gas/testsuite/gas/riscv/zicbom-fail.l | 7 ------- > gas/testsuite/gas/riscv/zicbom.s | 7 ------- > gas/testsuite/gas/riscv/zicboz-fail.d | 3 --- > gas/testsuite/gas/riscv/zicboz-fail.l | 5 ----- > gas/testsuite/gas/riscv/zicboz-fail.s | 5 ----- > gas/testsuite/gas/riscv/zicboz.d | 13 ------------- > gas/testsuite/gas/riscv/zicboz.s | 5 ----- > 15 files changed, 53 insertions(+), 51 deletions(-) > create mode 100644 gas/testsuite/gas/riscv/zicbo-mz-ext-fail.d > create mode 100644 gas/testsuite/gas/riscv/zicbo-mz-ext-fail.l > rename gas/testsuite/gas/riscv/{zicbom-fail.s => zicbo-mz-ext-fail.s} (61%) > create mode 100644 gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.d > create mode 100644 gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.l > rename gas/testsuite/gas/riscv/{zicbom.d => zicbo-mz-ext.d} (60%) > create mode 100644 gas/testsuite/gas/riscv/zicbo-mz-ext.s > delete mode 100644 gas/testsuite/gas/riscv/zicbom-fail.d > delete mode 100644 gas/testsuite/gas/riscv/zicbom-fail.l > delete mode 100644 gas/testsuite/gas/riscv/zicbom.s > delete mode 100644 gas/testsuite/gas/riscv/zicboz-fail.d > delete mode 100644 gas/testsuite/gas/riscv/zicboz-fail.l > delete mode 100644 gas/testsuite/gas/riscv/zicboz-fail.s > delete mode 100644 gas/testsuite/gas/riscv/zicboz.d > delete mode 100644 gas/testsuite/gas/riscv/zicboz.s > > diff --git a/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.d b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.d > new file mode 100644 > index 00000000000..e84233b09a1 > --- /dev/null > +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.d > @@ -0,0 +1,2 @@ > +#as: -march=rv32i_zicbom_zicboz > +#error_output: zicbo-mz-ext-fail.l > diff --git a/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.l b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.l > new file mode 100644 > index 00000000000..a0bd7096f25 > --- /dev/null > +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.l > @@ -0,0 +1,11 @@ > +.*: Assembler messages: > +.*: Error: illegal operands `cbo\.clean 1\(x1\)' > +.*: Error: illegal operands `cbo\.clean x30' > +.*: Error: illegal operands `cbo\.flush \(0\+1\)\(x1\)' > +.*: Error: illegal operands `cbo\.flush x30' > +.*: Error: illegal operands `cbo\.inval 3\*2\+5\(x1\)' > +.*: Error: illegal operands `cbo\.inval x30' > +.*: Error: illegal operands `cbo\.zero x1' > +.*: Error: illegal operands `cbo\.zero 1\(x30\)' > +.*: Error: illegal operands `cbo\.zero 3\+5\(x1\)' > +.*: Error: illegal operands `cbo\.zero \(2\*4\)\(x30\)' > diff --git a/gas/testsuite/gas/riscv/zicbom-fail.s b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.s > similarity index 61% > rename from gas/testsuite/gas/riscv/zicbom-fail.s > rename to gas/testsuite/gas/riscv/zicbo-mz-ext-fail.s > index 5fa22749b3a..447e9c37de7 100644 > --- a/gas/testsuite/gas/riscv/zicbom-fail.s > +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.s > @@ -5,3 +5,7 @@ target: > cbo.flush x30 > cbo.inval 3*2+5(x1) > cbo.inval x30 > + cbo.zero x1 > + cbo.zero 1(x30) > + cbo.zero 3+5(x1) > + cbo.zero (2*4)(x30) > diff --git a/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.d b/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.d > new file mode 100644 > index 00000000000..33db96dd471 > --- /dev/null > +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.d > @@ -0,0 +1,3 @@ > +#as: -march=rv32i -I$srcdir/$subdir -defsym NOARCH=1 > +#source: zicbo-mz-ext.s > +#error_output: zicbo-mz-ext-noarch.l > diff --git a/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.l b/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.l > new file mode 100644 > index 00000000000..6cf1e4821a2 > --- /dev/null > +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.l > @@ -0,0 +1,11 @@ > +.*: Assembler messages: > +.*: Error: unrecognized opcode `cbo\.clean \(x1\)', extension `zicbom' required > +.*: Error: unrecognized opcode `cbo\.clean 0\(x30\)', extension `zicbom' required > +.*: Error: unrecognized opcode `cbo\.flush \(x1\)', extension `zicbom' required > +.*: Error: unrecognized opcode `cbo\.flush \(2-2\)\(x30\)', extension `zicbom' required > +.*: Error: unrecognized opcode `cbo\.inval \(x1\)', extension `zicbom' required > +.*: Error: unrecognized opcode `cbo\.inval 3\*4-12\(x30\)', extension `zicbom' required > +.*: Error: unrecognized opcode `cbo\.zero 0\(x1\)', extension `zicboz' required > +.*: Error: unrecognized opcode `cbo\.zero \(x30\)', extension `zicboz' required > +.*: Error: unrecognized opcode `cbo\.zero 2-2\(x1\)', extension `zicboz' required > +.*: Error: unrecognized opcode `cbo\.zero \(3\*5-15\)\(x30\)', extension `zicboz' required > diff --git a/gas/testsuite/gas/riscv/zicbom.d b/gas/testsuite/gas/riscv/zicbo-mz-ext.d > similarity index 60% > rename from gas/testsuite/gas/riscv/zicbom.d > rename to gas/testsuite/gas/riscv/zicbo-mz-ext.d > index edd8a7079f4..9daa1cc4a93 100644 > --- a/gas/testsuite/gas/riscv/zicbom.d > +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext.d > @@ -1,6 +1,5 @@ > -#as: -march=rv64g_zicbom > -#source: zicbom.s > -#objdump: -dr > +#as: -march=rv32i -I$srcdir/$subdir > +#objdump: -d > > .*:[ ]+file format .* > > @@ -13,3 +12,7 @@ Disassembly of section .text: > [ ]+[0-9a-f]+:[ ]+002f200f[ ]+cbo\.flush[ ]+\(t5\) > [ ]+[0-9a-f]+:[ ]+0000a00f[ ]+cbo\.inval[ ]+\(ra\) > [ ]+[0-9a-f]+:[ ]+000f200f[ ]+cbo\.inval[ ]+\(t5\) > +[ ]+[0-9a-f]+:[ ]+0040a00f[ ]+cbo\.zero[ ]+\(ra\) > +[ ]+[0-9a-f]+:[ ]+004f200f[ ]+cbo\.zero[ ]+\(t5\) > +[ ]+[0-9a-f]+:[ ]+0040a00f[ ]+cbo\.zero[ ]+\(ra\) > +[ ]+[0-9a-f]+:[ ]+004f200f[ ]+cbo\.zero[ ]+\(t5\) > diff --git a/gas/testsuite/gas/riscv/zicbo-mz-ext.s b/gas/testsuite/gas/riscv/zicbo-mz-ext.s > new file mode 100644 > index 00000000000..af997377903 > --- /dev/null > +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext.s > @@ -0,0 +1,16 @@ > +.include "testutils.inc" > +target: > + SET_ARCH_START +zicbom > + cbo.clean (x1) > + cbo.clean 0(x30) > + cbo.flush (x1) > + cbo.flush (2-2)(x30) > + cbo.inval (x1) > + cbo.inval 3*4-12(x30) > + SET_ARCH_END > + SET_ARCH_START +zicboz > + cbo.zero 0(x1) > + cbo.zero (x30) > + cbo.zero 2-2(x1) > + cbo.zero (3*5-15)(x30) > + SET_ARCH_END > diff --git a/gas/testsuite/gas/riscv/zicbom-fail.d b/gas/testsuite/gas/riscv/zicbom-fail.d > deleted file mode 100644 > index a6a61dfd37e..00000000000 > --- a/gas/testsuite/gas/riscv/zicbom-fail.d > +++ /dev/null > @@ -1,3 +0,0 @@ > -#as: -march=rv64g_zicbom > -#source: zicbom-fail.s > -#error_output: zicbom-fail.l > diff --git a/gas/testsuite/gas/riscv/zicbom-fail.l b/gas/testsuite/gas/riscv/zicbom-fail.l > deleted file mode 100644 > index 2cf76356d2b..00000000000 > --- a/gas/testsuite/gas/riscv/zicbom-fail.l > +++ /dev/null > @@ -1,7 +0,0 @@ > -.*: Assembler messages: > -.*: Error: illegal operands `cbo.clean 1\(x1\)' > -.*: Error: illegal operands `cbo.clean x30' > -.*: Error: illegal operands `cbo.flush \(0\+1\)\(x1\)' > -.*: Error: illegal operands `cbo.flush x30' > -.*: Error: illegal operands `cbo.inval 3\*2\+5\(x1\)' > -.*: Error: illegal operands `cbo.inval x30' > diff --git a/gas/testsuite/gas/riscv/zicbom.s b/gas/testsuite/gas/riscv/zicbom.s > deleted file mode 100644 > index 6a306b931ed..00000000000 > --- a/gas/testsuite/gas/riscv/zicbom.s > +++ /dev/null > @@ -1,7 +0,0 @@ > -target: > - cbo.clean (x1) > - cbo.clean 0(x30) > - cbo.flush (x1) > - cbo.flush (2-2)(x30) > - cbo.inval (x1) > - cbo.inval 3*4-12(x30) > diff --git a/gas/testsuite/gas/riscv/zicboz-fail.d b/gas/testsuite/gas/riscv/zicboz-fail.d > deleted file mode 100644 > index 74cfd2fc911..00000000000 > --- a/gas/testsuite/gas/riscv/zicboz-fail.d > +++ /dev/null > @@ -1,3 +0,0 @@ > -#as: -march=rv64g_zicboz > -#source: zicboz-fail.s > -#error_output: zicboz-fail.l > diff --git a/gas/testsuite/gas/riscv/zicboz-fail.l b/gas/testsuite/gas/riscv/zicboz-fail.l > deleted file mode 100644 > index ad8dcf54e00..00000000000 > --- a/gas/testsuite/gas/riscv/zicboz-fail.l > +++ /dev/null > @@ -1,5 +0,0 @@ > -.*: Assembler messages: > -.*: Error: illegal operands `cbo.zero x1' > -.*: Error: illegal operands `cbo.zero 1\(x30\)' > -.*: Error: illegal operands `cbo.zero 3\+5\(x1\)' > -.*: Error: illegal operands `cbo.zero \(2\*4\)\(x30\)' > diff --git a/gas/testsuite/gas/riscv/zicboz-fail.s b/gas/testsuite/gas/riscv/zicboz-fail.s > deleted file mode 100644 > index 0856ea85ab1..00000000000 > --- a/gas/testsuite/gas/riscv/zicboz-fail.s > +++ /dev/null > @@ -1,5 +0,0 @@ > -target: > - cbo.zero x1 > - cbo.zero 1(x30) > - cbo.zero 3+5(x1) > - cbo.zero (2*4)(x30) > diff --git a/gas/testsuite/gas/riscv/zicboz.d b/gas/testsuite/gas/riscv/zicboz.d > deleted file mode 100644 > index e04ab3491db..00000000000 > --- a/gas/testsuite/gas/riscv/zicboz.d > +++ /dev/null > @@ -1,13 +0,0 @@ > -#as: -march=rv64g_zicboz > -#source: zicboz.s > -#objdump: -dr > - > -.*:[ ]+file format .* > - > -Disassembly of section .text: > - > -0+000 : > -[ ]+[0-9a-f]+:[ ]+0040a00f[ ]+cbo\.zero[ ]+\(ra\) > -[ ]+[0-9a-f]+:[ ]+004f200f[ ]+cbo\.zero[ ]+\(t5\) > -[ ]+[0-9a-f]+:[ ]+0040a00f[ ]+cbo\.zero[ ]+\(ra\) > -[ ]+[0-9a-f]+:[ ]+004f200f[ ]+cbo\.zero[ ]+\(t5\) > diff --git a/gas/testsuite/gas/riscv/zicboz.s b/gas/testsuite/gas/riscv/zicboz.s > deleted file mode 100644 > index 3830362c376..00000000000 > --- a/gas/testsuite/gas/riscv/zicboz.s > +++ /dev/null > @@ -1,5 +0,0 @@ > -target: > - cbo.zero 0(x1) > - cbo.zero (x30) > - cbo.zero 2-2(x1) > - cbo.zero (3*5-15)(x30) > -- > 2.37.2 >