__PS_MADD / __PS_MADDS0 / __PS_MADDS1 / __PS_MSUB / __PS_NMADD / __PS_NMSUB

Syntax

#include <ppc_ps.h>

f32x2 __PS_MADD(f32x2 ps1, f32x2 ps2, f32x2 ps3);
f32x2 __PS_MADDS0(f32x2 ps1, f32x2 ps2, f32x2 ps3);
f32x2 __PS_MADDS1(f32x2 ps1, f32x2 ps2, f32x2 ps3);
f32x2 __PS_MSUB(f32x2 ps1, f32x2 ps2, f32x2 ps3);
f32x2 __PS_NMADD(f32x2 ps1, f32x2 ps2, f32x2 ps3);
f32x2 __PS_NMSUB(f32x2 ps1, f32x2 ps2, f32x2 ps3);

Parameters

ps1 Paired single value.
ps2 Paired single value.
ps3 Paired single value.

Return Values

Returns the result of the multiply accumulate operation.

Description

Returns the result of multiply accumulate on the input values.

Behavior of __PS_MADD

#include <ppc_ghs.h>

f32x2 in1;
f32x2 in2;
f32x2 in3;
f32x2 out;
...
out = __PS_MADD(in1, in2, in3);

Is equivalent to:

out[0] = (in1[0] * in2[0]) + in3[0];
out[1] = (in1[1] * in2[1]) + in3[1];

Behavior of __PS_MADDS0

#include <ppc_ghs.h>

f32x2 in1;
f32x2 in2;
f32x2 in3;
f32x2 out;
...
out = __PS_MADDS0(in1, in2, in3);

Is equivalent to:

out[0] = (in1[0] * in2[0]) + in3[0];
out[1] = (in1[1] * in2[0]) + in3[1];

Behavior of __PS_MADDS1

#include <ppc_ghs.h>

f32x2 in1;
f32x2 in2;
f32x2 in3;
f32x2 out;
...
out = __PS_MADDS1(in1, in2, in3);

Is equivalent to:

out[0] = (in1[0] * in2[1]) + in3[0];
out[1] = (in1[1] * in2[1]) + in3[1];

Behavior of __PS_MSUB

#include <ppc_ghs.h>

f32x2 in1;
f32x2 in2;
f32x2 in3;
f32x2 out;
...
out = __PS_MSUB(in1, in2, in3);

Is equivalent to:

out[0] = (in1[0] * in2[0]) - in3[0];
out[1] = (in1[1] * in2[1]) - in3[1];

Behavior of __PS_NMADD

#include <ppc_ghs.h>

f32x2 in1;
f32x2 in2;
f32x2 in3;
f32x2 out;
...
out = __PS_NMADD(in1, in2, in3);

Is equivalent to:

out[0] = -((in1[0] * in2[0]) + in3[0]);
out[1] = -((in1[1] * in2[1]) + in3[1]);

Behavior of __PS_NMSUB

#include <ppc_ghs.h>

f32x2 in1;
f32x2 in2;
f32x2 in3;
f32x2 out;
...
out = __PS_NMADD(in1, in2, in3);

Is equivalent to:

out[0] = -((in1[0] * in2[0]) - in3[0]);
out[1] = -((in1[1] * in2[1]) - in3[1]);

Do Not Call From

__PS_MADD

None.

__PS_MADDS0

None.

__PS_MADDS1

None.

__PS_MSUB

None.

__PS_NMADD

None.

__PS_NMSUB

None.

See Also

Paired Single Type

Paired Single Functions

__PS_ABS
__PS_ADD
__PS_ADDS
__PS_FDUP
__PS_DIV
__PS_DIVS
__PS_MADDS
__PS_MERGE00
__PS_MERGE01
__PS_MERGE10
__PS_MERGE11
__PS_MSUBS
__PS_MUL
__PS_MULS
__PS_MULS0
__PS_MULS1
__PS_NABS
__PS_NMADDS
__PS_NMSUBS
__PS_NEG
__PS_NEGS
__PS_RES
__PS_RESS
__PS_RSQRTE
__PS_SEL
__PS_SUB
__PS_SUM0
__PS_SUM1
__PS_SUBS
__PSQ_L
__PSQ_LX
__PSQ_ST
__PSQ_STX

Fast Cast Routines

OSInitFastCast
OSf32tos16
OSf32tos8
OSf32tou16
OSf32tou8
OSs16tof32
OSs8tof32
OSu16tof32
OSu8tof32

Revision History

2013/05/08 Automated cleanup pass.
2011/09/21 Initial version.


CONFIDENTIAL