core: add bitop implementations for darwin and linux
This commit is contained in:
16
core/sys/linux/bitop.c
Normal file
16
core/sys/linux/bitop.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <blue/core/bitop.h>
|
||||
|
||||
int b_popcountl(long v)
|
||||
{
|
||||
return __builtin_popcountl(v);
|
||||
}
|
||||
|
||||
int b_ctzl(long v)
|
||||
{
|
||||
return __builtin_ctzl(v);
|
||||
}
|
||||
|
||||
int b_clzl(long v)
|
||||
{
|
||||
return __builtin_clzl(v);
|
||||
}
|
||||
Reference in New Issue
Block a user