The present invention relates generally to microprocessor or
microcontroller architecture, and particularly to an architecture
structured to handle unaligned memory references. A method is disclosed
for loading unaligned data stored in several memory locations, including
a step of loading a first part of the unaligned data into a first storage
location and rotating the first part from a first position to a second
position in the first memory location. Next a second part of the
unaligned data is loaded into a second storage location and rotated from
one position to another position. Then the first storage location is
combined with the second storage location using a logical operation into
a result storage location. The storage locations may be, for example,
64-bit registers. The logical operation may be a bit-wise OR operation.
The method may optionally include, performing masking, zero-extending
and/or sign extending operations on the first storage location, when the
first part of the unaligned data is in the second position of the first
storage location.