From patchwork Wed Oct 19 13:14:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 5439 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp321977wrs; Wed, 19 Oct 2022 06:17:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM581KsdQk5BbBCSEgGg647t0taamYvGuGP/+kdyP75Gb2Zl5UDfMCUmqun5EiqSCFQYe+QF X-Received: by 2002:a05:6402:2546:b0:45d:8bff:7afc with SMTP id l6-20020a056402254600b0045d8bff7afcmr7269979edb.302.1666185464431; Wed, 19 Oct 2022 06:17:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666185464; cv=none; d=google.com; s=arc-20160816; b=mLF6YwlgCNqxB3SqAWpb02qUfcIoP79g2k3I+7GqsEF3Dmiuwta8jR/HmZkevJarNE nPXl0IyYgOPvnHWUWnChTbLPQmfqItZ07YtcrltQCITnVnrY7LNwMgD6kaZNBDKkNAEz Z7lnTX7rrCkqve8X8p+LB5GfbMG8I/I68xN2j/GIzfNobHyGsCJO3KandHoNL5bQbZsa uLfsW6EGBpezrP83dtC19dwz8KZwAuHIARBJYE1sk8cF6mFn6ZLicN65I6mLINw71NtC tN/1mcik07j9+dbSKhZWSmSm+BQOrg0Hrknu0gzVxzn+CrFXb5+S/CCXtI1Ym+L6lf5E Igzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=TyWp7zbYbLn5YNY/9u7dgOTEFwDPnvZQqYyib1Shddo=; b=YDFYTb7DdVnP5bDwTW2JkA0jMCI/+P+CBfAJy38y8S8q2wIjMw6GI5kX22fZSTtGSI t24akFO+e2kqhkfw2y4aM6PJHVH6q4UtEDD3cHZjps1VLZfh7C1Hl6AftjaRiTNQYnP5 yJ4wMIV85pvjp5LZLiuaCEXyi5p8ykEn8F5WTygBIw+lRLnLbpKEJjkcZmIBR+HYeMnt +2mVA7X5+KrO8na+BFBvv2BIA1NIFtfTKXu+rKMEqmF2bRuXXc358q4bgSMk1ASwml75 Tay8CqDPBE2x2DQc0/Pt+jDvDOwyJXnzjwyV5BLl4vBrV/f7YvptFhheM4emqLqDiuBp lbWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ktIX8rHI; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id u11-20020a50eacb000000b00459a58216d8si12412009edp.504.2022.10.19.06.17.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 06:17:44 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ktIX8rHI; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 89D413839DF0 for ; Wed, 19 Oct 2022 13:15:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 89D413839DF0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666185307; bh=TyWp7zbYbLn5YNY/9u7dgOTEFwDPnvZQqYyib1Shddo=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=ktIX8rHISiT5no2E66netaI8LuLsvQDCkXInWgHB4rU1BOpKeGPBIF+1Aav6LPxcZ pdvKu69jsW6Y6Eqku5enVqFatBZQ53J1+cWXvFev5fLG/m0iv+kCNxSj0UPIXcrrEm VWEmDD4Q+fyiHMPhmU/UV5sE/K3RL9N9VU+HOErg= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 5C9AF385624A for ; Wed, 19 Oct 2022 13:14:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5C9AF385624A Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id AEF85300089; Wed, 19 Oct 2022 13:14:10 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt , Andrew Waterman Subject: [PATCH] RISC-V: Remove RV32EF conflict Date: Wed, 19 Oct 2022 13:14:01 +0000 Message-Id: <345c5c3b3a53eab04a1e6e91197de2642095c94f.1666185237.git.research_trasio@irq.a4lg.com> Mime-Version: 1.0 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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 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-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747122089805731367?= X-GMAIL-MSGID: =?utf-8?q?1747122089805731367?= Despite that the RISC-V ISA Manual version 2.2 prohibited "RV32EF", later versions beginning with the version 20190608-Base-Ratified removed this restriction. Because the 'E' extension is still a draft, the author chose to *just* remove the conflict (not checking the ISA version). Note that, because RV32E is only used with a soft-float calling convention, there's no valid official ABI for RV32EF. It means, even if we can assemble a program with -march=rv32ef -mabi=ilp32e, floating-point registers are kept in an unmanaged state (outside ABI management). The purpose of this commit is to suppress unnecessary errors while parsing an ISA string and/or disassembling, not to allow hard-float with RVE. bfd/ChangeLog: * elfxx-riscv.c (riscv_parse_check_conflicts): Accept RV32EF because only older specifications disallowed it. gas/ChangeLog: * testsuite/gas/riscv/march-fail-rv32ef.d: Remove as not directly prohibited. * testsuite/gas/riscv/march-fail-rv32ef.l: Likewise. --- bfd/elfxx-riscv.c | 7 ------- gas/testsuite/gas/riscv/march-fail-rv32ef.d | 3 --- gas/testsuite/gas/riscv/march-fail-rv32ef.l | 2 -- 3 files changed, 12 deletions(-) delete mode 100644 gas/testsuite/gas/riscv/march-fail-rv32ef.d delete mode 100644 gas/testsuite/gas/riscv/march-fail-rv32ef.l base-commit: 2b06e59de0675c2cb526af2de6803dae29703d15 diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index c89b1e53e92..334a63f0873 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -1870,13 +1870,6 @@ riscv_parse_check_conflicts (riscv_parse_subset_t *rps) rps->error_handler (_("rv%d does not support the `q' extension"), xlen); no_conflict = false; } - if (riscv_lookup_subset (rps->subset_list, "e", &subset) - && riscv_lookup_subset (rps->subset_list, "f", &subset)) - { - rps->error_handler - (_("rv32e does not support the `f' extension")); - no_conflict = false; - } if (riscv_lookup_subset (rps->subset_list, "zfinx", &subset) && riscv_lookup_subset (rps->subset_list, "f", &subset)) { diff --git a/gas/testsuite/gas/riscv/march-fail-rv32ef.d b/gas/testsuite/gas/riscv/march-fail-rv32ef.d deleted file mode 100644 index d7b51c3c17d..00000000000 --- a/gas/testsuite/gas/riscv/march-fail-rv32ef.d +++ /dev/null @@ -1,3 +0,0 @@ -#as: -march=rv32ef -#source: empty.s -#error_output: march-fail-rv32ef.l diff --git a/gas/testsuite/gas/riscv/march-fail-rv32ef.l b/gas/testsuite/gas/riscv/march-fail-rv32ef.l deleted file mode 100644 index e6d93f28fa5..00000000000 --- a/gas/testsuite/gas/riscv/march-fail-rv32ef.l +++ /dev/null @@ -1,2 +0,0 @@ -.*Assembler messages: -.*Error: .*rv32e does not support the `f' extension