4 ms·
You can actually request that x86 machines trap on unaligned accesses too, by setting the AC flag in EFLAGS (pushf; orl $(1<<18), (%esp); popf). Unfortunately,
by caf 16y ago
You can actually request that x86 machines trap on unaligned accesses too, by setting the AC flag in EFLAGS (pushf; orl $(1<<18), (%esp); popf). Unfortunately, it's common for the C standard library implementation to rely on aligned accesses on x86, so this isn't really feasible.