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 resources.
I do not sure that all ports must contain one set of built-ins.

вс, 3 окт. 2021 г., 10:58 Philipp Klaus Krause <p...@spth.de>:

> 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