Bruno Haible via Gnulib discussion list <[email protected]> writes: > Hi, > > The next <stdbit.h> section I would like to implement is ยง 7.18.20 > "Exact-width 8-bit Memory Reversal". The functions stdc_memreverse8uN > are identical to bswap_N, as far as I can see. > > Would you prefer to see an implementation of stdc_memreverse8uN > that relies on bswap_N from <byteswap.h>? > Or the other way around, a <byteswap.h> that relies on stdc_memreverse8uN > from <stdbit.h>? > > Recall that <stdbit.h> is ISO C, but not yet widely implemented in systems. > Whereas <byteswap.h> exists only in glibc, musl libc, FreeBSD 14, Cygwin, > Android.
I haven't looked into the new functions much but I think it would be easier to have them use bswap_N. As far as I can tell stdc_memreverse8uN doesn't require the address is aligned, so you would have to use the unaligned load and store functions. Collin
