English
Language : 

SH-2A Datasheet, PDF (254/501 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH™ RISC engine Family
Section 6 Instruction Descriptions
6.4.44
ROTCL
One-Bit Left Rotation
through T Bit
ROTate with Carry Left
Shift Instruction
Format
ROTCL Rn
Abstract
T ← Rn ← T
Code
0100nnnn00100100
Cycle
1
T Bit
MSB
Description
Rotates the contents of general register Rn and the T bit to the left by one bit, and stores the result
in Rn. The bit that is shifted out of the operand is transferred to the T bit (figure 6.3).
MSB
LSB
T
ROTCL
Figure 6.3 Rotate with Carry Left
Operation
ROTCL(long n) /* ROTCL Rn */
{
long temp;
if ((R[n]&0x80000000)==0) temp=0;
else temp=1;
R[n]<<=1;
if (T==1) R[n]|=0x00000001;
else R[n]&=0xFFFFFFFE;
if (temp==1) T=1;
else T=0;
PC+=2;
}
Example:
ROTCL R0
; Before execution: R0 = H'80000000, T = 0
; After execution: R0 = H'00000000, T = 1
Rev. 3.00 Jul 08, 2005 page 240 of 484
REJ09B0051-0300