5 ms·
Is it not rather void bar(struct y *s, unsigned int foo) { s->c = (s->c & 0xf0) | foo; }
by alcover 4y ago
Is it not rather
void bar(struct y *s, unsigned int foo) {
s->c = (s->c & 0xf0) | foo;
}
- tom_ 4y agoARM is little-endian, and by tradition bitfield bit indexes are assigned from least significant (bit 0 in ARM terms) to more significant. b occupies bits 4-7 inclusive.