ROL

ROL Rotate One Bit Left Through the Carry Bit (DALU) ROL

Operation

Assembler Syntax

(Dn[38:0]<<1) → Dn[39:1]

ROL Dn

Dn[39] → C

 

C → Dn[0]

 

Description

ROL Dn

Rotates the contents of a data register (Dn) one bit to the left. The carry bit C is shifted to bit 0, bit 39 is copied to the carry bit, and bits [38:0] are copied to bits [39:1].

C

39

32 31

16 15

0

Status and Conditions that Affect Instruction

Register Address

Bit Name

Description

SR[0]

C

The carry bit is copied into Dn[0].

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

SR[0]

C

Set if bit 39 in the data register was one before rotation. Cleared if

 

 

bit 39 in the data register was zero before rotation.

Ln

L

Clears the Ln bit in the destination register.

Example

rol d5

Register/Memory Address

SR

L5:D5

Before

$00E4 0000

$0:$FF A000 0005

After

$00E4 0001

$0:$FF 4000 000A

A-362

SC140 DSP Core Reference Manual

Page 676
Image 676
Freescale Semiconductor SC140 Rol d5, Dn3801 → Dn391, Dn39 → C → Dn0, ROL Dn, SR0 Carry bit is copied into Dn0