Patent ID: 8838943

Claim:
A computer implemented method for executing a rotate then operate instruction, the rotate then operate instruction specifying a Boolean operation to be performed, the rotate then operate instruction comprising an opcode, a T bit, a first operand consisting of a first number of bits, a second operand consisting of the first number of bits, a bit range and a rotate amount for rotating the second operand, the execution comprising: based on the bit range (bit I 3 -I 4 ), selecting a first portion (bits I 3 -I 4 ) of the first operand as a first argument of a Boolean operation, the selected first portion consisting of a second number of bits, the second number being less than the first number; based on the rotate amount (I 5 ) and the bit range (bits I 3 -I 4 ), rotate-ably selecting a second portion of the second operand as a second argument of a Boolean operation, the selected second portion consisting of the second number of bits, the second number being less than the first number, wherein rotate-ably selecting comprises selecting the portion of the second operand corresponding to a bit range (I 3 -I 4 ) of a rotated value of the second operand rotated by the rotate amount (I 5 ), the selected portion specified by a starting bit position (I 3 ) and by an ending bit position (I 4 ) inclusive of a selected range of bits; performing the Boolean operation between the first argument and the second argument to produce a result portion consisting of the second number of bits; and based on the T bit being 0, replacing the selected first portion (bits I 3 -I 4 ) of the first operand with the result portion, wherein all bits of the first operand other than the selected first portion (bits I 3 -I 4 ) are unchanged.