summaryrefslogtreecommitdiff
path: root/src/common/asm.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-06-19 20:23:30 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-06-19 20:27:43 (GMT)
commit72b1c890ed19ebd7780e634d4874d12a619f259e (patch)
tree0d2e2f5e76ba9102a6671bdb2f7ab6b2e14c8d9c /src/common/asm.h
parentceeba88cafc4c7d2c625e53fb175b763e480f6ba (diff)
Extended the bitfield operations and their Python bindings.
Diffstat (limited to 'src/common/asm.h')
-rw-r--r--src/common/asm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/asm.h b/src/common/asm.h
index 3e52925..d8436b8 100644
--- a/src/common/asm.h
+++ b/src/common/asm.h
@@ -36,6 +36,12 @@ bool msb_32(uint32_t, unsigned int *);
/* Détermine l'indice du premier bit à 1, côté gauche. */
bool msb_64(uint64_t, unsigned int *);
+/* Détermine le nombre de bits à 1 dans une valeur de 32 bits. */
+unsigned int popcount_32(uint32_t v);
+
+/* Détermine le nombre de bits à 1 dans une valeur de 64 bits. */
+unsigned int popcount_64(uint64_t v);
+
#endif /* _COMMON_ASM_H */