@instruction<EOL><INDENT>def RCR(cpu, dest, src):<DEDENT>
OperandSize = dest.size<EOL>count = src.read()<EOL>countMask = {<NUM_LIT:8>: <NUM_LIT>,<EOL><NUM_LIT:16>: <NUM_LIT>,<EOL><NUM_LIT:32>: <NUM_LIT>,<EOL><NUM_LIT:64>: <NUM_LIT>}[OperandSize]<EOL>tempCount = Operators.ZEXTEND((count & countMask) % (src.size + <NUM_LIT:1>), OperandSize)<EOL>value = dest.read()<EOL>if isinstance(tempCount, int) and tempCount == <NUM_LIT:0>:<EOL><INDENT>new_val = value<EOL>dest.write(new_val)<EOL><DEDENT>else:<EOL><INDENT>carry = Operators.ITEBV(OperandSize, cpu.CF, <NUM_LIT:1>, <NUM_LIT:0>)<EOL>left = value >> (tempCount - <NUM_LIT:1>)<EOL>right = value << (OperandSize - tempCount)<EOL>new_val = (left >> <NUM_LIT:1>) | (carry << (OperandSize - tempCount)) | (right << <NUM_LIT:1>)<EOL>dest.write(new_val)<EOL>cpu.CF = Operators.ITE(tempCount != <NUM_LIT:0>, (left & <NUM_LIT:1>) == <NUM_LIT:1>, cpu.CF)<EOL>s_MSB = ((new_val >> (OperandSize - <NUM_LIT:1>)) & <NUM_LIT>) == <NUM_LIT:1><EOL>s_MSB2 = ((new_val >> (OperandSize - <NUM_LIT:2>)) & <NUM_LIT>) == <NUM_LIT:1><EOL>cpu.OF = Operators.ITE(tempCount == <NUM_LIT:1>,<EOL>s_MSB ^ s_MSB2, cpu.OF)<EOL><DEDENT>
Rotates through carry right (RCR).

Shifts (rotates) the bits of the first operand (destination operand) the number of bit positions specified in the
second operand (count operand) and stores the result in the destination operand. The destination operand can be
a register or a memory location; the count operand is an unsigned integer that can be an immediate or a value in
the CL register. In legacy and compatibility mode, the processor restricts the count to a number between 0 and 31
by masking all the bits in the count operand except the 5 least-significant bits.

Rotate through carry right (RCR) instructions shift all the bits toward less significant bit positions, except
for the least-significant bit, which is rotated to the most-significant bit location. The RCR instruction shifts the
CF flag into the most-significant bit and shifts the least-significant bit into the CF flag.

:param cpu: current CPU.
:param dest: destination operand.
:param src: count operand.