<s>
The	O
FMA	B-General_Concept
instruction	I-General_Concept
set	I-General_Concept
is	O
an	O
extension	O
to	O
the	O
128	O
and	O
256-bit	O
Streaming	B-General_Concept
SIMD	I-General_Concept
Extensions	I-General_Concept
instructions	O
in	O
the	O
x86	B-Operating_System
microprocessor	I-Operating_System
instruction	B-General_Concept
set	I-General_Concept
to	O
perform	O
fused	O
multiply	O
–	O
add	O
(	O
FMA	O
)	O
operations	O
.	O
</s>
<s>
FMA4	B-General_Concept
is	O
supported	O
in	O
AMD	O
processors	O
starting	O
with	O
the	O
Bulldozer	O
architecture	O
.	O
</s>
<s>
FMA4	B-General_Concept
was	O
performed	O
in	O
hardware	O
before	O
FMA3	B-General_Concept
was	O
.	O
</s>
<s>
Support	O
for	O
FMA4	B-General_Concept
has	O
been	O
removed	O
since	O
Zen	O
1	O
.	O
</s>
<s>
FMA3	B-General_Concept
is	O
supported	O
in	O
AMD	O
processors	O
starting	O
with	O
the	O
Piledriver	O
architecture	O
and	O
Intel	O
starting	O
with	O
Haswell	B-Device
processors	I-Device
and	O
Broadwell	B-General_Concept
processors	I-General_Concept
since	O
2014	O
.	O
</s>
<s>
FMA3	B-General_Concept
and	O
FMA4	B-General_Concept
instructions	O
have	O
almost	O
identical	O
functionality	O
,	O
but	O
are	O
not	O
compatible	O
.	O
</s>
<s>
Both	O
contain	O
fused	O
multiply	O
–	O
add	O
(	O
FMA	O
)	O
instructions	O
for	O
floating-point	B-Algorithm
scalar	O
and	O
SIMD	B-Device
operations	O
,	O
but	O
FMA3	B-General_Concept
instructions	O
have	O
three	O
operands	O
,	O
while	O
FMA4	B-General_Concept
ones	O
have	O
four	O
.	O
</s>
<s>
The	O
FMA	O
operation	O
has	O
the	O
form	O
d	O
=	O
round( a	O
·	O
b	O
+	O
c	O
)	O
,	O
where	O
the	O
round	O
function	O
performs	O
a	O
rounding	B-Algorithm
to	O
allow	O
the	O
result	O
to	O
fit	O
within	O
the	O
destination	O
register	O
if	O
there	O
are	O
too	O
many	O
significant	O
bits	O
to	O
fit	O
within	O
the	O
destination	O
.	O
</s>
<s>
The	O
four-operand	O
form	O
(	O
FMA4	B-General_Concept
)	O
allows	O
a	O
,	O
b	O
,	O
c	O
and	O
d	O
to	O
be	O
four	O
different	O
registers	O
,	O
while	O
the	O
three-operand	O
form	O
(	O
FMA3	B-General_Concept
)	O
requires	O
that	O
d	O
be	O
the	O
same	O
register	O
as	O
a	O
,	O
b	O
or	O
c	O
.	O
The	O
three-operand	O
form	O
makes	O
the	O
code	O
shorter	O
and	O
the	O
hardware	O
implementation	O
slightly	O
simpler	O
,	O
while	O
the	O
four-operand	O
form	O
provides	O
more	O
programming	O
flexibility	O
.	O
</s>
<s>
See	O
XOP	O
instruction	B-General_Concept
set	I-General_Concept
for	O
more	O
discussion	O
of	O
compatibility	O
issues	O
between	O
Intel	O
and	O
AMD	O
.	O
</s>
<s>
Zen	O
:	O
WikiChip	O
's	O
testing	O
shows	O
FMA4	B-General_Concept
still	O
appears	O
to	O
work	O
(	O
under	O
the	O
conditions	O
of	O
the	O
tests	O
)	O
despite	O
not	O
being	O
officially	O
supported	O
and	O
not	O
even	O
reported	O
by	O
CPUID	B-Architecture
.	O
</s>
<s>
AMD	O
Official	O
Web	O
Site	O
FMA4	B-General_Concept
Support	O
Note	O
ZEN	O
CPUs	O
=	O
AMD	O
ThreadRipper	O
1900x	O
,	O
R7	O
Pro	O
1800	O
,	O
1700	O
,	O
R5	O
Pro	O
1600	O
,	O
1500	O
,	O
R3	O
Pro	O
1300	O
,	O
1200	O
,	O
R3	O
2200G	O
,	O
R5	O
2400G	O
.	O
</s>
<s>
Intel	O
has	O
not	O
released	O
CPUs	O
with	O
support	O
for	O
FMA4	B-General_Concept
.	O
</s>
<s>
The	O
incompatibility	O
between	O
Intel	O
's	O
FMA3	B-General_Concept
and	O
AMD	O
's	O
FMA4	B-General_Concept
is	O
due	O
to	O
both	O
companies	O
changing	O
plans	O
without	O
coordinating	O
coding	O
details	O
with	O
each	O
other	O
.	O
</s>
<s>
AMD	O
changed	O
their	O
plans	O
from	O
FMA3	B-General_Concept
to	O
FMA4	B-General_Concept
while	O
Intel	O
changed	O
their	O
plans	O
from	O
FMA4	B-General_Concept
to	O
FMA3	B-General_Concept
almost	O
at	O
the	O
same	O
time	O
.	O
</s>
<s>
August	O
2007	O
:	O
AMD	O
announces	O
the	O
SSE5	B-General_Concept
instruction	B-General_Concept
set	I-General_Concept
,	O
which	O
includes	O
3-operand	O
FMA	O
instructions	O
.	O
</s>
<s>
April	O
2008	O
:	O
Intel	O
announces	O
their	O
AVX	B-General_Concept
and	O
FMA	B-General_Concept
instruction	I-General_Concept
sets	I-General_Concept
,	O
including	O
4-operand	O
FMA	O
instructions	O
.	O
</s>
<s>
The	O
coding	O
of	O
these	O
instructions	O
uses	O
the	O
new	O
VEX	B-General_Concept
coding	I-General_Concept
scheme	I-General_Concept
,	O
which	O
is	O
more	O
flexible	O
than	O
AMD	O
's	O
DREX	O
scheme	O
.	O
</s>
<s>
The	O
VEX	B-General_Concept
coding	I-General_Concept
scheme	I-General_Concept
is	O
still	O
used	O
.	O
</s>
<s>
May	O
2009	O
:	O
AMD	O
changes	O
the	O
specification	O
of	O
their	O
FMA	O
instructions	O
from	O
the	O
3-operand	O
DREX	O
form	O
to	O
the	O
4-operand	O
VEX	B-General_Concept
form	O
,	O
compatible	O
with	O
the	O
April2008	O
Intel	O
specification	O
rather	O
than	O
the	O
December2008	O
Intel	O
specification	O
.	O
</s>
<s>
October	O
2011	O
:	O
AMD	O
Bulldozer	O
processor	O
supports	O
FMA4	B-General_Concept
.	O
</s>
<s>
January	O
2012	O
:	O
AMD	O
announces	O
FMA3	B-General_Concept
support	O
in	O
future	O
processors	O
codenamed	O
Trinity	O
and	O
Vishera	O
;	O
they	O
are	O
based	O
on	O
the	O
Piledriver	O
architecture	O
.	O
</s>
<s>
May	O
2012	O
:	O
AMD	O
Piledriver	O
processor	O
supports	O
both	O
FMA3	B-General_Concept
and	O
FMA4	B-General_Concept
.	O
</s>
<s>
June	O
2013	O
:	O
Intel	B-Device
Haswell	I-Device
processor	O
supports	O
FMA3	B-General_Concept
.	O
</s>
<s>
February	O
2017	O
The	O
first	O
generation	O
of	O
AMD	O
Ryzen	O
processors	O
officially	O
supports	O
FMA3	B-General_Concept
,	O
but	O
not	O
FMA4	B-General_Concept
according	O
to	O
the	O
CPUID	B-Architecture
instruction	O
.	O
</s>
<s>
There	O
has	O
been	O
confusion	O
regarding	O
whether	O
FMA4	B-General_Concept
was	O
implemented	O
or	O
not	O
on	O
this	O
processor	O
due	O
to	O
errata	O
in	O
the	O
initial	O
patch	O
to	O
the	O
GNU	B-Application
Binutils	I-Application
package	O
that	O
has	O
since	O
been	O
rectified	O
.	O
</s>
<s>
While	O
the	O
FMA4	B-General_Concept
instructions	O
seem	O
to	O
work	O
according	O
to	O
some	O
tests	O
,	O
they	O
can	O
also	O
give	O
wrong	O
results	O
.	O
</s>
<s>
Additionally	O
,	O
the	O
initial	O
Ryzen	O
CPUs	O
could	O
be	O
crashed	O
by	O
a	O
particular	O
sequence	O
of	O
FMA3	B-General_Concept
instructions	O
.	O
</s>
<s>
GCC	B-Application
supports	O
FMA4	B-General_Concept
with	O
-mfma4	O
since	O
version	O
4.5.0	O
and	O
FMA3	B-General_Concept
with	O
-mfma	O
since	O
version	O
4.7.0	O
.	O
</s>
<s>
Microsoft	B-Application
Visual	I-Application
C++	I-Application
2010	O
SP1	O
supports	O
FMA4	B-General_Concept
instructions	O
.	O
</s>
<s>
Microsoft	B-Application
Visual	I-Application
C++	I-Application
2012	O
supports	O
FMA3	B-General_Concept
instructions	O
(	O
if	O
the	O
processor	O
also	O
supports	O
AVX2	O
instruction	B-General_Concept
set	I-General_Concept
extension	O
)	O
.	O
</s>
<s>
PathScale	B-Language
supports	O
FMA4	B-General_Concept
with	O
-mfma	O
.	O
</s>
<s>
LLVM	B-Application
3.1	O
adds	O
FMA4	B-General_Concept
support	O
,	O
along	O
with	O
preliminary	O
FMA3	B-General_Concept
support	O
.	O
</s>
<s>
Open64	B-Application
5.0	O
adds	O
"	O
limited	O
support	O
"	O
.	O
</s>
<s>
Intel	B-Language
compilers	I-Language
support	O
only	O
FMA3	B-General_Concept
instructions	O
.	O
</s>
<s>
NASM	B-Application
supports	O
FMA3	B-General_Concept
instructions	O
since	O
version	O
2.03	O
and	O
FMA4	B-General_Concept
instructions	O
since	O
2.06	O
.	O
</s>
<s>
FASM	B-Application
supports	O
both	O
FMA3	B-General_Concept
and	O
FMA4	B-General_Concept
instructions	O
.	O
</s>
