Texas Instruments TMS320C28x Reference Manual page 464

Dsp cpu and instruction set
Table of Contents

Advertisement

Example
; Calculate signed result:
; Y32 = −(X0*C0 + X1*C1 + X2*C2) >> (32 + 2)
SPM
ZAPA
MOVL
QMPYL
MOVL
QMPYSL P,XT,@C1
MOVL
QMPYSL P,XT,@C2
SUBL
MOVL
−2
XT,@X0
P,XT,@C0
XT,@X1
XT,@X2
ACC,P << PM
@Y32,ACC
; Set product shift mode to ">> 2"
; Zero ACC, P, OVC
; XT
= X0
; P
= high 32−bits of (X0*C0)
; XT
= X0
; ACC = ACC − P >> 2,
; P
= high 32−bits of (X1*C1)
; XT
= X0
; ACC = ACC − P >> 2,
; P
= high 32−bits of (X2*C2)
; ACC = ACC − P >> 2
; Store result into Y32
QMPYSL P,XT,loc32
6-307

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C28x and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF