Patent ID: 7308554

Claim:
A processor-based automatic alignment device for data movement, wherein unaligned data is stored in a memory at a first position and written to the memory at a second position, the memory has a plurality of m (positive integer)-bit words partitioned by word boundaries, and the unaligned data stored in the memory at the first position is partitioned by word boundaries as a first part, a second part and a third part, the device comprising: an internal register, which temporarily stores data; a load combine register, which is coupled to the memory for temporarily storing data read out of the memory; a shifter, which is coupled to the load combine register and the memory for shifting in accordance with stored address of the unaligned data and storing a resulting data in the internal register; a rotator, which is coupled to the internal register for rotating data of the internal register to a second position in accordance with written address of the unaligned data; a store combine register, which is coupled to the rotator for temporarily storing data of the rotator; and a mask selector, which is coupled to the rotator and the store combine register for selectively masking their data in accordance with the written address of the unaligned data and writing the masked data to the memory.