Rev. 5.00, 09/03, page 45 of 760
Table 2.9 lists the SH7709S shift instructions.
Table 2.9 Shift Instructions
Instruction Operation Code
Privileged
Mode Cycles T Bit
ROTL Rn T ← Rn ← MSB 0100nnnn00000100 —1MSB
ROTR Rn LSB → Rn → T 0100nnnn00000101 —1LSB
ROTCL Rn T ← Rn ← T 0100nnnn00100100 —1MSB
ROTCR Rn T → Rn → T 0100nnnn00100101 —1LSB
SHAD Rm,Rn Rn ≥ 0: Rn << Rm → Rn
Rn < 0: Rn >> Rm →
[MSB → Rn]
0100nnnnmmmm1100 —1—
SHAL Rn T ← Rn ← 0 0100nnnn00100000 —1MSB
SHAR Rn MSB → Rn → T 0100nnnn00100001 —1LSB
SHLD Rm,Rn Rn ≥ 0: Rn << Rm → Rn
Rn < 0: Rn >> Rm →
[0 → Rn]
0100nnnnmmmm1101 —1—
SHLL Rn T ← Rn ← 0 0100nnnn00000000 —1MSB
SHLR Rn 0 → Rn → T 0100nnnn00000001 —1LSB
SHLL2 Rn Rn << 2 → Rn 0100nnnn00001000 —1—
SHLR2 Rn Rn >> 2 → Rn 0100nnnn00001001 —1—
SHLL8 Rn Rn << 8 → Rn 0100nnnn00011000 —1—
SHLR8 Rn Rn >> 8 → Rn 0100nnnn00011001 —1—
SHLL16 Rn Rn << 16 → Rn 0100nnnn00101000 —1—
SHLR16 Rn Rn >> 16 → Rn 0100nnnn00101001 —1—