We stole some bits, now we need to put them back... */
| 357 | |
| 358 | /* We stole some bits, now we need to put them back... */ |
| 359 | static COLD void update_common(struct htable *ht, const void *p) |
| 360 | { |
| 361 | uintptr_t maskdiff; |
| 362 | |
| 363 | if (ht->elems == 0) { |
| 364 | ht->common_mask = -1; |
| 365 | ht->common_bits = ((uintptr_t)p & ht->common_mask); |
| 366 | ht->perfect_bitnum = 0; |
| 367 | (void)htable_debug(ht, HTABLE_LOC); |
| 368 | return; |
| 369 | } |
| 370 | |
| 371 | /* Find bits which are unequal to old common set. */ |
| 372 | maskdiff = ht->common_bits ^ ((uintptr_t)p & ht->common_mask); |
| 373 | |
| 374 | fixup_table_common(ht, maskdiff); |
| 375 | (void)htable_debug(ht, HTABLE_LOC); |
| 376 | } |
| 377 | |
| 378 | bool htable_add_(struct htable *ht, size_t hash, const void *p) |
| 379 | { |
no test coverage detected