EasyManua.ls Logo

Texas Instruments TMS320C28x - Page 267

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...
IMPYXUL P,XT,loc32
6-110
Example ; Calculate result: Y64 = M64*X64 + B64
; Y64 = Y1:Y0, M64 = M1:M0, X64 = X1:X0, B64 = B1:B0
MOVL XT,@X0 ; XT = X0
IMPYL P,XT,@M0 ; P = low 32 bits of (uns M0 * uns X0)
MOVL ACC,@B0 ; ACC = B0
ADDUL ACC,@P ; ACC = ACC + P
MOVL @Y0,ACC ; Store result into Y0
QMPYUL P,XT,@M0 ; P = high 32 bits of (uns M0 * uns X0)
MOVL XT,@X1 ; XT = X1
MOVL ACC,@P ; ACC = P
IMPYXUL P,XT,@M0 ; P = low 32 bits of (uns M0 * sign X1)
MOVL XT,@M1 ; XT = M1
ADDCL ACC,@P ; ACC = ACC + P + carry
IMPYXUL P,XT,@X0 ; P = low 32 bits of (sign M1 * uns X0)
ADDUL ACC,@P ; ACC = ACC + P
ADDUL ACC,@B1 ; ACC = ACC + B1
MOVL @Y1,P ; Store result into Y1

Table of Contents

Related product manuals