From owner-svn-src-all@FreeBSD.ORG Tue Dec 16 16:27:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CE06C73; Tue, 16 Dec 2014 16:27:43 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0ACDA91D; Tue, 16 Dec 2014 16:27:43 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id sBGGKtuA066425 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 16 Dec 2014 08:20:55 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id sBGGKtJ3066424; Tue, 16 Dec 2014 08:20:55 -0800 (PST) (envelope-from sgk) Date: Tue, 16 Dec 2014 08:20:55 -0800 From: Steve Kargl To: Ed Schouten Subject: Re: svn commit: r275819 - in head/lib/msun: ld128 ld80 src Message-ID: <20141216162055.GA64273@troutmask.apl.washington.edu> References: <201412160921.sBG9LvFY064961@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201412160921.sBG9LvFY064961@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2014 16:27:43 -0000 On Tue, Dec 16, 2014 at 09:21:57AM +0000, Ed Schouten wrote: > Author: ed > Date: Tue Dec 16 09:21:56 2014 > New Revision: 275819 > URL: https://svnweb.freebsd.org/changeset/base/275819 > > Log: > Rename cpack*() to CMPLX*(). This seems like a lot of code churn for very little benefit. In particular, I know that the one person working on fixing problems with FreeBSD's libm has a private repo and the openlibm and android developers base their libm off of FreeBSD's libm and now they'll need to resync their codebases and resolve conflicts. > Modified: head/lib/msun/src/math_private.h > ============================================================================== > --- head/lib/msun/src/math_private.h Tue Dec 16 08:29:02 2014 (r275818) > +++ head/lib/msun/src/math_private.h Tue Dec 16 09:21:56 2014 (r275819) > @@ -454,9 +454,16 @@ typedef union { > * (0.0+I)*(y+0.0*I) and laboriously computing the full complex product. > * In particular, I*Inf is corrupted to NaN+I*Inf, and I*-0 is corrupted > * to -0.0+I*0.0. > + * > + * The C11 standard introduced the macros CMPLX(), CMPLXF() and CMPLXL() > + * to construct complex values. The functions below are modelled after > + * these macros, with the exception that they cannot be used to > + * construct compile-time complex values. This comment isn't true! These functions pre-date C11 by years. See r151865. These functions were designed to deal with gcc's poorly implemented I. See the paragraph above your comment. > */ > + > +#ifndef CMPLXF > static __inline float complex > -cpackf(float x, float y) > +CMPLXF(float x, float y) > { > float_complex z; > > @@ -464,9 +471,11 @@ cpackf(float x, float y) > IMAGPART(z) = y; > return (z.f); > } > +#endif Why not use a much less invasive change? #ifdef CMPLXF #define cpackf(x, y) CMPLXF((x), (y)) #else static __inline float complex cpackf(float x, float y) { float_complex z; REALPART(z) = x; IMAGPART(z) = y; return (z.f); } #endif -- steve