From owner-svn-src-projects@freebsd.org Fri Aug 7 20:13:05 2015 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0716C9B6410 for ; Fri, 7 Aug 2015 20:13:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECBD8FF; Fri, 7 Aug 2015 20:13:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t77KD4e1025119; Fri, 7 Aug 2015 20:13:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t77KD4Xu025118; Fri, 7 Aug 2015 20:13:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201508072013.t77KD4Xu025118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 7 Aug 2015 20:13:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r286421 - projects/clang-trunk/lib/msun/src X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2015 20:13:05 -0000 Author: dim Date: Fri Aug 7 20:13:04 2015 New Revision: 286421 URL: https://svnweb.freebsd.org/changeset/base/286421 Log: Apply an atrocious hack to libm's pow() implementation, to work around LLVM PR 24343. This fixes the graphics/png build on i386, which otherwise failed during its tests because of floating point exceptions, leading to >5000 skipped other ports. Modified: projects/clang-trunk/lib/msun/src/e_pow.c Modified: projects/clang-trunk/lib/msun/src/e_pow.c ============================================================================== --- projects/clang-trunk/lib/msun/src/e_pow.c Fri Aug 7 19:56:22 2015 (r286420) +++ projects/clang-trunk/lib/msun/src/e_pow.c Fri Aug 7 20:13:04 2015 (r286421) @@ -162,7 +162,13 @@ __ieee754_pow(double x, double y) if(lx==0) { if(ix==0x7ff00000||ix==0||ix==0x3ff00000){ z = ax; /*x is +-0,+-inf,+-1*/ - if(hy<0) z = one/z; /* z = (1/|x|) */ + if(hy<0) { +#ifdef __i386__ + /* XXX: Work around llvm PR 24343: */ + __compiler_membar(); +#endif + z = one/z; /* z = (1/|x|) */ + } if(hx<0) { if(((ix-0x3ff00000)|yisint)==0) { z = (z-z)/(z-z); /* (-1)**non-int is NaN */