From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id bab15f91 for ; Sat, 22 Feb 2020 20:17:18 +0000 (UTC) Received: (qmail 5456 invoked by uid 550); 22 Feb 2020 20:17:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 5438 invoked from network); 22 Feb 2020 20:17:16 -0000 Date: Sat, 22 Feb 2020 15:17:04 -0500 From: Rich Felker To: musl@lists.openwall.com Message-ID: <20200222201704.GL1663@brightrain.aerifal.cx> References: <20200124011122.GP30412@brightrain.aerifal.cx> <20200124045554.GR30412@brightrain.aerifal.cx> <20200124134402.GS30412@brightrain.aerifal.cx> <20200125001100.GY30412@brightrain.aerifal.cx> <20200203020945.GK1663@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Considering x86-64 fenv.s to C On Mon, Feb 03, 2020 at 01:12:35PM +1100, Damian McGuckin wrote: > On Sun, 2 Feb 2020, Rich Felker wrote: > > >Hi. Just checking in to let you know I'm not ignoring you, but > >might need a bit to task-switch back to following up on this. I'll > >try to do it in parallel with finishing up the release cycle. > > No rush. I have to fight other fires for most of this week anyway. OK, I'm going to start review and follow-up now. Sorry it's taken so long. Back-and-forth over time64 concerns in applications & testing, documenting time64 transition for users, etc. took a lot longer than I had hoped but it's done now. :-) First comment: I couldn't find (maybe I missed?) what you intend fore the contents of fenv-generic.c and fenv-trivial.c to be, but I don't see what you want them for. fenv.c should just use the macros/inlines the fenv_arch.h defines, naturally collapsing to empty functions when they do nothing (for softfloat archs). In general, the idiom of #include "../foo.c" for $(ARCH)/foo.c only works when the names are the same, so that the arch file is replacing the one in the parent dir, and there are special cases (subarch variants) where you want the arch dir to just do the same thing as the generic file in the parent dir does, or where it's doing approximately the same thing but with some macros defined to change what it does. The way you seem to be trying to do it, src/fenv/fenv-generic.c, src/fenv/fenv-trivial.c, and src/fenv/$(ARCH)/fenv.c would all be getting built. A couple minor style things I also spotted right away: If you want an unsigned 0 constant, 0U is very much preferred to ((unsigned)0), and not putting the type there at all is preferable unless there's a good reason you need it (like to make other things in expressions get coerced to unsigned). Also verbose type names like "unsigned int" in place of just "unsigned" are not preferred. If they appear in some existing places in the source, it's by mistake/oversight. I'll follow up with more interesting technical review soon. Rich