MMPYF32 MRa, #16FHi, MRb
32-Bit Floating-Point Multiply
Operands
MRa
CLA floating-point destination register (MR0 to MR3)
#16FHi
A 16-bit immediate value that represents the upper 16-bits of an
IEEE 32-bit floating-point value. The low 16-bits of the mantissa
are assumed to be all 0.
MRb
CLA floating-point source register (MR0 to MR3)
Opcode
LSW: IIII IIII IIII IIII
MSW: 0111 0111 1000 bbaa
Description
Multiply MRb with the floating-point value represented by the immediate operand. Store
the result of the addition in MRa.
#16FHi is a 16-bit immediate value that represents the upper 16-bits of an IEEE 32-bit
floating-point value. The low 16-bits of the mantissa are assumed to be all 0. #16FHi is
most useful for representing constants where the lowest 16-bits of the mantissa are 0.
Some examples are 2.0 (0x40000000), 4.0 (0x40800000), 0.5 (0x3F000000), and -1.5
(0xBFC00000). The assembler will accept either a hex or float as the immediate value.
That is, the value -1.5 can be represented as #-1.5 or #0xBFC0.
MRa = MRb * #16FHi:0;
This instruction can also be written as MMPYF32 MRa, MRb, #16FHi.
Flags
This instruction modifies the following flags in the MSTF register:.
Flag
TF
ZF
NF
LUF
LVF
Modified
No
No
No
Yes
Yes
The MSTF register flags are modified as follows:
• LUF = 1 if MMPYF32 generates an underflow condition.
• LVF = 1 if MMPYF32 generates an overflow condition.
Pipeline
This is a single-cycle instruction.
Example 1
; Same as example 2 but #16FHi is represented in float
MMOVIZ MR3, #2.0 ; MR3 = 2.0 (0x40000000)
MMPYF32 MR0, #3.0, MR3 ; MR0 = 3.0 * MR3 = 6.0 (0x40C00000)
MMOV32 @_X, MR0 ; Save the result in variable X
Example 2
; Same as example 1 but #16FHi is represented in Hex
MMOVIZ MR3, #2.0 ; MR3 = 2.0 (0x40000000)
MMPYF32 MR0, #0x4040, MR3 ; MR0 = 0x4040 * MR3 = 6.0 (0x40C00000)
MMOV32 @_X, MR0 ; Save the result in variable X
Control Law Accelerator (CLA)
674
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......