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
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?