This primarily affects the FreeBSD kernel, where the popcount builtin can be problematic (relies on compiler-provided libraries). See the history of __POPCNT__ for details [1]. - A new flag, CK_MD_CC_BUILTIN_DISABLE, can be set to indicate that CK should not rely on compiler builtins when possible. - ck_cc_clz has been removed, it was unused. - ck_internal_bsf has been removed, it was duplicate of ck_cc_ffs but broken, replaced in favor of ck_cc_ffs. Previous consumers were using the bsf instruction, eitherway. - ck_{rhs,hs,ht} have been updated to use ck_cc_ffs*. If FreeBSD requires the builtins for performance reasons, we will lift the appropriate detection into ck_md (at least, bt* bs* family of functions don't have the same problems on most targets unlike popcount). 1: https://lists.freebsd.org/pipermail/svn-src-head/2015-March/069663.htmlcos
parent
cb03847a82
commit
afe01108d1
Loading…
Reference in new issue