English
Language : 

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