Date: Fri, 7 Aug 2015 20:13:04 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r286421 - projects/clang-trunk/lib/msun/src Message-ID: <201508072013.t77KD4Xu025118@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508072013.t77KD4Xu025118>