mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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
1 changed files with 5 additions and 1 deletions
|
@ -15,7 +15,11 @@
|
|||
# include <sys/user.h>
|
||||
#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/atomic.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue