From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58020 invoked by alias); 27 Aug 2019 13:32:09 -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 58012 invoked by uid 89); 27 Aug 2019 13:32:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-oi1-f180.google.com Received: from mail-oi1-f180.google.com (HELO mail-oi1-f180.google.com) (209.85.167.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Aug 2019 13:32:07 +0000 Received: by mail-oi1-f180.google.com with SMTP id 16so14907736oiq.6 for ; Tue, 27 Aug 2019 06:32:07 -0700 (PDT) Return-Path: Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com. [209.85.210.43]) by smtp.gmail.com with ESMTPSA id x20sm5006564otk.79.2019.08.27.06.32.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Aug 2019 06:32:05 -0700 (PDT) Received: by mail-ot1-f43.google.com with SMTP id p23so14474756oto.0 for ; Tue, 27 Aug 2019 06:32:05 -0700 (PDT) MIME-Version: 1.0 Reply-To: joel@rtems.org From: Joel Sherrill Date: Tue, 27 Aug 2019 13:32:00 -0000 Message-ID: Subject: i386 and x86_64 fenv support To: Newlib Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019/txt/msg00510.txt.bz2 Hi Earlier we discussed moving the winsup fenv.h files to newlib. Splitting winsup/cygwin/include/fenv.h to create a sys/fenv.h looks easy enough. But I have some status and a question after tinkering with this code out of tree and compiling with the RTEMS i386 and x86_64 It includes winsup.h and wincap.h but it doesn't need them. It is a C++ file and changing it to C only resulted in needing to change bool to int and true/false to 1/0. That should be OK. There are prototypes for fegetprec() and fesetprec(). I think the prototypes need to move to the shared fenv.h and commented stubs for the constants needs to be in the shared dummy sys/fenv.h. Does this sound right? My remaining issue is that it appears that i386 and x86_64 will need to share the same files. Do I just copy the files to both machine directories? I don't know if newlib's build infrastructure supports putting it in one place and using it in another architecture. FWIW this moved up in importance because the x86_64 RTEMS toolchain won't build with the gcc/newlib master because libquadmath assumes the existence of the FE_TONEAREST since it the autoconf probe now sees we have fenv.h support now. This is probably a bug in this code since it can't assume a rounding mode is supported. Feedback appreciated. Thanks. --joel