www.ti.com
Instructions
ZEROA
Zero All Floating-Point Registers
Operands
none
Opcode
LSW: 1110 0101
0110 0011
Description
Zero all floating-point registers:
R0H = 0
R1H = 0
R2H = 0
R3H = 0
R4H = 0
R5H = 0
R6H = 0
R7H = 0
Flags
This instruction modifies the following flags in the STF register:
Flag
TF
ZI
NI
ZF
NF
LUF
LVF
Modified
No
No
No
No
No
No
No
No flags affected.
Pipeline
This is a single-cycle instruction.
Example
;for(i = 0; i < n; i++)
;{
;
real += (x[2*i] * y[2*i]) - (x[2*i+1] * y[2*i+1]);
;
imag += (x[2*i] * y[2*i+1]) + (x[2*i+1] * y[2*i]);
;}
;Assume AR7 = n-1
ZER0A
; Clear all RaH registers
LOOP
MOV
AL, AR7
MOV
ACC, AL << 2
MOV
AR0, ACC
MOV32
R0H, *+XAR4[AR0]
; R0H =
x[2*i]
MOV32
R1H, *+XAR5[AR0]
; R1H =
y[2*i]
ADD
AR0,#2
MPYF32
R6H, R0H, R1H;
; R6H =
x[2*i] * y[2*i]
|| MOV32
R2H, *+XAR4[AR0]
; R2H =
x[2*i+1]
MPYF32
R1H, R1H, R2H
; R1H =
y[2*i] * x[2*i+2]
|| MOV32
R3H, *+XAR5[AR0]
; R3H =
y[2*i+1]
MPYF32
R2H, R2H, R3H
; R2H =
x[2*i+1] * y[2*i+1]
|| ADDF32
R4H, R4H, R6H
; R4H += x[2*i] * y[2*i]
MPYF32
R0H, R0H, R3H
; R0H =
x[2*i] * y[2*i+1]
|| ADDF32
R5H, R5H, R1H
; R5H += y[2*i] * x[2*i+2]
SUBF32
R4H, R4H, R2H
; R4H -= x[2*i+1] * y[2*i+1]
ADDF32
R5H, R5H,R0H
; R5H += x[2*i] * y[2*i+1]
BANZ
LOOP , AR7--
See also
SPRUEO2A – June 2007 – Revised August 2008
Instruction Set
135
Summary of Contents for TMS320C28 series
Page 2: ...2 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Page 12: ...Introduction 12 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Page 20: ...CPU Register Set 20 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Page 136: ...Instruction Set 136 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...