Quantcast
Channel: Did any x86 CPU optionally trap unaligned access? - Retrocomputing Stack Exchange
Browsing all 4 articles
Browse latest View live

Answer by Peter Cordes for Did any x86 CPU optionally trap unaligned access?

x86 featuresThe AC flag in EFLAGS enables alignment checking. (486 and later). The OS has to enable it by setting the AM bit in CR0. The Linux kernel for example does do that. (But GNU/Linux user-space...

View Article



Answer by user24811 for Did any x86 CPU optionally trap unaligned access?

Not on a 386, but all x86 processors from the 486 forward support an alignment checking mode, which does basically what you describe: it causes an exception on any unaligned access from ring 3.See the...

View Article

Answer by Raffzahn for Did any x86 CPU optionally trap unaligned access?

Not sure if I understand the question at all, but let's try:So imagine writing portable code on a 386.Define portable code.Usually this means writing in a HLL (C,Pascal, Ada, whatsoever), which get...

View Article

Did any x86 CPU optionally trap unaligned access?

x86 CPUs have always supported unaligned load/store.Early RISC CPUs didn't. So imagine writing portable code on a 386. It seems to work fine, but how do you know you haven't accidentally misaligned...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images