From patchwork Mon Aug 15 05:47:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Marheine X-Patchwork-Id: 518 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6a10:38f:b0:2d5:3c95:9e21 with SMTP id 15csp1173396pxh; Sun, 14 Aug 2022 22:48:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR51jlrlreDRdCfE8Mb39GNfw5Po6CWVW5vstgVKagDdEAEhJ+HV0i1SIGBYG3GiGCFwZhzY X-Received: by 2002:a17:906:cc13:b0:730:97a4:8fbe with SMTP id ml19-20020a170906cc1300b0073097a48fbemr9051069ejb.412.1660542534968; Sun, 14 Aug 2022 22:48:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660542534; cv=none; d=google.com; s=arc-20160816; b=Bplwv3XRfr5ekVg+lvGRKrgOfZTqa5rwekuI1iMarRyTN6XWGsBJ/HJn615JKHuQyX pspojXl0wcUr5SNp7i//jGOPSvZ7nu+1ObmPiVzFIe7Ab8uQt4gTA3la/5x5taRlglAo JM8OIzBH4c7uDjLEHo/B8mn7yWdti+bhGqpQfapIdcLZzCUzuvuGYdXDH0wDENXoPwV1 k5fd9CAWGA2evF+aCW6GMlJCqdp8WkMcKywrcWX0jcGhuhdugxsP5WI0yWrLljGsXMHk DNmRB/hstdF5GBNVuEErT1t4UDSYBb0ks6KPxd06EgP7E3pSP3yRkgiqGYLG0t11Agr9 TGnA== 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=BXyobBCiK71Zt2isLjMfH1BNQzdYefjieioYS1K1+XI=; b=Z6WT6j9sFVW3xCVBNr68DPBFyZgf4+kNHY59fVXqLymrwR6FscT6gAF8w80BhImbG+ D3iGOPAKkD0NLlZMUB+8aBc1lvyyxnMS9VNGC2SLEqSGDNGzbDUDStKBClGRDZMlmBnl wjIkDCla+rGTDGQjADeongLtTV9u5g0K7fY0B6XPy6HLEWyB15FM2mYSxvrSSyyOlays BXNPsS7GOorGbijRNXKWJhMKnwcU4gv2sQHPrE4fDUOefLpDMzoOZwxJias7nzarTIzz c79BrXdq9Jdu7szfcsWOiySnRR/XzpiQIxUgMw3QIqZHoL3GSITgQQpL+vYEJdcupnPe gbew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=fTKInm+x; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id s3-20020a17090699c300b00738466b687dsi2321368ejn.318.2022.08.14.22.48.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Aug 2022 22:48:54 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=fTKInm+x; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E5D8C3857C42 for ; Mon, 15 Aug 2022 05:48:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E5D8C3857C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1660542527; bh=BXyobBCiK71Zt2isLjMfH1BNQzdYefjieioYS1K1+XI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=fTKInm+x93fR5DWts3b9mcDWVh/FUUD18Z1QseRVkfnSNBhFtfpC4xi3e/J3mvTyC d+5aQc2BnWNVD7O/fo1ys4EzyFWO+Til6n91/Q/8eG8Nat5jaMoQ3cwyiu7gQ8Y0h1 qonUTY82ifmvj7X4GwgcRJMjTtOwdJKE1QhW1pXs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by sourceware.org (Postfix) with ESMTPS id DC9F338582BA for ; Mon, 15 Aug 2022 05:48:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DC9F338582BA Received: by mail-pg1-x532.google.com with SMTP id s206so5755559pgs.3 for ; Sun, 14 Aug 2022 22:48:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=BXyobBCiK71Zt2isLjMfH1BNQzdYefjieioYS1K1+XI=; b=u++PIdaBeOvEkDuPDnSTLwI1WioxwpnmO3hZnYwtqXr4xmEsAGZp2SBnut7V3eq3wy VONTweNyMpe6V69GnW7jmz6TbAfZf2Nslu9x6hZMokIfGFRfsDooAyGK2Qy0tfzYJ99t 15ftyi/jRtAwPbg7l4p1krjWWv0c8U0dTm5m0xH8Ig0PoXq8Naoy9mR0PvKCaObo/quY PmkADQ55v1qKC1CJyi80HwNxALM1rnXSMT0iI4hHJ3HK9p3sbuxjGkfjES1HRg1GBAN+ vwrn4Qhx0n4lTd09kGVkRf1HWDAoxN2gUigmVVH69qBFrhbUZCSGJPnnDiVwRGEJ7D/L MvCA== X-Gm-Message-State: ACgBeo3odDBIR5MqWgJm2CAVkebCUNXCcvLZkOXBwV2VXKCVny0GtKqR LRW3Di4vkrolBVXXtMdJAXZJc02ED1jBlA== X-Received: by 2002:a63:494a:0:b0:41c:f29e:2a2e with SMTP id y10-20020a63494a000000b0041cf29e2a2emr12579304pgk.477.1660542482461; Sun, 14 Aug 2022 22:48:02 -0700 (PDT) Received: from pmarheine2.syd.corp.google.com ([2401:fa00:9:14:3a8:5462:3205:cd6f]) by smtp.gmail.com with ESMTPSA id q3-20020a17090a304300b001f2c22fa4ddsm3854797pjl.50.2022.08.14.22.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Aug 2022 22:48:01 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] riscv: elf-multilib: add rv32iafc to defaults Date: Mon, 15 Aug 2022 15:47:53 +1000 Message-Id: <20220815054753.3796727-1-pmarheine@chromium.org> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog MIME-Version: 1.0 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, JMQ_SPF_NEUTRAL, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Peter Marheine via Gcc-patches From: Peter Marheine Reply-To: Peter Marheine Cc: Peter Marheine Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1741205049051210449?= X-GMAIL-MSGID: =?utf-8?q?1741205049051210449?= rv32iafc-ilp32 is compatible with rv32iac-ilp32 for library implementation, so add a reuse rule allowing the default configuration to support rv32iafc. -IAFC is an unusual configuration (much less common than -IMAFC), but multilib reuse has essentially no cost: this change is useful to users of platforms that support hardware floating-point but cannot use hardware multiply/divide for any reason. To avoid generating a new set of libraries this is limited to the soft-float ABI. Tested by verifying that `gcc -march=rv32iafc -mabi=ilp32 --print-search-dirs` refers to the rv32iac/ilp32 library directory as expected, rather than just the root library directory as occurs when an unsupported target is selected (for instance, rv32id). Signed-off-by: Peter Marheine --- gcc/config/riscv/t-elf-multilib | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/riscv/t-elf-multilib b/gcc/config/riscv/t-elf-multilib index 19f9434616c..6e74b1811be 100644 --- a/gcc/config/riscv/t-elf-multilib +++ b/gcc/config/riscv/t-elf-multilib @@ -1,11 +1,12 @@ # This file was generated by multilib-generator with the command: -# ./multilib-generator rv32i-ilp32--c rv32im-ilp32--c rv32iac-ilp32-- rv32imac-ilp32-- rv32imafc-ilp32f-rv32imafdc- rv64imac-lp64-- rv64imafdc-lp64d-- -MULTILIB_OPTIONS = march=rv32i/march=rv32ic/march=rv32im/march=rv32imc/march=rv32iac/march=rv32imac/march=rv32imafc/march=rv32imafdc/march=rv32gc/march=rv64imac/march=rv64imafdc/march=rv64gc mabi=ilp32/mabi=ilp32f/mabi=lp64/mabi=lp64d +# ./multilib-generator rv32i-ilp32--c rv32im-ilp32--c rv32iac-ilp32--f rv32imac-ilp32-- rv32imafc-ilp32f-rv32imafdc- rv64imac-lp64-- rv64imafdc-lp64d-- +MULTILIB_OPTIONS = march=rv32i/march=rv32ic/march=rv32im/march=rv32imc/march=rv32iac/march=rv32iafc/march=rv32imac/march=rv32imafc/march=rv32imafdc/march=rv32gc/march=rv64imac/march=rv64imafdc/march=rv64gc mabi=ilp32/mabi=ilp32f/mabi=lp64/mabi=lp64d MULTILIB_DIRNAMES = rv32i \ rv32ic \ rv32im \ rv32imc \ rv32iac \ +rv32iafc \ rv32imac \ rv32imafc \ rv32imafdc \ @@ -25,6 +26,7 @@ march=rv64imac/mabi=lp64 \ march=rv64imafdc/mabi=lp64d MULTILIB_REUSE = march.rv32i/mabi.ilp32=march.rv32ic/mabi.ilp32 \ march.rv32im/mabi.ilp32=march.rv32imc/mabi.ilp32 \ +march.rv32iac/mabi.ilp32=march.rv32iafc/mabi.ilp32 \ march.rv32imafc/mabi.ilp32f=march.rv32imafdc/mabi.ilp32f \ march.rv32imafc/mabi.ilp32f=march.rv32gc/mabi.ilp32f \ march.rv64imafdc/mabi.lp64d=march.rv64gc/mabi.lp64d