Patent ID: 7308556
Filing Date: 2007-12-11
Classification: G06F

Abstract:
1. A method for writing data in a processor to memory at unaligned location, wherein the data is to be written to unaligned addresses of a memory partitioned by word boundaries into a plurality of m (positive integer)-bit words, the method comprising: a first rotating step, which fetches the data and rotates it to a first position in accordance with written unaligned address, thereby generating a first rotated data; a first mask writing step, which masks the first rotated data in accordance with the written unaligned address of the data and writes the first rotated data masked to the memory; a second rotating step, which fetches a second data next to the data and rotates the second data to the first position in accordance with the written unaligned address of the second data, thereby generating a second rotated data; a first writing step, which combines unwritten part of the first rotated data and a part of the second rotated data to form a first combination and writes the first combination to the memory; a third rotating step, which rotates the third data next to the second data in accordance with written unaligned address of the third data to the first position, thereby generating a third rotated data; a second writing step, which combines unwritten part of the second rotated data and a part of the third rotated data to form a second combination and writes the second combination to the memory; and a second mask writing step, which masks the third rotated data and writes the third rotated data masked to the memory.