From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 35EED3858D37 for ; Sun, 22 Oct 2023 01:33:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 35EED3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 35EED3858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2401:2500:203:30b:4000:6bfe:4757:0 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697938402; cv=none; b=OW0fRSQBKSRpepEUTEiX44oEK48RlyyFeI4TDxIVXjfLlaRH2Wcm03SnUi6/lly8rhXVK6bRMjRy+WFBFsZGXnfmDpCDEeZVC6fJ/EmOEgfD5aEF4GtagEb+mQpniIPEwxPua4J2swGI75oka14TbPfB8jKr5mMeqnHY/OzFNx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697938402; c=relaxed/simple; bh=DO0A9PpW6t0TjrPXyoPu8rwn4diC/SEtbm5NLweHqZ4=; h=DKIM-Signature:Message-ID:Date:Mime-Version:Subject:To:From; b=ad56Cr3IJU9WC2Y/vt1upCJ7ssA+VkznSk8XVaMlgdzDpRWrF91RBv5EcAn+LEMIYy86ewe96ZYPVVpvQQI1AbqtKH8H/Ptt3Ip+Pr6D78NYLmMqNNKd9SSrnT0pFwmRkxSKZ/kW/TXIx3OKCwn1miaqlb+TEUIa9IK7xcNn8T8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 7B8F8300089; Sun, 22 Oct 2023 01:33:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1697938387; bh=XzeeJ4+hJV/qpSQjkyqmJMYvfCKtmJXGev6LQwyobzk=; h=Message-ID:Date:Mime-Version:Subject:To:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=b4L6z1cnRewaMmnHq3VP6mOXdJ/OXz47tRC7AgTitbkZ5owecYWnAIfwCJ9TRi4Oh DsVFRdKeuI4yY9r88WLSoPb9H9Fnv3jiLJvA0XeOGYc2PilOdUhGqyUKPHCCG47Hxp mnJk22oS8n0uzBLPM48Oq45PH1m779U0We352Wbk= Message-ID: <6e2f6992-133a-4e68-82cc-24388e387523@irq.a4lg.com> Date: Sun, 22 Oct 2023 10:33:06 +0900 Mime-Version: 1.0 Subject: Re: [PATCH] RISC-V: Prohibit combination of 'E' and 'H' Content-Language: en-US To: Jeff Law , GCC Patches References: <92fad87801003eaa4cf9f47a1ab8d6e6f015ed12.1697866371.git.research_trasio@irq.a4lg.com> From: Tsukasa OI In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KAM_SHORT,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 2023/10/22 3:04, Jeff Law wrote: > > > On 10/20/23 23:32, 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' extension. >> This commit prohibits the combination of 'E' and 'H' extensions. >> >> gcc/ChangeLog: >> >>     * common/config/riscv/riscv-common.cc (riscv_subset_list::parse): >>     Prohibit 'E' and 'H' combinations. >> >> gcc/testsuite/ChangeLog: >> >>     * gcc.target/riscv/arch-26.c: New test. > In a similar vein, GCC doesn't really care about the privileged > extensions.  So this won't really affect code generation.  So I'll ACK, > but going forward let's start doing the regression test.  If you need > help setting that up, I'm sure someone here can make suggestions. > Personally I prefer a qemu+binfmt setup as it doesn't require setting up > a board file and explicitly calling the simulator, ie, it looks a lot > like native testing. > > jeff > Thanks for reviewing. I'll commit two patches soon. Yes, for GCC, privileged extensions (and version numbers) are not important in general (unless toolchain conventions create privileged built-in functions). Intents of my two small patch sets are: 1. Allow inline assembly to use new/privileged extensions. 2. Allow/disallow same -march for both CC and AS (as possible). 3. (As long as no major compatibility breakage happens), make both GCC and Binutils faithful to the specification and the current status (that would also improve interoperability). Hmm, I generally agree with your opinion and I made a board file for DejaGnu (running qemu-riscv64) to run "make check-gcc RUNTESTFLAGS='--target_board=riscv-sim riscv.exp'" because it already contains many execute tests (and annoys me if I don't do that). What I'm not sure is, what kind of regression tests we need? (In my mind) Level 1: Make nearly empty program with specific -march (and optionally -mabi?) and make sure that it works. Level 2: Make a program with inline assembly and execute tests with specific configurations (with specific -march and -mabi) [I'm not sure how to write **and optionally execute tests**] I would like to hear your thoughts. Thanks, Tsukasa