From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113721 invoked by alias); 26 Sep 2019 15:01:35 -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 113712 invoked by uid 89); 26 Sep 2019 15:01:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,MISSING_HEADERS,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 spammy=H*i:sk:bCTiU1Q, H*f:sk:bCTiU1Q X-HELO: smtp-out-no.shaw.ca Received: from smtp-out-no.shaw.ca (HELO smtp-out-no.shaw.ca) (64.59.134.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Sep 2019 15:01:33 +0000 Received: from [192.168.1.114] ([24.64.172.44]) by shaw.ca with ESMTP id DVGtijdBbsAGkDVGuiOmjZ; Thu, 26 Sep 2019 09:01:32 -0600 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: i386 long double math methods Cc: Newlib References: <8d1dc715-3624-9497-296f-de29a96cdd00@SystematicSw.ab.ca> From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <06030951-aeb6-9f91-de1a-93b597467c44@SystematicSw.ab.ca> Date: Thu, 26 Sep 2019 15:01:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019/txt/msg00584.txt.bz2 On 2019-09-26 07:23, Joel Sherrill wrote: > On Thu, Sep 26, 2019 at 12:24 AM Brian Inglis wrote: >> On 2019-09-25 16:06, Joel Sherrill wrote: >>> i386-rtems tools do not include long double math routines but Cygwin >>> does and there is a comment in math.h indicating they have code >>> elsewhere for these. >>> Are these OK to use to fill in the long double gaps? >> >> Cygwin just uses straight newlib/libm, and the BSD versions of those long double >> math functions are already in newlib/libm/*/*l.c and available on Cygwin: sizeof >> float80, float128, and long double are all 16. > > On RTEMS i386, long double != double and this code is disabled so we end up > missing the entire set of long double methods. That's what I am trying > to resolve. > >> There are also some x86 asm and fast math specializations under winsup/cygwin/math/ >> Or are you talking about other long double math functions not included? > > Thanks. I need to move these to newlib/libm/ when I finish the fenv.h. BEWARE: /* ... On Cygwin the long double functions are implemented independently from newlib to be able to use optimized assembler functions despite using the *Microsoft x86_64 ABI*. */ > BTW and please, do you see what's wrong in my fenv.h patch for x86_64? > I would really like to wrap that up and move on to something else. :) Sorry, not good with autotools, but something must be undefined to or in NEWLIB_CONFIGURE, and I'm suspicious of ././config.cache and ../../.././config.cache given message: line 1679: syntax error near unexpected token `../../..' >> You should be able to persuade configure to build RTEMS newlib/libm with a heavy >> platform config supporting long double size 16 and excluding _LDBL_EQ_DBL. > > As I said earlier, long double != double on this target and this code > is disabled. > I suspect most i386 and x86_64 newlib targets are missing the same math methods > unless they provide them special like newlib. Should be enabled if $(CC) defines LDBL_MANT_DIG != DBL_MANT_DIG and long double compiles. May want to --enable-newlib-io-long-double. > Thanks for the pointer to winsup. I will move those to newlib once the > fenv.h patch is resolved. BEWARE: /* ... On Cygwin the long double functions are implemented independently from newlib to be able to use optimized assembler functions despite using the *Microsoft x86_64 ABI*. */ -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised.