On 9 juil. 2012, at 20:40, Greg Parker <gpar...@apple.com> wrote:

> On Jul 9, 2012, at 5:44 AM, Vincent Habchi <vi...@macports.org> wrote:
>> Modern CPU do not enforce strict alignment for integer access. You can 
>> perfectly access a Dword (64 bits) at any address, even or odd. It is just 
>> more efficient to align 64-bits words at 8-bytes boundary, 32-bits at 
>> 4-bytes, etc. This contrasts with the old times: for example, on a 68000 
>> processor, trying to access a 16-bit word at an odd address (e.g. move.w d0, 
>> (a0)+ with a0 odd) would result in a exception nĀ°3 (address error).
> 
> Some CPUs still enforce aligned integer access, such as the ARM CPUs in some 
> iOS devices.

Oh, thanks for mentioning this. I was obviously thinking about Intel CPUs. I 
know very little about ARM. By the way, you can also access misaligned 
instructions on x86 processors I think, something that was not possible on 
68000. If I remember correctly, the integer alignment enforcement was lifted on 
the 68030, which leaded to interesting hardware developmentsā€¦

Vincent


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to