www.ti.com
Instructions
SUBF32 RaH, RbH, RcH
32-bit Floating-Point Subtraction
Operands
RaH
floating-point destination register (R0H to R1)
RbH
floating-point source register (R0H to R1)
RcH
floating-point source register (R0H to R1)
Opcode
LSW: 1110 0111
0010 0000
MSW: 0000 000c
ccbb baaa
Description
Subtract the contents of two floating-point registers
RaH = RbH - RcH
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
Yes
Yes
The STF register flags are modified as follows:
•
LUF = 1 if MPYF32 generates an underflow condition.
•
LVF = 1 if MPYF32 generates an overflow condition.
Pipeline
This is a 2 pipeline cycle (2p) instruction. That is:
SUBF32
RaH, RbH, RcH
; 2 pipeline cycles (2p)
NOP
; 1 cycle delay or non-conflicting instruction
; <-- SUBF32 completes, RaH updated
NOP
Any instruction in the delay slot must not use RaH as a destination register or as a
source operand.
Example
Calculate Y - A + B - C:
MOVL
XAR4, #A
MOV32
R0H,
*XAR4
; Load R0H with A
MOVL
XAR4, #B
MOV32
R1H,
*XAR4
; Load R1H with B
MOVL
XAR4, #C
ADDF32 R0H,R1H,R0H
; Add A + B and in parallel
|| MOV32
R2H,*XAR4
; Load R2H with C
; <-- MOV32 complete
MOVL
XAR4,#_xt
; <-- ADDF32 complete
SUBF32 R0H,R0H,R2H
; Subtract C from (A + B)
NOP
; <-- SUBF32 completes
MOV32
*XAR4,R0H
; Store the result
See also
SUBF32 RdH, ReH, RfH || MOV32 RaH, mem32
SUBF32 RdH, ReH, RfH || MOV32 mem32, RaH
MPYF32 RaH, RbH, RcH || SUBF32 RdH, ReH, RfH
SPRUEO2A – June 2007 – Revised August 2008
Instruction Set
123
Содержание TMS320C28 series
Страница 2: ...2 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 12: ...Introduction 12 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 20: ...CPU Register Set 20 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 136: ...Instruction Set 136 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...