fnmadd

Floating Negative Multiply-Add

fnmadd FRT,FRA,FRC,FRB
fnmadd. FRT,FRA,FRC,FRB

Performs a floating-point negative multiply-add operation.

Details

The operation FRT ←- ( [(FRA)×(FRC)] + (FRB) ) is performed. The result is negated and placed into register FRT.

Pseudocode Operation

FRT ←- ( [(FRA)×(FRC)] + (FRB) )
if 'fnmadd.' then
    update CR1 and FPSCR fields

Programming Note

The fnmadd instruction is useful for performing a negated multiply-add operation on floating-point numbers. Ensure that the input registers FRA, FRC, and FRB are correctly aligned and contain valid floating-point values to avoid exceptions. If using the 'fnmadd.' form, be aware that it updates CR1 and FPSCR, which can affect subsequent conditional operations or exception handling.

Example

fnmadd f1, f2, f4, f3

Encoding

Binary Layout
63
0
FRT
6
FRA
11
FRB
16
FRC
21
31
26
/
 
Format A-form
Opcode 0xFC00003E
Extension Floating-Point
Registers Altered FPSCR, CR1

Operands

  • FRT
    Target
  • FRA
    A
  • FRC
    C
  • FRB
    B