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 332983857C59 for ; Sat, 8 Aug 2020 22:34:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 332983857C59 Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id 2C9AF3F2D302 for ; Sat, 8 Aug 2020 15:34:16 -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 wh35hR8_8j0z; Sat, 8 Aug 2020 15:34:15 -0700 (PDT) Received: from keithp.com (koto.keithp.com [10.0.0.2]) by elaine.keithp.com (Postfix) with ESMTPSA id E373B3F2D2FF; Sat, 8 Aug 2020 15:34:14 -0700 (PDT) Received: by keithp.com (Postfix, from userid 1000) id AD9901582164; Sat, 8 Aug 2020 15:34:14 -0700 (PDT) From: Keith Packard To: newlib@sourceware.org Subject: [PATCH 1/3] libm: ARM without HW double does not have fast FMA Date: Sat, 8 Aug 2020 15:34:11 -0700 Message-Id: <20200808223413.4015633-2-keithp@keithp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200808223413.4015633-1-keithp@keithp.com> References: <20200808223413.4015633-1-keithp@keithp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.7 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: Sat, 08 Aug 2020 22:34:19 -0000 32-bit ARM processors with HW float (but not HW double) may define __ARM_FEATURE_FMA, but that only means they have fast FMA for 32-bit floats. Signed-off-by: Keith Packard --- newlib/libm/common/math_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libm/common/math_config.h b/newlib/libm/common/math_config.h index 1089b0ec6..df8f8d6e4 100644 --- a/newlib/libm/common/math_config.h +++ b/newlib/libm/common/math_config.h @@ -72,7 +72,7 @@ /* Compiler can inline fma as a single instruction. */ #ifndef HAVE_FAST_FMA -# if __aarch64__ || __ARM_FEATURE_FMA +# if __aarch64__ || (__ARM_FEATURE_FMA && (__ARM_FP & 8)) # define HAVE_FAST_FMA 1 # else # define HAVE_FAST_FMA 0 -- 2.28.0