From owner-svn-src-head@FreeBSD.ORG Mon Feb 9 21:55:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F69D20C; Mon, 9 Feb 2015 21:55:53 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 33E1D3B83; Mon, 9 Feb 2015 21:55:53 +0000 (UTC) Message-ID: <54D92CE8.1030803@FreeBSD.org> Date: Mon, 09 Feb 2015 16:55:52 -0500 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: John Baldwin , src-committers@freebsd.org Subject: Re: svn commit: r278474 - head/sys/sys References: <201502092103.t19L3OAn013792@svn.freebsd.org> <1698688.fEq0HxqPxg@ralph.baldwin.cx> In-Reply-To: <1698688.fEq0HxqPxg@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:55:53 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 02/09/2015 16:08, John Baldwin wrote: > On Monday, February 09, 2015 09:03:24 PM John Baldwin wrote: >> Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: 278474 >> URL: https://svnweb.freebsd.org/changeset/base/278474 >> >> Log: Use __builtin_popcnt() to implement a BIT_COUNT() operation >> for bitsets and use this to implement CPU_COUNT() to count the >> number of CPUs in a cpuset. >> >> MFC after: 2 weeks > > Yes, __builtin_popcnt() works with GCC 4.2. It should also allow > the compiler to DTRT in userland uses of this if -msse4.2 is > enabled. Back in 2012, when I submitted a similar patch, bde noted __builtin_popcount*() cannot be used with GCC 4.2 for *kernel* because it emits a library call. http://docs.freebsd.org/cgi/mid.cgi?20121116171923.L1135 FYI... Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU2SzhAAoJEHyflib82/FGzgoH/2mfCZTX6J84MYpfuJV5dnLQ 97Itozifc8qBNDCOIQ1PZNgxPed9U8Ma0o3Rntfl5X2VeAIc/c5JJhvQITUdhnn7 fyW5FcpvJGpHLcUWlTMT5CrZgmDswi6h1jIsbD6AKoIVNGau5kPhpn4LF7f19YU0 0Vm8L96gGrxjJb3SWdRC4znP1ezTCw3rUEyk2oPZBn69zoat1vBcV7WtathStcBg noIEydo6C5e4EC5SKbTi29aNd1KGafRIukkC8+jnZNCc8nYEVsUEX5SarKYmmpec NTSLfboTJ5YXZGsvIgGzld0Z/Hn54v8O0hhG1QO4kWh3wN40NVgNL0vkeiveqwE= =WDqA -----END PGP SIGNATURE-----