From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) by sourceware.org (Postfix) with ESMTPS id 115263858D34 for ; Thu, 2 Jul 2020 15:48:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 115263858D34 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joel.sherrill@gmail.com Received: by mail-ej1-f66.google.com with SMTP id dr13so30327663ejc.3 for ; Thu, 02 Jul 2020 08:48:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=XsFAY5Hvu4RC/YUiRyAmYbqOt1F2ulS1L/NQtm8OPvw=; b=d8xAaBKkA1l70o+BUNk7IhGOcymoax24XjcN/m3MCJIRQShe10otj3mx8SrtUbhZKX h5mX7l+5BVZNgPe77Mq1wUYCFPuiQiA5QGB+Ti71jsbl27S3yn76Bqsyv4VKCytScZ8V RFXMhdvi9MRJcd4rudZsz+Dy+gmfb87MgmcLPzWXiNqamPxl90cSEebmDriJ+wmVl1L+ DvwpEXAljSVRBPneG6kW6atJK5EVMqa29MCM16VUtrHqJpjK8GDjX0fcet6tCiy0Ojfv QSM6to7KXcloC5Jt9qO2UmWU91lohwaCz6M9bkToAjEG5pUAS38mxn+U3AGGO4vXEUBw JnHg== X-Gm-Message-State: AOAM5318wZiKFx7effMdDfu5xnprwEbHtPLS6cmxIWDF3Y/9ZGE9i4yf CKjeFb8KskLffN//yI++BOOGKQhZ X-Google-Smtp-Source: ABdhPJxeXiffCpQEdWt/sRK3+3pnZLJt4vgj7xhTzxsiqtH6bPq7/3mWgYyWMiDhcg4+jA6tKBmcNQ== X-Received: by 2002:a17:907:20b4:: with SMTP id pw20mr29191221ejb.225.1593704892774; Thu, 02 Jul 2020 08:48:12 -0700 (PDT) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com. [209.85.218.51]) by smtp.gmail.com with ESMTPSA id y21sm7145198ejo.4.2020.07.02.08.48.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jul 2020 08:48:12 -0700 (PDT) Received: by mail-ej1-f51.google.com with SMTP id y10so30300608eje.1 for ; Thu, 02 Jul 2020 08:48:12 -0700 (PDT) X-Received: by 2002:a17:906:1a16:: with SMTP id i22mr9286622ejf.439.1593704892079; Thu, 02 Jul 2020 08:48:12 -0700 (PDT) MIME-Version: 1.0 References: <20200603174509.18606-1-eshandhawan51@gmail.com> <20200603174509.18606-2-eshandhawan51@gmail.com> <20200702121131.GE22681@arm.com> In-Reply-To: <20200702121131.GE22681@arm.com> Reply-To: joel@rtems.org From: Joel Sherrill Date: Thu, 2 Jul 2020 10:48:00 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/1] fenv support arm To: Szabolcs Nagy Cc: Eshan dhawan , Newlib , jeol@rtems.org X-Spam-Status: No, score=-3032.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE, KAM_DMARC_STATUS, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Thu, 02 Jul 2020 15:48:15 -0000 On Thu, Jul 2, 2020 at 7:11 AM Szabolcs Nagy wrote: > The 06/03/2020 23:15, Eshan dhawan via Newlib wrote: > > --- /dev/null > > +++ b/newlib/libc/machine/arm/sys/fenv.h > ... > > +#ifndef __ARM_PCS_VFP > > + > > +int feclearexcept(int excepts); > > +int fegetexceptflag(fexcept_t *flagp, int excepts); > > +int fesetexceptflag(const fexcept_t *flagp, int excepts); > > +int feraiseexcept(int excepts); > > +int fetestexcept(int excepts); > > +int fegetround(void); > > +int fesetround(int round); > > +int fegetenv(fenv_t *envp); > > +int feholdexcept(fenv_t *envp); > > +int fesetenv(const fenv_t *envp); > > +int feupdateenv(const fenv_t *envp); > > +#if __BSD_VISIBLE > > +int feenableexcept(int __mask); > > +int fedisableexcept(int __mask); > > +int fegetexcept(void); > > +#endif /* __BSD_VISIBLE */ > > + > > +#endif /* __ARM_PCS_VFP */ > > why are these declarations conditional? > The prototypes for the POSIX methods are in the shared fenv.h. Since the ARM has the BSD_VISIBLE extras, those should be left in the arm specific sys/fenv.h. But (I don't think) they need a ARM_PCS_VFP wrapper since there should be an implementation for all multilibs. We could discuss the BSD_VISIBLE prototypes being moved to and removed from all the architecture but that was also how the code I moved from Cygwin to newlib libm was done so maybe there is a reason that I don't know to leave it here. > > i get build failures e.g. in libgfortran > because configure detects the availability > of feenableexcept in libm.a so it starts > using it but then fenv.h does not have the > declaration so compilation fails. > > it seems there is vfp code for all this > so why are the declarations removed? > The FreeBSD headers rely on the architecture sys/fenv.h prototypes even for POSIX standard methods. Most of the block of code is removed because the prototypes were in which is where this file is included from. Eshan... re-add the BSD_VISIBLE block please and resubmit. It also looks like the test code isn't exercising those methods so that should be updated after this patch is updated. We don't want libfortran broken for longer than neccessary. --joel