diff --git a/src/utils/bits.c b/src/utils/bits.c index 1bf57b70..78c35a2a 100644 --- a/src/utils/bits.c +++ b/src/utils/bits.c @@ -95,6 +95,9 @@ static inline u64 rbuu64(u64* p, ux off) { // read bit-unaligned u64; aka 64↑o return m0==0? v0 : v0>>m0 | v1<<(64-m0); #endif } +static inline u64 rbuu58(u64* p, ux off) { // k↑off↓p, assuming off is a multiple of k, and k∊60∾↕59 + return loadu_u64((u8*)p + (off>>3)) >> (off&7); +} typedef struct { u64* ptr; @@ -157,7 +160,7 @@ NOINLINE void bitwiden(void* rp, ux rcsz, void* xp, ux xcsz, ux cam) { // for no ux am = c8? cam/8 : cam/4; u32 count = POPC(msk0); // printf("widen base %04lx %016lx count=%d am=%zu\n", tmsk, msk0, count, am); - for (ux i=0; i