MABSF32 MRa, MRb
32-Bit Floating-Point Absolute Value
Operands
MRa
CLA floating-point destination register (MR0 to MR3)
MRb
CLA floating-point source register (MR0 to MR3)
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1110 0010 0000
Description
The absolute value of MRb is loaded into MRa. Only the sign bit of the operand is
modified by the MABSF32 instruction.
if (MRb < 0) {MRa = -MRb};
else {MRa = MRb};
Flags
This instruction modifies the following flags in the MSTF register:
Flag
TF
ZF
NF
LUF
LVF
Modified
No
Yes
Yes
No
No
The MSTF register flags are modified as follows:
NF = 0;
ZF = 0;
if ( MRa(30:23) == 0) ZF = 1;
Pipeline
This is a single-cycle instruction.
Example
MMOVIZ MR0, #-2.0 ; MR0 = -2.0 (0xC0000000)
MABSF32 MR0, MR0 ; MR0 = 2.0 (0x40000000), ZF = NF = 0
MMOVIZ MR0, #5.0 ; MR0 = 5.0 (0x40A00000)
MABSF32 MR0, MR0 ; MR0 = 5.0 (0x40A00000), ZF = NF = 0
MMOVIZ MR0, #0.0 ; MR0 = 0.0
MABSF32 MR0, MR0 ; MR0 = 0.0 ZF = 1, NF = 0
See also
Control Law Accelerator (CLA)
594
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......