TC1796
System Units (Vol. 1 of 2)
Peripheral Control Processor (PCP)
User’s Manual
11-100
V2.0, 2007-07
PCP, V2.0
11.11.30 RL, Rotate Left
This section describes the RL instruction of the PCP.
11.11.31 RR, Rotate Right
This section describes the RR instruction of the PCP.
RL
Syntax
RL Ra, #imm5
Description
Rotate the contents of register Ra to the left by the number of
bit positions specified through the 5-bit value imm5. The
values defined for imm5 are 1, 2, 4 and 8. The carry flag,
R7.C, is set to the last bit shifted out of bit 31 of register Ra.
Operation
tmp = R[a]
R[a] = R[a] << imm5; imm5 = 1, 2, 4, 8
R7_C = last bit shifted out of R[a]
tmp = tmp >> 32 - imm5
R[a] = tmp OR R[a]
Flags
N, Z
RR
Syntax
RR Ra, #imm5
Description
Rotate the contents of register Ra to the right by the number
of bit positions specified through the 5-bit value imm5. The
values allowed for imm5 are 1, 2, 4 and 8.
Operation
tmp = R[a]
R[a] = R[a] >> imm5; imm5 = 1, 2, 4, 8
tmp = tmp << 32 - imm5
R[a] = tmp OR R[a]
Flags
N, Z