LSLL

LSLL

Multiple-Bit Bitwise Shift Left (DALU)

LSLL

Operation

Assembler Syntax

If Da[6:0] > 0, then Dn << Da[6:0] → Dn

LSLL Da,Dn {–40 Da[6:0] 40}

else Dn >>> ⏐Da[6:0]⏐ → Dn

 

Description

 

LSLL Da,Dn

 

Logically shifts a 40-bit data register (Dn) left or right N bits. N is a signed 6-bit integer contained in Da[6:0].

If N is positive, Dn is shifted left. Bit (40 – N) is stored in the C bit. Bits [(39 – N):0] are copied to bits [39:N]. Bits [(N – 1):0] are cleared.

If N is negative, Dn is shifted right. Bit (N – 1) of Dn is stored in the C bit. Bits [39:N] are copied to bits [(39 – N):0]. Bits [39:(40 – N)] are cleared.

Da[6:0] > 0

Da[6:0] 0

C

39

32 31

16 15

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

39

32 31

16 15

0

 

 

 

 

 

C

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

SR[0]

C

Bit (40 – N) of Dn is stored in the C bit for a left shift. Or, bit (N – 1)

 

 

of Dn is stored in the C bit for a right shift.

Ln

L

Clears the Ln bit in the destination register.

Example 1

lsll d4,d2

Register/Memory Address

D4

SR

L2:D2

Before

$00 0000 0002

$00E4 0000

$0:$FF 8765 4321

After

$00E4 0001

$0:$FE 1D95 0C84

A-224

SC140 DSP Core Reference Manual

Page 538
Image 538
Freescale Semiconductor SC140 specifications Multiple-Bit Bitwise Shift Left Dalu, Lsll d4,d2, Lsll Da,Dn