10 ;int countbits(int x) {
14 ;load address of B0 into r3
18 ;x = (x & B0) + ((x >> 1) & B0);
31 ;x = (x & B0) + ((x >> 1) & B0);
34 ;load B1 into r2, use displacment for address of B1 (or add?)
37 ;x = (x & B1) + ((x >> 2) & B1);
43 ;x = (x + (x >> 4)) & B2;
51 ;x = (x + (x >> 8)) /*& B3 */
56 ;x = (x + (x >> 16)) & B4;