![Texas Instruments TMS320 2806 Series Technical Reference Manual Download Page 694](http://html1.mh-extra.com/html/texas-instruments/tms320-2806-series/tms320-2806-series_technical-reference-manual_1095596694.webp)
MSUB32 MRa, MRb, MRc
32-Bit Integer Subtraction
Operands
MRa
CLA floating-point destination register (MR0 to MR3)
MRb
CLA floating-point destination register (MR0 to MR3)
MRc
CLA floating-point destination register (MR0 to MR3)
Opcode
LSW: 0000 0000 00cc bbaa
MSW: 0111 1100 1110 0000
Description
32-bit integer addition of MRb and MRc.
MARa(31:0) = MARb(31:0) - MRc(31:0);
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 = MRa(31);
ZF = 0;
if(MRa(31:0) == 0) { ZF = 1; }
Pipeline
This is a single-cycle instruction.
Example
; Given A = (int32)1
; B = (int32)2
; C = (int32)-7
;
;
Calculate Y2 = A - B - C
;
_Cla1Task3:
MMOV32 MR0, @_A ; MR0 = 1 (0x00000001)
MMOV32 MR1, @_B ; MR1 = 2 (0x00000002)
MMOV32 MR2, @_C ; MR2 = -7 (0xFFFFFFF9)
MSUB32 MR3, MR0, MR1 ; A + B
MSUB32 MR3, MR3, MR2 ; A + B + C = 6 (0x0000006)
MMOV32 @_y2, MR3 ; Store y2
MSTOP ; End of task
See also
MADD32 MRa, MRb, MRc
MAND32 MRa, MRb, MRc
MASR32 MRa, #SHIFT
MLSL32 MRa, #SHIFT
MLSR32 MRa, #SHIFT
MOR32 MRa, MRb, MRc
MXOR32 MRa, MRb, MRc
Control Law Accelerator (CLA)
694
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Summary of Contents for TMS320 2806 Series
Page 2: ......