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
Operands
-
RT
Acc/Dest -
RA
Src A -
RB
Src B
Example
nmacchw r3, r4, r5
Related
More in Embedded
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
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)