主权项 |
1. 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 I3-I4), selecting a first portion (bits I3-I4) 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 (I5) and the bit range (bits I3-I4), 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 (I3-I4) of a rotated value of the second operand rotated by the rotate amount (I5), the selected portion specified by a starting bit position (I3) and by an ending bit position (I4) 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 I3-I4) of the first operand with the result portion, wherein all bits of the first operand other than the selected first portion (bits I3-I4) are unchanged. |