Patent ID: 7865693

Claim:
A method, in a data processing system, for aligning data, comprising: receiving, in a processor of the data processing system, at least one data value having a first precision type, for storing in a vector register of the data processing system, wherein the vector register stores data as a vector having a plurality of vector elements; modifying the first precision type of the at least one data value to have a second precision type different in precision than the first precision type to thereby generate at least one modified data value; storing the at least one modified data value in at least one vector element of the plurality of vector elements of the vector register; determining an alignment of the at least one modified data value relative to a boundary of a vector element of the vector register; and performing an alignment operation to re-align the at least one modified data value based on the boundary of the vector element of the vector register, wherein performing the alignment operation to re-align the at least one modified data value based on the boundary of the vector element of the vector register comprises generating an alignment mask based on the second precision type of the at least one modified data value, the alignment mask identifying how far away from the boundary of the vector element the at least one modified data value is located.