Systems for loading unaligned words and methods of operating the same
AssigneesSTMicroelectronics S.r.l., Hewlett-Packard Company
InventorsMark O. Homewood, Paolo Faraboschi
Life of this patent
Estimating the term…
Abstract
Disclosed are systems for loading an unaligned word from a specified unaligned word address in a memory, the unaligned word comprising a plurality of indexed portions crossing a word boundry, a method of operating the system comprising: loading a first aligned word commencing at an aligned word address rounded from the specified unaligned word address; identifying an index representing the location of the unaligned word address relative to the aligned word address; loading a second aligned word commencing at an aligned word address rounded from a second unaligned word address; and combining indexed portions of the first and second alinged words using the indentified index to construct the unaligned word.
Claims12
A method of loading a sequence of unaligned words starting from a first unaligned word address in a memory, said unaligned words comprising a plurality of indexed portions crossing a plurality of word boundaries, the method comprising:
- loading a first aligned word by executing a load instruction, said first aligned word commencing at a first aligned word address rounded from said first unaligned word address;
- identifying an index representing the location of the first unaligned word address relative to the first aligned word address;
- loading a second aligned word commencing at a second aligned word address rounded from a second unaligned word address;
- combining indexed portions of the first and second aligned words using the identified index to construct a first unaligned word;
- loading at least one subsequent third aligned word commencing at a third aligned word address from a subsequent third unaligned word address plus a second offset;
- and
- combining indexed portions of the subsequent third aligned word and the second aligned word to construct a subsequent second unaligned word.
A computer system comprising a memory holding unaligned words at unaligned word addresses, each unaligned word comprising a plurality of indexed portions crossing a word boundary;
- and
- an execution unit arranged to execute an instruction sequence which implements the following steps:
- executing a load instruction to load a first aligned word commencing at a first aligned word address rounded from a first unaligned word address;
- said load instruction identifying an index representing the location of the first unaligned word address relative to the first aligned word address;
- loading a second aligned word commencing at a second aligned word address rounded from a second unaligned word address;
- combining indexed portions of the first and second aligned words using the identified index to construct a first unaligned word;
- loading at least one subsequent third aligned word commencing at a third aligned word address rounded from a subsequent third aligned word address plus a second offset;
- and
- combining indexed portions of the subsequent third aligned word and the second aligned word to construct a subsequent second unaligned word.
A computer program product comprising program code means which when loaded into a computer cause the computer to effect the following steps:
- loading a first aligned word commencing at a first aligned word address rounded from a first unaligned word address;
- identifying an index representing the location of the first unaligned word address relative to the first aligned word address;
- loading a second aligned word commencing at a second aligned word address rounded from a second unaligned word address;
- combining indexed portions of the first and second aligned words using the identified index to construct a first unaligned word, wherein loading said first aligned word is implemented using a load instruction which identifies said index;
- loading a third aligned word commencing at a third aligned word address rounded from a third unaligned word address;
- and
- combining indexed portions of the second and third aligned words using the identified index to construct a second unaligned word.
A computer program product comprising program code means including a sequence of instructions comprising:
- a first instruction which identifies a first unaligned word address and an index representing the location of the first unaligned word address relative to its rounded first aligned word address, the instruction causing the load of a first word from said first rounded aligned word address;
- a second instruction which identifies the first unaligned word address plus a first offset together with said index, and which causes the loading of a second aligned word commencing at a second aligned word address rounded from the first aligned word address plus the first offset;
- a third instruction which causes indexed portions of the first and second aligned words to be combined using the identified index to construct a first unaligned word;
- a fourth instruction which causes the loading of a third aligned word commencing at a third aligned word address rounded from the first unaligned word address plus a second offset;
- and a fifth instruction which causes indexed portions of the second and third aligned words to be combined using the identified index to construct a second unaligned word.
Dependencies are inferred from the claim text.