Motorola DSP96002 User Manual page 566

32-bit digital signal processor
Table of Contents

Advertisement

fseedd d5,d4
fmpy.s d5,d4,d5
fmpy
fmpy.s d5,d2,d5
fmpy
fmpy.s d0,d3,d0
Operation table:
0.0
------------------------------------/
NaN
0.0
NaN
B.1.27 Multibit Rotates
This describes how to perform multibit rotates using the logical barrel shifts. Both the static case (rotate by
a fixed constant) and the dynamic case (rotate by a value in a register) are presented.
The following code assumes a rotating model of the form:
In this type of rotate, the carry participates in the bit rotations. Bits rotated out of the register go into the
carry bit; the previous value of the carry bit goes into the register.
C
1.
Static rotate left 1-32 bits. The 32 bit integer to be rotated is in d0.l. The number of bits to rotate
is N. The resulting carry is the value of bit 32-N of the register. For example, if N=3 (three bit
rotate left), then the resulting carry will be the value of bit 29 of the register.
rol
lsl
lsr
or
MOTOROLA
d0,d4,d0
fsub.s d5,d2
d0,d4,d0
fsub.s d5,d3
d0 (dividend)
number
infinity
NaN
NaN
number
infinity
NaN
NaN
31
d0
d0.l,d1.l
#N-1,d0
#33-N,d1
d1,d0
DSP96002 USER'S MANUAL
#2.0,d2.s
d2.s,d3.s
d2.s,d4.s
Totals:
/
/
d5 (divisor)
0.0
number
infinity
;shift in carry, copy input 1
;shift up, pad with zeros
;shift down, set carry
;put numbers back together
Program
ICycles
Words
1
1
2
2
1
1
1
1
1
1
1
1
---
---
7
7
0
Program ICycles
Words
1
1
1
1
1
1
1
B-47

Advertisement

Table of Contents
loading

Table of Contents