[EMAIL PROTECTED] wrote:
I suspect that the difference in time to access unaligned packed data vs. aligned data is irrelevant when compared with the general complexity of running a modern host adaptor.
It can get worse. Clever use of align and packed resulted, in Xen, in longword accesses which were odd-byte-aligned half the time, odd-short aligned 1/4 the time; i.e., misaligned 3/4 of the time. All this from a goal to be efficient! I kind of wonder how much this packed/aligned mania results in unaligned accesses in the end ...
This did get fixed. But it's a real warning against the kind of cleverness that people resort to with gcc nowadays -- just wander through the linux kernel sometime -- grep unlikely if you wish.
It sounds like the folks who designed the dac960 either didn't think much about how drivers would access it, or they were hog wild over gcc's packed data attribute (does microsoft's compiler have something similar?).
Packed has been around in compilers for realtime and embedded for 30 years -- dare I admit to using it at some time? Nah. You were none of you born then anyway, so you can't prove a thing. That code is on a magtape in a landfill somewhere in Pennsylvania.
ron
