EasyManua.ls Logo

Texas Instruments TMS320C28x - Page 460

Texas Instruments TMS320C28x
695 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
QMPYAL P,XT,loc32
6-303
Example ; Calculate signed result:
; Y32 = (X0*C0 + X1*C1 + X2*C2) >> (32 + 2)
SPM −2 ; Set product shift mode to “>> 2”
ZAPA ; Zero ACC, P, OVC
MOVL XT,@X0 ; XT = X0
QMPYL P,XT,@C0 ; P = high 32−bits of (X0*C0)
MOVL XT,@X1 ; XT = X0
QMPYAL P,XT,@C1 ; ACC = ACC + P >> 2,
; P = high 32−bits of (X1*C1)
MOVL XT,@X2 ; XT = X0
QMPYAL P,XT,@C2 ; ACC = ACC + P >> 2,
; P = high 32−bits of (X2*C2)
ADDL ACC,P << PM ; ACC = ACC + P >> 2
MOVL @Y32,ACC ; Store result into Y32

Table of Contents

Related product manuals