From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) by sourceware.org (Postfix) with ESMTPS id 5A3653858D32 for ; Tue, 5 Sep 2023 01:15:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A3653858D32 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-oo1-xc32.google.com with SMTP id 006d021491bc7-5731fe1d2bfso1044708eaf.3 for ; Mon, 04 Sep 2023 18:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1693876500; x=1694481300; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9lJuHI/qsKaGI5QiYDmnd6zyODxx6hprAq6T5LMDoZw=; b=zyn+dyaszezUTHhRxwMVAtHYohugLNZtqZx/zu1iuZ96mqc7JAv9WG4JxMTNzKdl2Z iEHgwzchE0s1Uz+ukyggZM1lTODFRn2Jm7dGfgD6EsoN+Ju0cL563jIBJL6eDSO0X0bI Hr9tki5WAEvCZoRdtHS3jai5MTU7Uj2keij4eR2/9XYMUn9c0bcYRH2+4EHaKjR2yXJC HQ2OksLeaAe464ia3WqHDtELNXA7OampQZp+JckPQfS43+u+u1zrS22B4gvYG39XvbfN TOJozP4MvyNH+pnodbRwoU4rHxYnGBlGZFtW/NJk/9TgqnIK3rdQmaBwKhiyRpVCyg6/ Qpwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693876500; x=1694481300; 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=9lJuHI/qsKaGI5QiYDmnd6zyODxx6hprAq6T5LMDoZw=; b=YASyEf/ENE8rqcks97So6dOLyHIL6vQ5oxWWkh/ErlsQqTdY3kiK42tO2b3JPRUvmk agi6SngY1cNk6howgDgwrk3mKqE9L8USJNXEFZNvJoLIJz3a2qoUoXF+99ZIq7YsXFxP JjhfeYk7hb/TW9G2hgJMn6xQro5Sx2dSDGHc3bKnjnFusSg9R5+Nbp7XMbpoUSOGGNB5 iI4K41PFIxDyQBvXpK6jyVGXaJ85C3tovbiKsfUBW3kUzeSUxW9taASC9YzGnfJXs8p2 0u33Ws2PPuecsWpEp83jfcJ7hMkiImprpZWvvtLhsHjei+kym/zR4OSdb8fAkXCv+7lm SNCA== X-Gm-Message-State: AOJu0YyPwCRKhJcKllG/AmTx+dcr8kTVvYFKk3RAJUFYw+f4c/7wQtMq yddjcAJ++PXPz8PyNGUixdrstKjt4B/4l6KeYwraIw== X-Google-Smtp-Source: AGHT+IGbG1ytSy8Rlpk957wwuxuD7l4tzJ6hujjoBK6Fa70N6w+Gr5Z+VV1zlZyK8ASzBCAhWmL+WzOGwZMERSS3VMI= X-Received: by 2002:a05:6808:1b27:b0:3a7:316e:9886 with SMTP id bx39-20020a0568081b2700b003a7316e9886mr11847586oib.8.1693876500549; Mon, 04 Sep 2023 18:15:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nelson Chu Date: Tue, 5 Sep 2023 09:14:49 +0800 Message-ID: Subject: Re: [PING^1][PATCH] RISC-V: Prohibit combination of 'E' and 'H' To: Tsukasa OI Cc: Palmer Dabbelt , Andrew Waterman , Jim Wilson , Kito Cheng , binutils@sourceware.org Content-Type: multipart/alternative; boundary="0000000000001be7290604925b86" X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,HTML_MESSAGE,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: --0000000000001be7290604925b86 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable OKay, LGTM, thanks. Does gcc also need the same check? Nelson On Wed, Aug 30, 2023 at 12:12=E2=80=AFPM Tsukasa OI wrote: > Ping. > > On 2023/08/08 13:16, Tsukasa OI wrote: > > From: Tsukasa OI > > > > According to the ratified privileged specification (version 20211203), > > it says: > > > >> The hypervisor extension depends on an "I" base integer ISA with 32 x > >> registers (RV32I or RV64I), not RV32E, which has only 16 x registers. > > > > Also in the latest draft, it also prohibits RV64E with the 'H' extensio= n. > > This commit prohibits the combination of 'E' and 'H' extensions. > > > > bfd/ChangeLog: > > > > * elfxx-riscv.c (riscv_parse_check_conflicts): Prohibit 'E' and > > 'H' combinations. > > > > gas/ChangeLog: > > > > * testsuite/gas/riscv/march-fail-rv32eh.d: New failure test to > > make sure that RV32E + 'H' is prohibited. > > * testsuite/gas/riscv/march-fail-rv32eh.l: Likewise. > > --- > > bfd/elfxx-riscv.c | 7 +++++++ > > gas/testsuite/gas/riscv/march-fail-rv32eh.d | 3 +++ > > gas/testsuite/gas/riscv/march-fail-rv32eh.l | 2 ++ > > 3 files changed, 12 insertions(+) > > create mode 100644 gas/testsuite/gas/riscv/march-fail-rv32eh.d > > create mode 100644 gas/testsuite/gas/riscv/march-fail-rv32eh.l > > > > diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c > > index ee4598729480..1655bb2df364 100644 > > --- a/bfd/elfxx-riscv.c > > +++ b/bfd/elfxx-riscv.c > > @@ -1949,6 +1949,13 @@ riscv_parse_check_conflicts (riscv_parse_subset_t > *rps) > > (_("rv%d does not support the `e' extension"), xlen); > > no_conflict =3D false; > > } > > + if (riscv_subset_supports (rps, "e") > > + && riscv_subset_supports (rps, "h")) > > + { > > + rps->error_handler > > + (_("rv%de does not support the `h' extension"), xlen); > > + no_conflict =3D false; > > + } > > if (riscv_lookup_subset (rps->subset_list, "q", &subset) > > && (subset->major_version < 2 || (subset->major_version =3D=3D 2 > > && subset->minor_version < 2)) > > diff --git a/gas/testsuite/gas/riscv/march-fail-rv32eh.d > b/gas/testsuite/gas/riscv/march-fail-rv32eh.d > > new file mode 100644 > > index 000000000000..b57199efa0f6 > > --- /dev/null > > +++ b/gas/testsuite/gas/riscv/march-fail-rv32eh.d > > @@ -0,0 +1,3 @@ > > +#as: -march=3Drv32eh > > +#source: empty.s > > +#error_output: march-fail-rv32eh.l > > diff --git a/gas/testsuite/gas/riscv/march-fail-rv32eh.l > b/gas/testsuite/gas/riscv/march-fail-rv32eh.l > > new file mode 100644 > > index 000000000000..c7cd1ccc2a89 > > --- /dev/null > > +++ b/gas/testsuite/gas/riscv/march-fail-rv32eh.l > > @@ -0,0 +1,2 @@ > > +.*Assembler messages: > > +.*Error: .*rv32e does not support the `h' extension > > > > base-commit: d734d43a048b33ee12df2c06c2e782887e9715f6 > --0000000000001be7290604925b86--