Remove dependency on bits.h in default.c when BUILDING_MODULAR_GC
We can assume that the compiler will have __builtin_clzll so we can implement nlz_int64 using that.
This commit is contained in:
parent
4f9f2243e9
commit
9130023cf5
Notes:
git
2025-05-23 18:36:11 +00:00
@ -15,7 +15,11 @@
|
|||||||
# include <sys/user.h>
|
# include <sys/user.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "internal/bits.h"
|
#ifdef BUILDING_MODULAR_GC
|
||||||
|
# define nlz_int64(x) (x == 0 ? 64 : (unsigned int)__builtin_clzll((unsigned long long)x))
|
||||||
|
#else
|
||||||
|
# include "internal/bits.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "ruby/ruby.h"
|
#include "ruby/ruby.h"
|
||||||
#include "ruby/atomic.h"
|
#include "ruby/atomic.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user