Architectures with strict alignment?

Bernd Walter ticso at cicely12.cicely.de
Sun Dec 30 01:35:00 PST 2007


On Sat, Dec 29, 2007 at 11:37:27PM +0100, Dag-Erling Smørgrav wrote:
> Wilko Bulte <wb at freebie.xs4all.nl> writes:
> > In the past the alpha port had it too.
> 
> No, it was optional and defaulted to off.

It was never optional, since no alpha CPU can do missaligned access
Alphas can fix missaligned access by software trap handlers in the same
way as most other strong alignment architectures can and we did this
for userland, but not in kernel.
Nevertheless it is horribly slow to do this, but was required since
there was so many crappy software that days - fortunately this has
changed over time, although I still see aligment traps on new software
as well.
Sadly said we never implemented missaligment traps for x86 so
developers without alphas could see their faults and made us alpha
people a hard live by introducing new missalignments bugs on a regular
basis so that many finaly gave up on that loop.

On the other hand people should keep in mind that even modern x86
are not very good when it comes to missaligned access.
They handle it in hardware, but it is not that optimized as handling
alligned access, so you still see a major performance penalty.

-- 
B.Walter                http://www.bwct.de      http://www.fizon.de
bernd at bwct.de           info at bwct.de            support at fizon.de


More information about the freebsd-hackers mailing list