Freescale Semiconductor SC140 Multiple-Bit Bitwise Shift Right Dalu, Lsrr Da,Dn, Lsrr #u5,Dn

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 542
Image 542

LSRR

LSRR

Multiple-Bit Bitwise Shift Right (DALU)

LSRR

Operation

 

Assembler Syntax

 

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

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

 

else Dn << ⏐Da⏐→ Dn

 

 

Dn >>> #u5 → Dn

LSRR #u5,Dn {0 u5 < 32}

Description

LSRR Da,Dn

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

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

If N is negative, 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.

Da[6:0] > 0

Da[6:0] 0

 

39

32 31

 

16 15

 

0

 

 

 

 

 

C

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C

39

32 31

 

16 15

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LSRR #u5,Dn

Shifts the contents of a 40-bit data register (Dn) right the number of bits designated in #u5. #u5 is an unsigned 5-bit integer immediate. Bit (N – 1) is stored in the C bit. Bits[ 39:N] are copied to bits [(39 – N):0]. Bits [39:(40 – N)] are cleared.

39

32 31

16 15

0

C

0

Status and Conditions that Affect Instruction

None.

A-228

SC140 DSP Core Reference Manual

Page 542
Image 542
Freescale Semiconductor SC140 specifications Multiple-Bit Bitwise Shift Right Dalu, Lsrr Da,Dn, Lsrr #u5,Dn