Conditional Dalu Instructions - Motorola DSP56600 Manual

Application optimization for digital signal processors
Table of Contents

Advertisement

5. In order to activate the new task T2, the Operating System
dispatcher should first restore the task T2 programming
model:
move
move
....
move
move
move
move
move
move
....
move
move
6. The second thing the Operating System dispatcher should do
is to restore the stack status:
move
move
move
move
move
rep
move
move
move
7. The last thing the Operating System dispatcher should do is
to execute an RTI instruction, which will give control back to
the new task T2:
;Activate T2:
rti
3.5

CONDITIONAL DALU INSTRUCTIONS

The DSP56300/600 instruction set has a group of arithmetic
instructions that could be executed conditionally, depending on the
value of bits in the CCR (Condition Code Register). For example, the
instruction:
add
adds register X0 to the accumulator A only if the Zero bit in the CCR
is not set. Otherwise, the instruction is executed as a NOP. The
instruction in the above example does not update the CCR, thus
keeping the status unaltered for subsequent use. The user may
MOTOROLA
Optimizing DSP56300/DSP56600 Applications
#T2_task_reg_area,r7 ;Load pointer.
x:(r7)+,x0
r7,n0
x:(r7)+,r7
x:(r7)+,x:OS_r7_temp ;Keep r7.
n0,r7
x:(r7)+,n0
x:(r7)+,n1
x:(r7)+,lc
x:(r7)+,la
x:(r7)+,sc
sc,x:OS_SC_temp
x:-(r0),sp
x:-(r0),ep
#2,sc
#14
ssh,x:OS_dummy
x:OS_sc_temp,sc
x:OS_r7_temp,r7
x0,a
IFne
;Restore registers...
;save pointer
;Restore r7 w/ T2 data
;restore pointer
;Restore n0
;Restore n1
;Restore SP.
;Restore EP.
;reset Stack Counter.
;Restore sc.
;Restore r7.
Program Control
Conditional DALU Instructions
3-11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56300

Table of Contents