There are platforms without support of CTZ & popcount. To compile BHND for MIPS, new custom functions are implemented.
Performance of functions seems to nice, but additional tests are welcome!
Differential D5648
[BHND] create custom CTZ & popcount functions for cross-compilation mizhka on Mar 16 2016, 10:56 AM. Authored by Tags None Referenced Files
Subscribers
Details
There are platforms without support of CTZ & popcount. To compile BHND for MIPS, new custom functions are implemented. Performance of functions seems to nice, but additional tests are welcome!
Diff Detail
Event TimelineComment Actions Minor issues aside, LGTM. @adrian Should we lift out the portable ctz32 for general use? If so, do you have any suggestions on where? cdefs.h? The __bitcount*() macros that already exist don't really belong in types.h: /* * The following are all things that really shouldn't exist in this header, * since its purpose is to provide typedefs, not miscellaneous doodads. */
Comment Actions Hm, is this stuff being called often enough to justify this custom popcount/bitcount stuff? Comment Actions Hi @adrian This stuff is called rare, but builtin_ctz, builtin_popcount are undefined in case of cross-compilation under MIPS. Comment Actions ok. how do I reproduce these being undefined during cross compile? I'd like to fix that bit first. :) Comment Actions Hm.. just try to compile bhnd under MIPS. Possible way: You can try to checkout both and revert particular patch. But to be honest, I'm not sure that this commit is compilable :( |