[riot-notifications] [RIOT] Use GCC/Clang builtins for bit arithmetics (cc53bae)

René Kijewski notifications at github.com
Sun Nov 3 15:20:23 CET 2013

Maybe it would be better to keep the `__buildin` calls in this function instead of converting them to #defines?
The generated code could be rather long if the compiler uses bit magic in order to speed up the evaluation.

Maybe someone could check the .text size using the `#define`s, and using
signed number_of_lowest_bit(unsigned v)
    return __builtin_ffs(v) - 1;

unsigned number_of_bits_set(unsigned v)
    return __builtin_popcount(v);

Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20131103/f96362ec/attachment.html>

More information about the notifications mailing list