dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 397

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
ASRR.L
Operation:
If S[15] = 0 or S is not a register,
D >> S →
Else
D << –S → D
Description: Arithmetically shift the second operand to the right by the value contained in the 5 lowest bits of the
Example:
Explanation of Example:
Condition Codes Affected:
Note:
Freescale Semiconductor
Before Execution
A2
0
D
first operand (or by an immediate integer), and store the result back in the destination (D). The shift
count can be a 5-bit positive immediate integer or the value contained in X0, Y0, Y1, or the MSP of
an accumulator. For 36- and 32-bit destinations, the MSP:LSP are shifted, with sign extension from bit
31 (the FF2 portion is ignored). If the shift count in a register is negative (bit 15 is set), the direction
of the shift is reversed, maintaining sign integrity. The result is not affected by the state of the satura-
tion bit (SA).
ASRR.L Y0,A
Prior to execution, the A accumulator contains the value that is to be shifted ($0123:4567), and the Y0
register contains the amount by which to shift ($FFFC). Since the count is a negative number, the shift
is reversed—that is, the value will be shifted left. The ASRR.L instruction arithmetically shifts the val-
ue $0123:4567 by 4 bits to the left and places the result in the destination register A.
N
Z
Condition code results depend on the size of the destination operand.
LF
15
— Set if the MSB of the result is set
— Set if the result equals zero
(no parallel move)
(no parallel move)
0123
2000
A1
Y1
P4
14
Multi-Bit Arithmetic Right Shift Long
13
P3
SR
P2
12
MR
P1
11
FFFC
4567
0300
A0
Y0
P0
10
Instruction Set Details
; shift A right by the amount in Y0 and
; store result in A
I1
9
Assembler Syntax:
ASRR.L
ASRR.L
I0
8
SZ
7
After Execution
A2
6
L
0
5
E
S,D
S,D
U
4
1234
2000
CCR
A1
Y1
N
3
SR
2
Z
(no parallel move)
(no parallel move)
V
1
FFFC
5670
0300
A0
Y0
ASRR.L
C
0
A-53

Related parts for dsp56800e