From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48319 invoked by alias); 29 Aug 2019 08:03:13 -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 48306 invoked by uid 89); 29 Aug 2019 08:03:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Aug 2019 08:03:11 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45C2E308427D; Thu, 29 Aug 2019 08:03:10 +0000 (UTC) Received: from calimero.vinschen.de (ovpn-116-213.ams2.redhat.com [10.36.116.213]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE9D4600C1; Thu, 29 Aug 2019 08:03:09 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 7C5BCA805FB; Thu, 29 Aug 2019 10:03:08 +0200 (CEST) Date: Thu, 29 Aug 2019 08:03:00 -0000 From: Corinna Vinschen To: Joel Sherrill Cc: Newlib Subject: Re: [PATCH 3/3] Add i386 and x86_64 fenv support from Cygwin. Message-ID: <20190829080308.GU11632@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: Joel Sherrill , Newlib References: <1567004819-5473-1-git-send-email-joel@rtems.org> <1567004819-5473-4-git-send-email-joel@rtems.org> <20190828154146.GP11632@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KyQYs6ZyN5PqqdMo" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019/txt/msg00531.txt.bz2 --KyQYs6ZyN5PqqdMo Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1963 On Aug 28 11:57, Joel Sherrill wrote: > On Wed, Aug 28, 2019 at 10:41 AM Corinna Vinschen w= rote: > > > +/* The header shall define the following constant, which > > > + represents the default floating-point environment (that is, the o= ne > > > + installed at program startup) and has type pointer to const-quali= fied > > > + fenv_t. It can be used as an argument to the functions within the > > > + header that manage the floating-point environment. */ > > > + > > > +extern const fenv_t *_fe_dfl_env; > > > +#define FE_DFL_ENV (_fe_dfl_env) > > > > These can go away, right? They are already defined in > > newlib/libc/include/sys/fenv.h. >=20 > Each architecture overrides sys/fenv.h. There is no sharing of > libc/include/sys/fenv.h > with a functional implementation. Miscomprehension on my side, sorry. > > > +/* Returns the currently selected precision, represented by one of = the > > > + values of the defined precision macros. */ > > > +int > > > +fegetprec (void) > > > +{ > > > [...] > > > +int > > > +fesetprec (int prec) > > > +{ > > > [...] > > > +#endif > > > > Uh oh. What about _feinitialise()? Cygwin calls this function > > right from the initial code, but is it really the right thing > > to enforce this for all i386/x86_64 targets? > > > > Any idea how we can generate the default environment on the fly > > while maintaining backward compat on Cygwin? >=20 > Cygwin, libgloss, and RTEMS could call this I suppose. But each OS would = have > to do their own thing. >=20 > Should be really be called from the beginning of each thread? Otherwise, > things are inconsistent. What about initializing on the fly at the start of each affected function? If we find a nice way to do that I'd also push that chage into Cygwin. There's no obvious reason that we actually *have* to initalize the fp environment in each process. Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --KyQYs6ZyN5PqqdMo Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1nhrwACgkQ9TYGna5E T6Ah9A/8CrPLWujQFxY8P3xFrLxDQ3SfS7jG3lacZRqROq+/TPVyg+FQa0IFu2OM wASkyLcbxofGFHBpGqeHEb3QhxLvFHgRbgrPVJ+XzlwafA4/VZKdipc0ks2+YTgf k2WJU0tXgg8q99iQ8WGqIBQ/28X0vShBropfbmkKD2cwqcALVjmA/sjuWbvEhG8f ccFBZIjxdC7ledcHyYOCnOeiosLtSbjrvZY/ZK/SPI7i2g6aFayI1Vlymy3dqKNT nAV4ELwNY35R/v831Sz93nBwYk0KIH9/g+UhnKjXLcEPydIlptR/j5S3kPuiNjat 1IaYFY25XTGFYcNlFBf4ixkCHYmfyxeWxnP9m8y8zxda5MiZiWk+UZMxxF86e1Rz 5oQVpxDf7MDkJ4M6jqSo+v/BeYh0A9tT4hdJqGRi7tU1zoKLRQzPe3eXbDJaYEwT oNFISP/M7yj/Z5Cyq2sI6p1uGDJGKqerZTtgSYT6bfVwQqN3bczw8uZw/CxMDRa+ Q5a4G0t1vTNUkFTTpvdf3QPiSuVGOSpzkZjJswupiFRaJfcexileqhN+KEbB4glQ /XauGnzT5JeIRV1ARUwSH0nZ3HVfTjHys7Gqw+Pb5BWod8tLmjN8qAYuzFbwChtN o8S08Pn6+Shhv7EA1834/WTZ7YPxL26QGe7MKFJKyHF78hbPlEg= =3mLb -----END PGP SIGNATURE----- --KyQYs6ZyN5PqqdMo--