Instructions
www.ti.com
ABSF32 RaH, RbH
32-bit Floating-Point Absolute Value
Operands
RaH
floating-point destination register (R0H to R7H)
RbH
floating-point source register (R0H to R7H)
Opcode
LSW: 1110 0110
1001 0101
MSW: 0000 0000
00bb baaa
Description
The absolute value of RbH is loaded into RaH. Only the sign bit of the operand is
modified by the ABSF32 instruction.
if (RbH < 0) {RaH = -RbH}
else
{RaH =
RbH}
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 STF register flags are modified as follows:
NF = 0;
ZF = 0;
if ( RaH[30:23] == 0) ZF = 1;
Pipeline
This is a single-cycle instruction.
Example
MOVIZF32
R1H, #-2.0
; R1H = -2.0 (0xC0000000)
ABSF32
R1H, R1H
; R1H =
2.0 (0x40000000), ZF = NF = 0
MOVIZF32
R0H, #5.0
; R0H =
5.0 (0x40A00000)
ABSF32
R0H, R0H
; R0H =
5.0 (0x40A00000), ZF = NF = 0
MOVIZF32
R0H, #0.0
; R0H =
0.0
ABSF32
R1H, R0H
; R1H =
0.0
ZF = 1, NF = 0
See also
Instruction Set
34
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 ...