nmacchw

Negative Multiply Accumulate Cross Halfword

nmacchw RT, RA, RB

Negate product of cross halfwords and add to accumulator.

Details

Multiplies the sign-extended bottom halfword of RA by the sign-extended top halfword of RB, negates the product, and adds it to the current value of RT (treating RT as a 32-bit accumulator). The result is stored back in RT. No condition register or status flags are affected.

Pseudocode Operation

a ← EXTS(RA[16:31])
b ← EXTS(RB[0:15])
product ← (a × b)[32:63]
RT ← RT + (¬product + 1)

Example

nmacchw r3, r4, r5

Encoding

Binary Layout
4
0
RT
6
RA
11
RB
16
174
21
0
31
 
Format XO-form
Opcode 0x1000015C
Extension Embedded

Operands

  • RT
    Acc/Dest
  • RA
    Src A
  • RB
    Src B