From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 899E83857C48 for ; Tue, 24 May 2022 12:05:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 899E83857C48 Received: by mail-ej1-x62d.google.com with SMTP id rs12so23138139ejb.13 for ; Tue, 24 May 2022 05:05:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2HEKVfyfoCmGB5rfccqa144m6wCaVdSORRLwwLB1q/8=; b=ug95Rh2Dq42/VpNgMP0sUazl7XL6/1tdFbfjvXTyu/sZYKCq9hy7OQiHFYPXVYXL14 P5DjMxLo0Tx+Ai9jlXJW2QZXYVJjlZNO7ok2D75hNxXU24hcI52ffRuWjh75wy4j7krb wQWWL6xkuwO9goi9M51qOIrw9i/t5I0Sv99dUAA/JAraWCcPjCChBeKCpt/ArBSZjVPX cs5VAiA0zPeh/JkwjZv1FA0EoZf2P9R/ExYB7s+4Ls6lNlQ7PWKMr8ZiEkf1unLQVHrw 8kmXfqRI1XcJ234yg6b/ASppqclVTmwD6IFDNi5kMuIY0/WqnH2n8efXdGEguLtaBcsW XFhg== X-Gm-Message-State: AOAM533hGcjj6MEsYVcJVJnYMSM4G2HwliHPApWzK1xkbo/OVkL6wTFK qVXPSnSu7mJA9k3T9jAjOtn2ixmN52WFVyICR70= X-Google-Smtp-Source: ABdhPJy9Fxbo0pkdaS0zZ0WfYNj6ZQdI5y7PjiV96aOHaxEQpUGo1UahngypcXK6JhfcraRmuCrMXl25N1G48k47YYs= X-Received: by 2002:a17:907:98c4:b0:6fe:a1e6:eae5 with SMTP id kd4-20020a17090798c400b006fea1e6eae5mr20181789ejc.309.1653393909066; Tue, 24 May 2022 05:05:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kito Cheng Date: Tue, 24 May 2022 20:04:57 +0800 Message-ID: Subject: Re: [PATCH v2 1/1] RISC-V: Fix RV32Q conflict To: Tsukasa OI Cc: Palmer Dabbelt , Nelson Chu , Jan Beulich , Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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-List-Received-Date: Tue, 24 May 2022 12:05:15 -0000 LGTM. On Sun, Feb 27, 2022 at 4:52 PM Tsukasa OI via Binutils wrote: > > This commit makes RV32 + 'Q' extension (version 2.2 or later) not > conflicting since this combination is no longer prohibited by the > specification. > > bfd/ChangeLog: > > * elfxx-riscv.c (riscv_parse_check_conflicts): Remove conflict > detection that prohibits RV32Q on 'Q' version 2.2 or later. > > gas/ChangeLog: > > * testsuite/gas/riscv/march-fail-rv32iq.d: Removed. > * testsuite/gas/riscv/march-fail-rv32iq.l: Likewise. > * testsuite/gas/riscv/march-fail-rv32iq2p0.d: New test > showing RV32IQ fails on 'Q' extension version 2.0. > * testsuite/gas/riscv/march-fail-rv32iq2p0.l: Likewise. > * testsuite/gas/riscv/march-fail-rv32iq2.d: Likewise. > * testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d: New test > showing RV32IQ fails on ISA specification version 2.2. > * testsuite/gas/riscv/march-ok-rv32iq2p2.d: New test > showing RV32IQ succesds on 'Q' extension version 2.2. > * testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d: New test > showing RV32IQ succesds on ISA specification 20190608. > --- > bfd/elfxx-riscv.c | 5 +++-- > gas/testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d | 3 +++ > gas/testsuite/gas/riscv/march-fail-rv32iq.d | 3 --- > gas/testsuite/gas/riscv/march-fail-rv32iq2.d | 3 +++ > gas/testsuite/gas/riscv/march-fail-rv32iq2p0.d | 3 +++ > .../riscv/{march-fail-rv32iq.l => march-fail-rv32iq2p0.l} | 0 > gas/testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d | 5 +++++ > gas/testsuite/gas/riscv/march-ok-rv32iq2p2.d | 5 +++++ > 8 files changed, 22 insertions(+), 5 deletions(-) > create mode 100644 gas/testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d > delete mode 100644 gas/testsuite/gas/riscv/march-fail-rv32iq.d > create mode 100644 gas/testsuite/gas/riscv/march-fail-rv32iq2.d > create mode 100644 gas/testsuite/gas/riscv/march-fail-rv32iq2p0.d > rename gas/testsuite/gas/riscv/{march-fail-rv32iq.l => march-fail-rv32iq2p0.l} (100%) > create mode 100644 gas/testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d > create mode 100644 gas/testsuite/gas/riscv/march-ok-rv32iq2p2.d > > diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c > index 2915b74dd0f..17567b2af54 100644 > --- a/bfd/elfxx-riscv.c > +++ b/bfd/elfxx-riscv.c > @@ -1880,10 +1880,11 @@ riscv_parse_check_conflicts (riscv_parse_subset_t *rps) > no_conflict = false; > } > if (riscv_lookup_subset (rps->subset_list, "q", &subset) > + && (subset->major_version < 2 || (subset->major_version == 2 > + && subset->minor_version < 2)) > && xlen < 64) > { > - rps->error_handler > - (_("rv%d does not support the `q' extension"), xlen); > + rps->error_handler (_("rv%d does not support the `q' extension"), xlen); > no_conflict = false; > } > if (riscv_lookup_subset (rps->subset_list, "e", &subset) > diff --git a/gas/testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d b/gas/testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d > new file mode 100644 > index 00000000000..16451b0f43f > --- /dev/null > +++ b/gas/testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d > @@ -0,0 +1,3 @@ > +#as: -misa-spec=2.2 -march=rv32iq > +#source: empty.s > +#error_output: march-fail-rv32iq2p0.l > diff --git a/gas/testsuite/gas/riscv/march-fail-rv32iq.d b/gas/testsuite/gas/riscv/march-fail-rv32iq.d > deleted file mode 100644 > index c289c695cad..00000000000 > --- a/gas/testsuite/gas/riscv/march-fail-rv32iq.d > +++ /dev/null > @@ -1,3 +0,0 @@ > -#as: -march=rv32iq > -#source: empty.s > -#error_output: march-fail-rv32iq.l > diff --git a/gas/testsuite/gas/riscv/march-fail-rv32iq2.d b/gas/testsuite/gas/riscv/march-fail-rv32iq2.d > new file mode 100644 > index 00000000000..34fce730ce5 > --- /dev/null > +++ b/gas/testsuite/gas/riscv/march-fail-rv32iq2.d > @@ -0,0 +1,3 @@ > +#as: -march=rv32iq2 > +#source: empty.s > +#error_output: march-fail-rv32iq2p0.l > diff --git a/gas/testsuite/gas/riscv/march-fail-rv32iq2p0.d b/gas/testsuite/gas/riscv/march-fail-rv32iq2p0.d > new file mode 100644 > index 00000000000..916f845a970 > --- /dev/null > +++ b/gas/testsuite/gas/riscv/march-fail-rv32iq2p0.d > @@ -0,0 +1,3 @@ > +#as: -march=rv32iq2p0 > +#source: empty.s > +#error_output: march-fail-rv32iq2p0.l > diff --git a/gas/testsuite/gas/riscv/march-fail-rv32iq.l b/gas/testsuite/gas/riscv/march-fail-rv32iq2p0.l > similarity index 100% > rename from gas/testsuite/gas/riscv/march-fail-rv32iq.l > rename to gas/testsuite/gas/riscv/march-fail-rv32iq2p0.l > diff --git a/gas/testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d b/gas/testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d > new file mode 100644 > index 00000000000..8322957948d > --- /dev/null > +++ b/gas/testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d > @@ -0,0 +1,5 @@ > +#as: -misa-spec=20190608 -march=rv32iq > +#objdump: -dr > +#source: empty.s > + > +.*: file format elf32-(little|big)riscv > diff --git a/gas/testsuite/gas/riscv/march-ok-rv32iq2p2.d b/gas/testsuite/gas/riscv/march-ok-rv32iq2p2.d > new file mode 100644 > index 00000000000..1a922bfaa4d > --- /dev/null > +++ b/gas/testsuite/gas/riscv/march-ok-rv32iq2p2.d > @@ -0,0 +1,5 @@ > +#as: -march=rv32iq2p2 > +#objdump: -dr > +#source: empty.s > + > +.*: file format elf32-(little|big)riscv > -- > 2.32.0 >