From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 370 invoked by alias); 14 Aug 2017 14:05:03 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 355 invoked by uid 89); 14 Aug 2017 14:05:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_00,KAM_INFOUSMEBIZ,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*r:0500, softfloat.html, UD:jhauser.us, SoftFloathtml X-HELO: oarmail.OARCORP.com Received: from oarmail.oarcorp.com (HELO oarmail.OARCORP.com) (67.63.146.244) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Aug 2017 14:05:01 +0000 Received: from [192.168.1.124] (192.168.1.124) by OARmail.OARCORP.com (192.168.2.2) with Microsoft SMTP Server (TLS) id 8.3.389.2; Mon, 14 Aug 2017 09:04:59 -0500 Subject: Re: Adding fenv.h for ARM and SPARC To: Wilco Dijkstra , Jon Beniston , "aadit0402@gmail.com" CC: "newlib@sourceware.org" , nd References: <012301d314f1$36362bb0$a2a28310$@beniston.com> From: Joel Sherrill Message-ID: <53ee8c33-cc32-bc30-709e-c6022b977f18@oarcorp.com> Date: Mon, 14 Aug 2017 15:25:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017/txt/msg00808.txt.bz2 On 8/14/2017 7:46 AM, Wilco Dijkstra wrote: > Jon Beniston wrote: >>> When you use software floating point there is no need for fenv. The >> rounding mode is >>> fixed and there are no exceptions. >> >> That's not true for the softfloat lib though (assuming we're talking about >> (http://www.jhauser.us/arithmetic/SoftFloat.html) - which I believe supports >> both. > > I was guessing that wasn't what the OP meant. The spu target was mentioned, > which has an fenv implementation in newlib - but that is for hardware floating point. > > But yes it would be good if the OP clarifies what they are proposing. Aditya is an RTEMS Google Summer of Code student so let me try to explain the goal. newlib has very limited support for fenv.h. I forgot most of the target architectures do have a mix of hard and soft float multilibs but soft float isn't the main goal. We want him to bring over the fenv.h support for as many architectures as possible from NetBSD and FreeBSD. They appear to have a structure of including . It would be great if newlib followed this pattern so we could just drop in their support. That leads to a few questions on how to achieve this: + Where would a file installed for the ARM as machine/fenv.h need to be in the newlib/libm/machine source tree? I think it would be newlib/libm/machine/ARCH/machine/fenv.h. + A common fenv.h would be nice. Could we use the *BSD fenv.h over in libc/include and then have it include machine/fenv.h. I think this would require reconciling the SPU and perhaps winsup versions. + If the *BSD implementation has source files, they would drop in libm/machine/ARCH/. That does leave the question of what happens to all of fenv.h when soft-float is enabled. But the first order of business was to move newlib libm from really not having any fenv.h support for the main architectures to using the *BSD support. That should provide the background on what he is trying to do. If the SPU weren't in the tree, this would be easier. :) --joel RTEMS > Wilco >