nmacchw

Negative Multiply Accumulate Cross Halfword

nmacchw RT, RA, RB

Negate product of cross halfwords and add to accumulator.

Encoding

Binary Layout
4
0:5
RT
6:10
RA
11:15
RB
16:20
174
21:30
0
31
 
Format XO-form
Opcode 0x1000015C
Extension Embedded

Operands

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

Example

nmacchw r3, r4, r5

Related

More in Embedded

Reference

Description

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.

Operation

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