Hi Philipp,

generally I don't need much of bit manipulation apart from setting, clearing and reading bits - and these are easily done with bitmasks. So for me(!) I don't see the need for such functions. Sorry!

Regrads, Georg


Am 03.10.21 um 09:57 schrieb Philipp Klaus Krause:
Dear SDCC users,

would you consider it useful to have more functionality for bit
manipulation exposed as functions in the stadnard library. If yes, any
of the following (and if yes, with which interface?)? Anything else?

* Endiannnes conversion for individual integers (e.g. big-endian to
native, native to little-endian, etc) via functions that convert from a
cahr array to the inetger or vice versa
* Population count (i.e. the number of bits that are 1) of an integer
* Rotation of integer types
* Count leading / trailing zeroes / ones
* Single bit chek (i.e. check if an integer is a power of two, and if
yes, which one)
* Generic byte reverse for a block of memory

Philipp


_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user


_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to