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