Provide bitcount()

This commit is contained in:
stefanrueger
2025-04-22 20:36:31 +02:00
parent 45d093224b
commit 5359807bde
2 changed files with 2 additions and 1 deletions

View File

@@ -792,7 +792,7 @@ static const char *regstyle(int n, int regword) {
}
// Return the number of bits set in Number
static unsigned bitcount(unsigned n) {
unsigned bitcount(unsigned n) {
unsigned ret;
// A la Kernighan (and Richie): iteratively clear the least significant bit set

View File

@@ -1744,6 +1744,7 @@ extern "C" {
int disasm_init(const AVRPART *p);
int disasm_init_tagfile(const AVRPART *p, const char *file);
void disasm_zap_jumpcalls();
unsigned bitcount(unsigned n);
int dist_rjmp(uint16_t rjmp, int flashsize);
uint16_t rjmp_opcode(int dist, int flashsize);