Using Less Straight-Forward Instructions - Motorola DSP56600 Manual

Application optimization for digital signal processors
Table of Contents

Advertisement

The features that help in this case are:
• The ability to specify combinations of signed and unsigned
operands
• The 24-bit right arithmetic shifting inherent in the DMAC
instruction
Using these instruction combinations, and others, enables the
programmer to build other multi-register arithmetic operations. The
user is referred to Appendix A of the DSP56300 and DSP56600
Family Manuals for the full documentation of the various
instruction options.
2.7
USING LESS STRAIGHT-FORWARD
INSTRUCTIONS
The rich instruction set includes many instructions that are in fact
combinations of smaller atomic operations. Among these
instructions are ADDL, ADDR, MAX, EXTRACT, INSERT, MACR,
and MPYR.
A good example of using some of these less straight-forward
instructions is the SQROOT routine. The following is a straight
forward implementation of that routine:
sqroot
;determine 2nd term and add contribution
asr
sub
move
sub
;determine 3rd term and add contribution
mpy
move
asr
add
;determine 4th term and add contribution
mpy
move
asr
add
;determine partial 5th term
mpyr
move
MOTOROLA
Optimizing DSP56300/DSP56600 Applications
a
#$4000,a
;a = L_Temp1
a1,x0
;x0 = swTemp
#$8000,a
;a = L_Temp1
-x0,x0,b
;b = swTemp ^ 2
b1,x1
;x1 = swTemp2
b
;a = L_Temp0
b,a
-x0,x1,b
;b = swTemp x swTemp2
b1,y0
;y0 = swTemp3
b
;a = L_Temp1
b,a
x0,y0,b
b,y1
;y1=swTemp4

Using Less Straight-Forward Instructions

Data Operations
2-13

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56300

Table of Contents