Patent ID: 7464255

Claim:
A method comprising: receiving an instruction comprising an opcode, a source operand identifier, and an immediate value; determining whether the instruction corresponds to a shuffle instruction or a shift instruction; in response to determining the instruction corresponds to a shuffle instruction: using particular bits of the immediate value to select data in a byte position of the source operand for relocation to a byte position which corresponds to the position of the particular bits in the immediate value; in response to determining the instruction corresponds to a shift instruction: performing an arithmetic operation on a first value and a second value, wherein the first value comprises bits of the immediate value and the second value comprises an index which corresponds to a destination byte position; in response to determining the instruction corresponds to a left shift, said arithmetic operation comprises subtracting the first value from the second value; in response to determining the instruction corresponds to a right shift, said arithmetic operation comprises adding the first value to the second value; and using a result of said arithmetic operation to select data in a byte position of the source operand for relocation to the destination byte position.