Instructions
www.ti.com
ZERO RaH
Zero the Floating-Point Register RaH
Operands
RaH
floating-point register (R0H to R7H)
Opcode
LSW: 1110 0101
1001 0aaa
Description
Zero the indicated floating-point register:
RaH = 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
ZERO
R4H
; R4H = real = 0
ZERO
R5H
; R5H = imag = 0
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
Instruction Set
134
SPRUEO2A – June 2007 – Revised August 2008
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 ...