B.1.14 Array Search; B.1.14.1 Index Of The Highest Signed Value; B.1.14.2 Index Of The Highest Positive Value - Motorola DSP56800 Manual

16-bit digital signal processor
Table of Contents

Advertisement

B.1.14
Array Search
The following two array search benchmarks are provided:
Index of the highest signed value
Index of the highest positive value
B.1.14.1
Index of the Highest Signed Value
opt
cc
move
#AD,r0
clr
a
do
#N,end_lp3
abs
b
cmp
b,a
tle
b,a
move
x:(r0)+,b
end_lp3
lea
(r1)-
lea
(r1)-
;
;
B.1.14.2
Index of the Highest Positive Value
opt
cc
move
#AD,r0
clr
a
do
#N/2,end_lp3
cmp
x0,a
tle
x0,a
cmp
y0,a
tle
y0,a
end_lp3
lea
(r1)-
lea
(r1)-
;
;
B-22
x:(r0)+,b
r0,r1
Total: 10
x:(r0)+,x0
x:(r0)+,y0
r0,r1
x:(r0)+,x0
r0,r1
Total: 10
DSP56800 Family Manual
; 2
2
; 1
1
; 2
3
; 1
1
; 1
1
; 1
1
; 1
1
; 1
1
; 1
1
_______
4N+8
(worst case)
; 2
2
; 1
1
; 2
3
; 1
1
; 1
1
; 1
1
; 1
1
; 1
1
; 1
1
_______
2N+8
(worst case)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents