xsmaddmsp

VSX Scalar Multiply-Add Type-M Single-Precision

xsmaddmsp FRT,FRB,FRC

Multiplies two single-precision floating-point values and adds a third, storing the result in the target register (Type-M form).

Details

The xsmaddmsp instruction performs a fused scalar multiply-add operation in single-precision. In the Type-M form, the product of the values in FRB and FRC is added to the value in FRT (the target register also serves as the addend), and the result is stored back into FRT. The operation is performed in single-precision floating-point format as defined by the VSX facility.

Pseudocode Operation

FRT <- (FRB) * (FRC) + (FRA)

Programming Note

The xsmaddmsp instruction is commonly used for efficient scalar floating-point arithmetic operations, particularly in applications requiring high performance and precision. Ensure that the input registers are properly aligned to avoid potential exceptions. This instruction operates at a privilege level that allows it to be executed by user-mode programs, making it accessible for general-purpose computations. Be aware of the FPSCR register's impact on rounding modes and exception flags.

Example

xsmaddmsp f1, f3, f4

Encoding

Binary Layout
111100
0
FRT
6
FRB
11
FRC
16
00001
21
001
31
 
Format XX3-form
Opcode
Extension VSX
Registers Altered FPSCR

Operands

  • FRT
    Target Floating Point Register
  • FRB
    Source Floating Point Register
  • FRC
    Source Floating Point Register