IMPYAL P,XT,loc32
Repeat
Example
; Calculate signed result:
; Y64 = (X0*C0 + X1*C1 + X2*C2) >> 2
SPM
ZAPA
MOVL
IMPYL
MOVL
IMPYAL P,XT,@C1
MOVL
IMPYAL P,XT,@C2
ADDUL
MOVL
MOVU
MOVB
QMPYL
MOVL
QMPYAL P,XT,@C1
MOVL
QMPYAL P,XT,@C0
ADDL
MOVL
6-104
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
−2
XT,@X0
P,XT,@C0
XT,@X1
XT,@X2
ACC,@P
@Y64+0,ACC
@AL,OVC
AH,#0
P,XT,@C2
XT,@X1
XT,@X0
ACC,P << PM
@Y64+2,ACC
; Set product shift mode to ">> 2"
; Zero ACC, P, OVCU
; XT
= X0
; P
= low 32 bits of (X0*C0 << 2)
; XT
= X1
; OVCU:ACC = OVCU:ACC + P,
; P
= low 32 bits of (X1*C1 << 2)
; XT
= X2
; OVCU:ACC = OVCU:ACC + P,
; P
= low 32 bits of (X2*C2 << 2)
; OVCU:ACC = OVCU:ACC + P
; Store low 32-bit result into Y64
; ACC = OVCU (carry count)
; P
= high 32 bits of (X2*C2)
; XT
= X1
; ACC = ACC + P >> 2,
; P
= high 32 bits of (X1*C1)
; XT
= X0
; ACC = ACC + P >> 2,
; P
= high 32 bits of (X0*C0)
; ACC = ACC + P >> 2
; Store high 32-bit result into Y64
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?