On Monday 15 June 2009, David Brownell wrote:
> Notice how Linux does it; the BIT_{MASK,WORD}() macros are simple bit
> ops (e.g. for 32 bits, MASK ands with 0x1f and WORD rightshifts 5).

That is

        BITS_PER_UL = (8 * sizeof(unsigned long))
        MASK == 1 << (val & ((1 << BITS_PER_UL) - 1))
        WORD == val >> ilog2(BITS_PER_UL)
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to