Instructions
www.ti.com
MAXF32 RaH, RbH
MOV32 RcH, RdH
32-bit Floating-Point Maximum with Parallel Move
Operands
RaH
floating-point source/destination register for the MAXF32 operation (R0H to R7H)
RaH cannot be the same register as RcH
RbH
floating-point source register for the MAXF32 operation (R0H to R7H)
RcH
floating-point destination register for the MOV32 operation (R0H to R7H)
RcH cannot be the same register as RaH
RdH
floating-point source register for the MOV32 operation (R0H to R7H)
Opcode
LSW: 1110 0110
1001 1100
MSW: 0000 dddc
ccbb baaa
Description
If RaH is less than RbH, then load RaH with RbH. Thus RaH will always have the
maximum value. If RaH is less than RbH, then, in parallel, also load RcH with the
contents of RdH.
if(RaH < RbH) { RaH = RbH; RcH = RdH; }
The MAXF32 instruction is performed as a logical compare operation. This is possible
because of the IEEE floating-point format offsets the exponent. Basically the bigger the
binary number, the bigger the floating-point value.
Special cases for the output from the MAXF32 operation:
•
NaN output will be converted to infinity
•
A denormalized output will be converted to positive zero.
Restrictions
The destination register for the MAXF32 and the MOV32 must be unique. That is, RaH
cannot be the same register as RcH.
Flags
This instruction modifies the following flags in the STF register:
Flag
TF
ZI
NI
ZF
NF
LUF
LVF
Modified
No
No
No
Yes
Yes
No
No
The ZF and NF flags are configured on the result of the operation, not the result stored
in the destination register.
if(RaH == RbH) {ZF=1, NF=0}
if(RaH >
RbH) {ZF=0, NF=0}
if(RaH <
RbH) {ZF=0, NF=1}
Pipeline
This is a single-cycle instruction.
Example
MOVIZF32
R0H, #5.0
; R0H =
5.0 (0x40A00000)
MOVIZF32
R1H, #4.0
; R1H =
4.0 (0x40800000)
MOVIZF32
R2H, #-1.5
; R2H = -1.5 (0xBFC00000)
MOVIZF32
R3H, #-2.0
; R3H = -2.0 (0xC0000000)
MAXF32
R0H, R1H
; R0H = 5.0, R3H = -1.5, ZF = 0, NF = 0
|| MOV32
R3H, R2H
MAXF32
R1H, R0H
; R1H = 5.0, R3H = -1.5, ZF = 0, NF = 1
|| MOV32
R3H, R2H
MAXF32
R0H, R1H
; R0H = 5.0, R2H = -1.5, ZF = 1, NF = 0
|| MOV32
R2H, R1H
See also
74
Instruction Set
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 ...