Asrr, Multiple-bit arithmetic shift right (dalu), Description – Freescale Semiconductor StarCore SC140 User Manual
Page 374: Status and conditions that affect instruction, Operation assembler syntax

A-60
SC140 DSP Core Reference Manual
ASRR
ASRR
Multiple-Bit Arithmetic Shift Right (DALU)
ASRR
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.
Status and Conditions that Affect Instruction
None.
Operation
Assembler Syntax
Dn >> #u5
→ Dn
ASRR #u5,Dn {0
≤ u5 < 32}
If Da[6:0] > 0, then Dn >> Da[6:0]
→ Dn
else Dn << |Da[6:0]|
→ Dn
ASRR Da,Dn
ASRR #u5,Dn
Performs an arithmetic right shift by N, an immediate unsigned 5-bit integer. The MSB is copied into the
vacated positions.
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].
0
15
16
31
32
39
C
0
0
15
16
31
32
39
C
0
15
16
31
32
39
C
Da[6:0]
> 0
Da[6:0]
< 0