]> Savannah Git Hosting - gnulib.git/commit
stdbit: port to theoretical platforms
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 May 2024 08:18:53 +0000 (01:18 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 May 2024 08:27:10 +0000 (01:27 -0700)
commit9768940fbd11558b8dab3453aa419a3433933d50
tree72b24e87450874832bb720b6988b421d0eb3549b
parent1ed2e43af23a4a183dcc6209ee198a769978dd8b
stdbit: port to theoretical platforms

Port to theoretical platforms that C and POSIX allow but are not
likely to ever exist.  This is mostly just to document the existing
source code: when optimizing, the machine code should be largely
unchanged even on platforms lacking __builtin_clz etc.
* lib/stdbit.in.h: Omit static_assert that checks for 8-bit bits.
stdbit-tests checks for this, and omitting the static_assert here
removes a module dependency.
(__gl_stdbit_clzll): Do not limit word size to 128 bits.
(__gl_stdbit_popcount255): Rename from __gl_stdbit_popcount255.
All uses changed.  Do not limit word size to 255 bits.  Correct
bugs on odd theoretical platforms where the word size is not a
power of 2.
* modules/stdbit (Depends-on): Remove assert-h.
ChangeLog
lib/stdbit.in.h
modules/stdbit