Re: Architectures where unaligned access is (not) OK?
On Fri, 21 Nov 2014, Sam Hartman wrote:
> I thought there was a flag bit you could set on x86 that causes
> unaligned access to trap there too.
1. CR0.AM must be set.
2. Ask For The Pain!
i386:
__asm__("pushf\norl $0x40000,(%esp)\npopf");
x86-64:
__asm__("pushf\norl $0x40000,(%rsp)\npopf");
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
Reply to: