From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id B8D5C3857C53 for ; Mon, 10 Aug 2020 19:06:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B8D5C3857C53 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-371-x9Zg6mygPsmDOUE6NaG7dQ-1; Mon, 10 Aug 2020 15:06:39 -0400 X-MC-Unique: x9Zg6mygPsmDOUE6NaG7dQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1B9D78005B0; Mon, 10 Aug 2020 19:06:38 +0000 (UTC) Received: from calimero.vinschen.de (ovpn-112-47.ams2.redhat.com [10.36.112.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E05495D9D3; Mon, 10 Aug 2020 19:06:37 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 783AFA80905; Mon, 10 Aug 2020 21:06:36 +0200 (CEST) Date: Mon, 10 Aug 2020 21:06:36 +0200 From: Corinna Vinschen To: Keith Packard Cc: newlib@sourceware.org Subject: Re: [PATCH 0/3] ARM with only 32-bit floats do not have fast 64-bit FMA Message-ID: <20200810190636.GE53219@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: Keith Packard , newlib@sourceware.org References: <20200808223413.4015633-1-keithp@keithp.com> MIME-Version: 1.0 In-Reply-To: <20200808223413.4015633-1-keithp@keithp.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: Mon, 10 Aug 2020 19:06:42 -0000 On Aug 8 15:34, Keith Packard via Newlib wrote: > I added some new test configurations to my CI system for picolibc and > discovered that when the new math code was built on 32-bit ARM > processors with only single-precision floating hardware, several math > functions were returning imprecise results. I got the expected results > on processors with no FPU and on processors with both 32- and 64- bit > FPUs. > > I discovered that the affected functions were using the 'fma' function > on this hardware, even though (lacking 64-bit HW support), that > function was being emulated without the required precision. > > This all boiled down to math_config.h incorrectly detecting 64-bit FMA > support on ARM processors. > > This patch series contains three changes: > > 1. fix the fast FMA process so that 32-bit ARM processors without 64-bit FMA > support don't use 'fma' for the new math functions > > 2. Add detection of fast FMAF, which 32-bit ARM processors with only > 32-bit FPUs *do* support. > > 3. Add ARM versions of fma and fmaf which are used when those > instructions are available. > Pushed. I just regen'ed newlib/libm/machine/arm/Makefile.in. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat