Re: [Sdcc-user] More functions for bit manipulation (Rotation, population count, endianness, etc) in the standard libary?

2021-10-03 Thread Alan Cox
On Sun, 3 Oct 2021 09:57:28 +0200 Philipp Klaus Krause wrote: > 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? >

Re: [Sdcc-user] More functions for bit manipulation (Rotation, population count, endianness, etc) in the standard libary?

2021-10-03 Thread Sergey Belyashov
I think, built-ins may cover all basic algorithms which pure C implementation is very very complex (count of bits, odd/even...) but in assembler is very simple. Moreover, in most cases these functions should be inline, because call prepare+prolog+epilog of function some time took same number of res

Re: [Sdcc-user] More functions for bit manipulation (Rotation, population count, endianness, etc) in the standard libary?

2021-10-03 Thread Basil Hussain
If the current policy aims to have standard library functions written exclusively in C, then I would consider it not especially useful to have such functions. If a developer is going to use such things, then they're probably going to be doing so in code that needs to be performant (e.g. hashing

Re: [Sdcc-user] More functions for bit manipulation (Rotation, population count, endianness, etc) in the standard libary?

2021-10-03 Thread Georg Icking-Konert
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 user

[Sdcc-user] More functions for bit manipulation (Rotation, population count, endianness, etc) in the standard libary?

2021-10-03 Thread 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,