On Tuesday 12 May 2009, Øyvind Harboe wrote: > I've been thinking about whether some helper fn's to > use 32 bit arrays instead of 8 bit input/output might make sense.
Why 32 bits instead of e.g. just plain "unsigned long"? I know the bit vector utilities in Linux use "unsigned long", which mostly means "u32" but could be something else if that were more efficient on some machine. If the underlying issue is how to represent arbitrary length bit arrays, using arrays of machine-word quanta is good; and there's optimized code widely available. Certainly letting code work in a more "natural" size seems intuitively better than forcing it into byte operations. Just grab e.g. the bitarray code from Linux. There may be some cases where it's awkward to guarantee the data is word-aligned, but I'd hope they'd be easily fixed. - Dave _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development