ASRR

ASRR

Multiple-Bit Arithmetic Shift Right (DALU)

ASRR

Operation

 

Assembler Syntax

 

Dn >> #u5 → Dn

ASRR #u5,Dn {0 u5 < 32}

 

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

ASRR Da,Dn

 

 

else Dn << Da[6:0] → Dn

 

 

Description

This operation shifts the contents of Dn by N bits. Bits shifted out of Dn are lost except for the last bit, which is stored in the C bit.

ASRR #u5,Dn

Performs an arithmetic right shift by N, an immediate unsigned 5-bit integer. The MSB is copied into the vacated positions.

 

 

39

32 31

16 15

0

 

 

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ASRR Da,Dn

Performs a bidirectional arithmetic shift of Dn by Da[6:0] bits and stores the result in Dn. If Da[6:0] is positive, the shift is right. If shifting right, the MSB is copied into the vacated positions. If shifting left, the vacated positions to the right are zero-filled. N is obtained from Da[6:0].

Da[6:0] > 0

Da[6:0] < 0

 

 

 

 

 

39

32 31

 

16 15

 

0

 

 

 

 

 

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C

39

32 31

 

16 15

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Status and Conditions that Affect Instruction

None.

A-60

SC140 DSP Core Reference Manual

Page 374
Image 374
Freescale Semiconductor SC140 specifications Asrr, Multiple-Bit Arithmetic Shift Right Dalu