Patent ID: 7761672

Claim:
A method for use in a processing device, the method comprising: receiving a machine language instruction for a data copy operation from a source address to a destination address, wherein the instruction specifies a data size of D bytes for a data entity and a number N of data entities to copy; determining whether an aggregate condition is satisfied, wherein the aggregate condition comprises: an aggregate data size, M, which is less than or equal to the number of data entities N times the data size D; the destination address is aligned to a data size D boundary; and bits m:0 of the source address are equal to bits m:0 of the destination address, wherein m is log2 (M)−1, and wherein m is not a most significant bit of either the source address or the destination address; in response to determining an aggregate condition is not satisfied: copying the N data entities from a source location to a destination location one data entity of D bytes at a time; in response to determining an aggregate condition is satisfied: copying the N data entities from the source location to the destination location, wherein at least some of the N data entities are copied in blocks of an aggregate data size of M bytes, wherein the processing device is capable of copying more than D bytes at a time.