From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from elaine.keithp.com (home.keithp.com [63.227.221.253]) by sourceware.org (Postfix) with ESMTPS id A8BDD384BC14 for ; Thu, 3 Sep 2020 20:54:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A8BDD384BC14 Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id 8844B3F2D700 for ; Thu, 3 Sep 2020 13:54:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from elaine.keithp.com ([127.0.0.1]) by localhost (elaine.keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jmrV1lCCWWAb; Thu, 3 Sep 2020 13:54:37 -0700 (PDT) Received: from keithp.com (koto.keithp.com [10.0.0.2]) by elaine.keithp.com (Postfix) with ESMTPSA id 1CE083F2D6F9; Thu, 3 Sep 2020 13:54:37 -0700 (PDT) Received: by keithp.com (Postfix, from userid 1000) id B5789158229C; Thu, 3 Sep 2020 13:54:36 -0700 (PDT) From: Keith Packard To: newlib@sourceware.org Subject: [PATCH 2/2] libm/riscv: Use common fma code when necessary Date: Thu, 3 Sep 2020 13:54:33 -0700 Message-Id: <20200903205433.2108717-3-keithp@keithp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200903205433.2108717-1-keithp@keithp.com> References: <20200903205433.2108717-1-keithp@keithp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2020 20:54:40 -0000 For RISC-V targets without hardware FMA support, include the common fma implementation to provide that API. Signed-off-by: Keith Packard --- newlib/libm/machine/riscv/s_fma.c | 2 ++ newlib/libm/machine/riscv/sf_fma.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/newlib/libm/machine/riscv/s_fma.c b/newlib/libm/machine/riscv/s_fma.c index b7f378071..2d9ebfc99 100644 --- a/newlib/libm/machine/riscv/s_fma.c +++ b/newlib/libm/machine/riscv/s_fma.c @@ -46,4 +46,6 @@ fma (double x, double y, double z) return result; } +#else +#include "../../common/s_fma.c" #endif diff --git a/newlib/libm/machine/riscv/sf_fma.c b/newlib/libm/machine/riscv/sf_fma.c index 8061a8abb..285c54883 100644 --- a/newlib/libm/machine/riscv/sf_fma.c +++ b/newlib/libm/machine/riscv/sf_fma.c @@ -46,4 +46,6 @@ fmaf (float x, float y, float z) return result; } +#else +#include "../../common/sf_fma.c" #endif -- 2.28.0