[Info-vax] Dave Cutler, Prism, DEC, Microsoft, etc.
Rob Brown
mylastname at gmcl.com
Mon Nov 30 17:43:26 EST 2009
On Mon, 30 Nov 2009 at 17:00 -0500, Richard B. Gilbert wrote:
> JF Mezei wrote:
>>
>> Out of curiosity, why do some CPUs have so much trouble fetching 4
>> bytes from an unaligned location ? Is it the CPU and CPU
>> architecture that is the problem, or the RAM memory subsystem that
>> can't fetch 4 bytes starting at an uneven memory address ?
>>
> Well VAX certainly did! Alpha, IIRC was even more sensitive to
> alignment issues. If you knew that, it was not difficult to satisfy
> the machines preferences. The compilers took care of most of the
> work.
>
> The VAX and Alpha architectures were by no means unique in having
> this requirement. The IBM System/360 and System/370 machines also
> required proper boundary alignment.
And the PDP-11! Try a MOV (move word) on an odd address and you trap
through location 4. Fatal unless you wrote your own handler. I don't
know of anybody who ever did. Just align your data!
VAX allowed MOVW and MOVL on unaligned data. It wasn't until much
later that I learned that doing so made the program run slower.
--
Rob Brown b r o w n a t g m c l d o t c o m
G. Michaels Consulting Ltd. (780)438-9343 (voice)
Edmonton (780)437-3367 (FAX)
http://gmcl.com/
More information about the Info-vax
mailing list