dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 395

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
ASRAC
Operation:
(S1 >> S2) + D → D (no parallel move)
Description: Arithmetically shift the first 16-bit source operand (S1) to the right by the value contained in the lowest
Usage:
Example:
Explanation of Example:
Condition Codes Affected:
Note:
Freescale Semiconductor
Before Execution
A2
0
4 bits of the second source operand (S2), and accumulate the result with the value in the destination
(D). Operand S1 is internally sign extended and concatenated with 16 zero bits to form a 36-bit value
before the shift operation. The result is not affected by the state of the saturation bit (SA).
This instruction is typically used for multi-precision arithmetic right shifts.
ASRAC
Prior to execution, the Y1 register contains the value that is to be shifted ($C003), the X0 register con-
tains the amount by which to shift ($4), and the destination accumulator contains $0:0000:0099. The
ASRAC instruction arithmetically shifts the value $C003 by 4 bits to the right and accumulates this
result with the value that is already in the destination register A.
N
Z
If the SA bit is set, the N bit is equal to bit 31 of the result.
If the SA bit is clear, the N bit is equal to bit 35 of the result.
LF
15
— Set if bit 35 of accumulator result is set
— Set if accumulator result equals zero
C003
0000
A1
Y1
P4
14
Arithmetic Right Shift with Accumulate
Y1,X0,A
13
P3
SR
X0
P2
12
MR
P1
11
00F4
0099
8000
0300
A0
Y0
P0
10
Instruction Set Details
I1
9
Assembler Syntax:
ASRAC
I0
8
; arithmetic right shift Y1 by 4 and
; accumulate in A
SZ
7
After Execution
A2
6
L
F
5
E
S1,S2,D
FC00
U
C003
4
CCR
A1
Y1
N
3
SR
X0
2
Z
(no parallel move)
V
1
3099
8000
00F4
0308
A0
Y0
C
0
ASRAC
A-51

Related parts for dsp56800e