[Info-vax] x86-64 data alignment / faulting

John Dallman jgd at cix.co.uk
Tue Mar 15 16:10:00 EDT 2022


In article <pB2YJ.292172$zX2.209805 at fx12.ams4>,
mark.daniel at wasd.vsm.com.au (Mark Daniel) wrote, quoting VSI: 

> "On X86, there is no such thing as an alignment fault nor is 
> there a performance penalty for accessing unaligned data."

That's a bit over-simplified. On x86, alignment faults are implemented in
the hardware, but can be turned off, and are invariably turned off on
every operating system where I've looked at this (Windows, Linux, macOS).


There certainly used to be performance penalties for accessing unaligned
data. I don't see how they can be avoided for the cases where misaligned
data means that a data structure has member(s) in an additional cache
line, increasing cache pressure. 


John 



More information about the Info-vax mailing list