4 comments:
Could you add these to libpayload as well so the two stay in sync?
Patch Set #1, Line 59: long long
Why does one of these return `long long` and the others int? I think int makes sense for all of them.
Patch Set #1, Line 59: __builtin_clz
Careful, this is in and off itself a 32-bit function. The only available options for this are __builtin_clzl() and __builtin_clzll()... I guess even on 64-bit systems `unsigned long long` is still 64 bit, so it's probably fine to use __builtin_clzll() everywhere?
Patch Set #1, Line 61: __ffs_64
nit: Linux calls this __ffs64(). Maybe better to use clz64() and __ffs64() for consistency? (Although log2() doesn't match then, Linux doesn't have that one...)
To view, visit change 45938. To unsubscribe, or for help writing mail filters, visit settings.