GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Contents
  • Current events
  • Random article
  • About Wikipedia
  • Contact us
  • Help
  • Learn to edit
  • Community portal
  • Recent changes
  • Upload file
  • Special pages
  • Search
  • Donate

This view

  • Original page
  • New address

GeezerVison is showing en.wikipedia.org — FMA instruction set - Wikipedia

(Redirected from FMA4)
Wikibooks logo
Wikibooks has a book on the topic of: X86 Assembly/AVX, AVX2, FMA3, FMA4

The FMA instruction set is an extension to the x86 microprocessor instruction set to perform fused multiply–add (FMA) operations on 128-bit and 256-bit operands.[1]: 14-22–14-23 [2]: 613  These operations were extended to 512-bit operands by the AVX-512 extension introduced by Intel and later supported by AMD.

There are two incompatible variants of the FMA instruction set. They have the same operations but differ in the number of operands:[2]: 6, 613–615 

  • FMA4 is the four-operand variant (three source operands and a destination register).[3]: 224  AMD added FMA4 with the Bulldozer (2011) architecture.[4]: 12  Zen 1 (2017) processors still execute FMA4 instructions but do not report them as supported through CPUID, and Zen 2 (2019) removed them.[3]: 235  Intel originally specified FMA4 in 2008, but changed its design to three operands later that year.[3]: 144, 276 
  • FMA3 is the three-operand variant (three source operands, one of which is also the destination).[3]: 224  AMD added FMA3 with the Piledriver (2012) architecture, for compatibility with Intel's planned Haswell processors.[3]: 224 [5] Intel added FMA3, alongside AVX2, with Haswell (2013) processors.[3]: 140 [1]: 5–3  Earlier processors, including AMD's Bulldozer and Intel's Sandy Bridge and Ivy Bridge, do not support it.[1]: 5–3 [3]: 140, 224  AVX-512 adds 512-bit forms of the FMA3 instructions.

Operations

An FMA operation has the form d=round⁡(±a⋅b±c), where the operands are floating-point scalars or SIMD vectors. The exact value of ±a⋅b±c is rounded only once to the precision of the destination format (i.e. single or double precision).[1]: 14–23 [2]: 613 [6]: 52 [7]: 4  In the IEEE 754-2008 standard for floating-point arithmetic, the operation is called fusedMultiplyAdd and conforming implementations must provide it.[7]: 4, 21  The result is usually more accurate than that of separate multiply and add instructions.[8][6]: 52 

FMA3 and FMA4 have the same six operations. The operations differ only in the signs of the product and of c.

FMA operations (each result is rounded once)[2]: 613–672 [9]: 5-207–5-331 
MnemonicAMD nameIntel nameOperation
VFMADD Multiply and AddFused Multiply-Addd=a⋅b+c
VFMSUB Multiply and SubtractFused Multiply-Subtractd=a⋅b−c
VFNMADD Negative Multiply and AddFused Negative Multiply-Addd=−(a⋅b)+c
VFNMSUB Negative Multiply and SubtractFused Negative Multiply-Subtractd=−(a⋅b)−c
VFMADDSUB Multiply with Alternating Add/SubtractFused Multiply-Alternating Add/Subtract
  • di=ai⋅bi−ci for even i
  • di=ai⋅bi+ci for odd i
VFMSUBADD Multiply with Alternating Subtract/AddFused Multiply-Alternating Subtract/Add
  • di=ai⋅bi+ci for even i
  • di=ai⋅bi−ci for odd i

The two alternating operations exist only for vectors. Vector elements are numbered from 0.

Compatibility

Although FMA3 and FMA4 have the same operations, their instructions differ in operands and encoding. Their instructions have different opcodes in different opcode maps. An instruction of one variant is an invalid opcode on a processor that supports only the other. Each variant has its own CPUID feature flag: FMA for FMA3 and FMA4 for FMA4.[2]: 613–617 

Their operands differ as follows:

  • FMA4 instructions have a destination and three sources. Their operands a, b, c, and d can be four different registers. Either of the last two sources can be in memory.[2]: 6, 613  The fourth register is encoded in an extra byte. Each FMA4 instruction is one byte longer than the matching FMA3 instruction.[2]: 6, 617 
  • FMA3 instructions have three operands. The result is written over the first operand. The destination d is therefore the same register as a, b, or c. Only the third operand can be in memory. Each FMA3 operation has three operand orders numbered 132, 213, and 231. The orders differ in whether the overwritten register and the memory operand are factors or the summand.[2]: 613  The input to be overwritten must first be copied to another register if all three inputs are still needed afterwards. The examples below contain such copies.[3]: 144 

The split between FMA3 and FMA4 followed changes of plan by Intel and AMD.[10] AMD Fellow Dave Christie wrote in May 2009 that AMD could not adopt Intel's December 2008 change of FMA from four to three operands without unacceptable risk to its product schedules. AMD therefore kept the four-operand form from Intel's earlier specification.[11] Josh Walrath of PC Perspective wrote in 2009 that it was "unfortunate that AMD and Intel cannot work together a bit better on these things".[12] Agner Fog wrote in 2009 that Intel, AMD, and VIA "are assigning different codes to identical or equivalent instructions because each keep their innovations secret for as long as possible".[13] In 2011, he listed FMA3 and FMA4 among several pairs of AMD and Intel instructions with incompatible encodings. He wrote that Intel had given its own VEX encodings to instructions that AMD had first defined in the XOP encoding.[10]

Naming

Intel and AMD define the same FMA3 mnemonics in their instruction-set manuals.[9]: 5-207–5-331 [2]: 613–672  The FMA4 mnemonics are defined only in AMD's manual.[2]: 613–672  Each FMA mnemonic consists of a stem from the table above and a postfix for the data format:[1]: 14-21–14-22 [2]: 613–672 

  • PS: packed single precision
  • PD: packed double precision
  • SS: scalar single precision
  • SD: scalar double precision

In a packed instruction, the operation is applied to every element of a vector. In a scalar instruction, it is applied only to the lowest element.[1]: 14–22  An FMA4 mnemonic is the stem followed directly by the postfix, as in VFMADDPS. In an FMA3 mnemonic, the operand order 132, 213, or 231 comes between the stem and the postfix, as in VFMADD213PS.[2]: 613–672 

Rounding

Further information: Multiply–accumulate operation § Fused multiply–add

The exact intermediate value of an FMA instruction exists only inside the processor and cannot be examined by software.[1]: 14–23 [14] FMA results are rounded in the rounding mode set in the processor's MXCSR control and status register.[2]: 613 [a] For AVX-512 instructions, a rounding mode can instead be encoded in the 512-bit and scalar forms whose operands are all registers.[9]: 5–222 [1]: 15–12  Under IEEE 754-2008, overflow, underflow, and inexact exceptions in a fused multiply–add can arise only from the addition and not from the multiplication.[7]: 21 

With separate multiply and add instructions, the product is rounded before the addition. The result is then rounded twice: round⁡(round⁡(a⋅b)+c).[8] On x86 processors without FMA3 or FMA4, a result rounded only once is still available from the C fma function.[15]: 258  Intel describes its own implementation as having some cost in speed.[16]: 16 

Contraction by compilers

Under the C11 standard, an expression such as a * b + c may be contracted into a single fused operation. Whether contraction is on by default is left to each compiler's developers.[15]: 77, 235  When compiling for a processor with FMA instructions:

  • In GCC, contraction is on by default except for C compiled in a standard-conforming mode such as -std=c11.[17]
  • In Clang, contraction within a single expression has been on by default since version 14.[18][19]
  • In Visual C++, contraction has been off by default since Visual Studio 2022.[14]
  • In Intel's compilers, contraction is on by default at optimization level -O1 and above.[16]: 16 

Each compiler has an option to change the default. In the examples below, a * b + c is compiled into one FMA instruction.

Results of the same program can therefore differ between builds for processors with and without FMA.[16]: 16  Without FMA, the expression p⋅q+r⋅s with r=p and s=−q is zero. With FMA, either product may be the unrounded one. The two possible results can differ from zero and from each other.[16]: 17 

Intel recommends disabling FMA instructions for the best reproducibility between processors with and without FMA.[16]: 22  Even on systems that conform to IEEE 754-2008, a program may give different results if optimizations that change results (e.g. contraction) are not avoided.[7]: 50–52 

Examples

The following C function computes a⋅b+c on four single-precision values at once, using the vector extension of GCC and Clang:

typedef float float4 __attribute__((vector_size(16)));

float4 madd(float4 a, float4 b, float4 c)
{
    return a * b + c;
}

The listings below are Clang 21's output with optimization (-O2) for FMA3 (-mfma) and for FMA4 (-mfma4), with assembler directives and Clang's comments removed. They are in Intel syntax, where the destination is the first operand.[2]: 616  Under the System V AMD64 calling convention, the vector arguments a, b, and c are passed in registers XMM0, XMM1, and XMM2, with a vector result returned in XMM0.

Compiler output for madd
FMA3 (-mfma)[20]FMA4 (-mfma4)[21]
madd:
    vfmadd213ps xmm0, xmm1, xmm2
    ret
madd:
    vfmaddps xmm0, xmm0, xmm1, xmm2
    ret

In the FMA3 listing, VFMADD213PS writes the result over its first operand, a. In the FMA4 listing, VFMADDPS has a separate destination operand. It writes to XMM0 only because XMM0 is the return register, and could write to any other register without changing a.[2]: 616 

The next function uses all six FMA operations. The array r is passed as a pointer in register RDI. In the listings, each FMA instruction is commented with the element of r that it computes.

typedef float float4 __attribute__((vector_size(16)));

void fma_all_ops(float4 a, float4 b, float4 c, float4 r[6])
{
    r[0] = a * b + c;
    r[1] = a * b - c;
    r[2] = c - a * b;
    r[3] = -(a * b) - c;
    /* subtract in even elements, add in odd */
    r[4] = __builtin_shufflevector(a * c - b, a * c + b,
                                   0, 5, 2, 7);
    /* add in even elements, subtract in odd */
    r[5] = __builtin_shufflevector(b * c + a, b * c - a,
                                   0, 5, 2, 7);
}

Every element of r depends on all three inputs, so a, b, and c must stay intact until the last operation.

Compiler output for fma_all_ops
FMA3 (-mfma)[22]FMA4 (-mfma4)[23]
fma_all_ops:
    vmovaps xmm3, xmm1
    vfmadd213ps xmm3, xmm0, xmm2       ; r[0]
    vmovaps xmmword ptr [rdi], xmm3
    vmovaps xmm3, xmm1
    vfmsub213ps xmm3, xmm0, xmm2       ; r[1]
    vmovaps xmmword ptr [rdi + 16], xmm3
    vmovaps xmm3, xmm1
    vfnmadd213ps xmm3, xmm0, xmm2      ; r[2]
    vmovaps xmmword ptr [rdi + 32], xmm3
    vmovaps xmm3, xmm1
    vfnmsub213ps xmm3, xmm0, xmm2      ; r[3]
    vmovaps xmmword ptr [rdi + 48], xmm3
    vmovaps xmm3, xmm2
    vfmaddsub213ps xmm3, xmm0, xmm1    ; r[4]
    vmovaps xmmword ptr [rdi + 64], xmm3
    vfmsubadd213ps xmm2, xmm1, xmm0    ; r[5]
    vmovaps xmmword ptr [rdi + 80], xmm2
    ret
fma_all_ops:
    vfmaddps xmm3, xmm0, xmm1, xmm2    ; r[0]
    vmovaps xmmword ptr [rdi], xmm3
    vfmsubps xmm3, xmm0, xmm1, xmm2    ; r[1]
    vmovaps xmmword ptr [rdi + 16], xmm3
    vfnmaddps xmm3, xmm0, xmm1, xmm2   ; r[2]
    vmovaps xmmword ptr [rdi + 32], xmm3
    vfnmsubps xmm3, xmm0, xmm1, xmm2   ; r[3]
    vmovaps xmmword ptr [rdi + 48], xmm3
    vfmaddsubps xmm3, xmm0, xmm2, xmm1 ; r[4]
    vmovaps xmmword ptr [rdi + 64], xmm3
    vfmsubaddps xmm0, xmm1, xmm2, xmm0 ; r[5]
    vmovaps xmmword ptr [rdi + 80], xmm0
    ret

Each FMA3 instruction except the last is therefore preceded by a VMOVAPS that copies an input into XMM3, and the FMA instruction then overwrites the copy.[3]: 144  The last FMA3 instruction overwrites c directly, since c is not needed afterwards. In the FMA4 listing, each FMA4 instruction except the last writes its result to XMM3, which is not one of the input registers, and the last overwrites a, which is no longer needed. Nothing is copied, so the only VMOVAPS instructions are the stores to r.

FMA3 instruction set

CPUs with FMA3

  • AMD
    • Piledriver (2012) and newer microarchitectures[24]
      • 2nd gen APUs, "Trinity" (32nm), May 15, 2012
      • 2nd gen "Bulldozer" (bdver2) with Piledriver cores, October 23, 2012
  • Intel
    • Haswell (2013) and newer processors, except Pentiums and Celerons[25][26] and low-power processors based on Goldmont and Tremont, such as Jasper Lake (2021), which lack AVX and support extensions only up to SSE4.2[3]: 9, 188 

Excerpt from FMA3

Supported commands include

MnemonicOperationMnemonicOperation
VFMADDresult = + a · b + cVFMADDSUBresult = a · b + c for i = 1, 3, ...
result = a · b − c for i = 0, 2, ...
VFNMADDresult = − a · b + c
VFMSUBresult = + a · b − cVFMSUBADDresult = a · b − c for i = 1, 3, ...
result = a · b + c for i = 0, 2, ...
VFNMSUBresult = − a · b − c
Note
  • VFNMADD is result = − a · b + c, not result = − (a · b + c).
  • VFNMSUB generates a −0 when all inputs are zero.

Explicit order of operands is included in the mnemonic using numbers "132", "213", and "231":

Postfix
1
Operationpossible
memory operand
overwrites
132a = a · c + bc (factor)a (other factor)
213a = b · a + cc (summand)a (factor)
231a = b · c + ac (factor)a (summand)

as well as operand format (packed or scalar) and size (single or double).

Postfix
2
precisionsizePostfix
2
precisionsize
SSSingle0× 32 bitSDDouble0× 64 bit
PSx4× 32 bitPDx2× 64 bit
PSy8× 32 bitPDy4× 64 bit

This results in

Encoding Mnemonic Operands Operation
VEX.256.66.0F38.W1 98 /r VFMADD132PDy ymm, ymm, ymm/m256 a = a · c + b
VEX.256.66.0F38.W0 98 /r VFMADD132PSy
VEX.128.66.0F38.W1 98 /r VFMADD132PDx xmm, xmm, xmm/m128
VEX.128.66.0F38.W0 98 /r VFMADD132PSx
VEX.LIG.66.0F38.W1 99 /r VFMADD132SD xmm, xmm, xmm/m64
VEX.LIG.66.0F38.W0 99 /r VFMADD132SS xmm, xmm, xmm/m32
VEX.256.66.0F38.W1 A8 /r VFMADD213PDy ymm, ymm, ymm/m256 a = b · a + c
VEX.256.66.0F38.W0 A8 /r VFMADD213PSy
VEX.128.66.0F38.W1 A8 /r VFMADD213PDx xmm, xmm, xmm/m128
VEX.128.66.0F38.W0 A8 /r VFMADD213PSx
VEX.LIG.66.0F38.W1 A9 /r VFMADD213SD xmm, xmm, xmm/m64
VEX.LIG.66.0F38.W0 A9 /r VFMADD213SS xmm, xmm, xmm/m32
VEX.256.66.0F38.W1 B8 /r VFMADD231PDy ymm, ymm, ymm/m256 a = b · c + a
VEX.256.66.0F38.W0 B8 /r VFMADD231PSy
VEX.128.66.0F38.W1 B8 /r VFMADD231PDx xmm, xmm, xmm/m128
VEX.128.66.0F38.W0 B8 /r VFMADD231PSx
VEX.LIG.66.0F38.W1 B9 /r VFMADD231SD xmm, xmm, xmm/m64
VEX.LIG.66.0F38.W0 B9 /r VFMADD231SS xmm, xmm, xmm/m32

AVX-512

AVX-512 adds 512-bit forms of the FMA3 instructions using a new instruction encoding, the EVEX prefix.[9]: 5–220  The EVEX forms keep the FMA3 mnemonics, operand orders (132, 213, 231), and opcode bytes.[9]: 5–207, 5–220  The VEX-encoded FMA3 forms operate on vectors of up to 256 bits and require the processor to report the FMA feature through the CPUID instruction. The EVEX forms also operate on 512-bit vectors. They require either the AVX10.1 feature or the AVX512F feature, plus AVX512VL for 128-bit and 256-bit vectors.[9]: 5–220, 5–232 

Processors supporting AVX-512 include:

  • Intel
    • Xeon Phi Knights Landing (2016), the first processors to support AVX-512[3]: 193 
  • AMD
    • Zen 4 (2022), AMD's first AVX-512 processor,[3]: 248  which executes 512-bit floating-point instructions, including fused multiply–add, by "double pumping" 256-bit datapaths[27]: 2 [28]
    • Zen 5 (2024), AMD's first core with full 512-bit floating-point datapaths and two FMA units, which executes 512-bit fused multiply–add at full width[27]: 2, 9 [29]

The EVEX forms add:

  • masking of the destination by an opmask register, with unselected elements either left unchanged or set to zero[9]: 5-221–5-222 [1]: 15-1–15-2 
  • broadcast of one 32-bit or 64-bit value from memory to every element of a source vector[9]: 5–221 [1]: 15–11 
  • a rounding mode set by the instruction itself, for 512-bit and scalar forms with register operands[9]: 5–222, 5-232–5-233 [1]: 15–2, 15–12 

The 512-bit forms add a third packed size to postfix 2:

512-bit postfixes[9]: 5–207, 5–220 
Postfix
2
PrecisionSizePostfix
2
PrecisionSize
PSzSingle16× 32 bitPDzDouble8× 64 bit
FMA3 encodings and their requirements[9]: 5–220, 5-232–5-233 
EncodingOperand sizesMaskingBroadcastRounding modeFeature flag
VEX128-bit and 256-bit packed, 32-bit and 64-bit scalarNoNoNoFMA
EVEX.128, EVEX.256128-bit and 256-bit packedYesYesNoAVX512F and AVX512VL, or AVX10.1
EVEX.512512-bit packedYesYesYesAVX512F, or AVX10.1
EVEX scalar32-bit and 64-bit scalarYesNoYesAVX512F, or AVX10.1

In the rounding mode column, "Yes" means the instruction can set its own rounding mode. Otherwise the rounding mode set in the processor's MXCSR register applies.[2]: 613 [1]: 15–12 

For example:[9]: 5–220 

EncodingMnemonicOperandsOperation
EVEX.512.66.0F38.W0 98 /r VFMADD132PSz zmm {k}{z}, zmm, zmm/m512/m32bcst{er} a = a · c + b

In the operands, {k} is the opmask register, {z} means unselected elements are set to zero, m32bcst is a 32-bit value broadcast from memory, and {er} means the instruction can set its own rounding mode.[9]: 5-220–5-222 

FMA4 instruction set

CPUs with FMA4

  • AMD
    • "Heavy Equipment" processors
      • Bulldozer-based processors, October 12, 2011[30]
      • Piledriver-based processors[31]
      • Steamroller-based processors
      • Excavator-based processors (including "v2")
    • Zen: WikiChip's testing shows FMA4 still appears to work (under the conditions of the tests) despite not being officially supported and not even reported by CPUID. This has also been confirmed by Agner Fog.[32] But other tests gave wrong results.[33] AMD Official Web Site FMA4 Support Note ZEN CPUs = AMD ThreadRipper 1900x, R7 Pro 1800, 1700, R5 Pro 1600, 1500, R3 Pro 1300, 1200, R3 2200G, R5 2400G.[34][35][36]
  • Intel
    • Intel has not released CPUs with support for FMA4.

Excerpt from FMA4

Mnemonic Operands (Intel syntax) Operation
VFMADDPD xmm, xmm, xmm/m128, xmm/m128 a = b·c + d
VFMADDPD ymm, ymm, ymm/m256, ymm/m256
VFMADDPS xmm, xmm, xmm/m128, xmm/m128
VFMADDPS ymm, ymm, ymm/m256, ymm/m256
VFMADDSD xmm, xmm, xmm/m64, xmm/m64
VFMADDSS xmm, xmm, xmm/m32, xmm/m32

History

The incompatibility between Intel's FMA3 and AMD's FMA4 is due to both companies changing plans without coordinating coding details with each other. AMD changed their plans from FMA3 to FMA4 while Intel changed their plans from FMA4 to FMA3 almost at the same time. The history can be summarized as follows:

  • August 2007: AMD announces the SSE5 instruction set, which includes 3-operand FMA instructions. A new coding scheme (DREX) is introduced for allowing instructions to have three operands.[37]
  • April 2008: Intel announces their AVX and FMA instruction sets, including 4-operand FMA instructions. The coding of these instructions uses the new VEX coding scheme,[38] which is more flexible than AMD's DREX scheme.
  • December 2008: Intel changes the specification for their FMA instructions from 4-operand to 3-operand instructions. The VEX coding scheme is still used.[39]
  • May 2009: AMD changes the specification of their FMA instructions from the 3-operand DREX form to the 4-operand VEX form, compatible with the April 2008 Intel specification rather than the December 2008 Intel specification.[11]
  • October 2011: AMD Bulldozer processor supports FMA4.[31]
  • January 2012: AMD announces FMA3 support in future processors codenamed Trinity and Vishera; they are based on the Piledriver architecture.[40]
  • May 2012: AMD Piledriver processor supports both FMA3 and FMA4.[31]
  • June 2013: Intel Haswell processor supports FMA3.[41]
  • June 2016: Intel Xeon Phi Knights Landing processors are the first to support AVX-512,[3]: 193  which adds fused multiply–add on 512-bit vectors.[9]: 5–220 
  • February 2017: The first generation of AMD Ryzen processors officially supports FMA3, but not FMA4 according to the CPUID instruction.[42] There has been confusion regarding whether FMA4 was implemented or not on this processor due to errata in the initial patch to the GNU Binutils package that has since been rectified.[43][44] One unconfirmed report of wrong results[33] led to some doubt, but Mysticial (Alexander Yee, developer of y-cruncher) debunked it:[45] FMA4 worked for bit-exact bignum calculations on his Zen 1 system for years, and the one report on Reddit never had any followup investigation to rule out mistakes in the testing software before being widely repeated. The initial Ryzen CPUs could be crashed by a particular sequence of FMA3 instructions, but updated CPU microcode fixes the problem.[46]
  • July 2019: AMD Zen 2 and later Ryzen processors do not support FMA4 at all.[45][3]: 235  They continue to support FMA3. Only Zen 1 and Zen+ have unofficial FMA4 support.[3]: 235 [45]
  • September 2022: Zen 4 processors are AMD's first to support AVX-512,[3]: 248  executing its 512-bit fused multiply–add and other floating-point instructions on 256-bit datapaths.[27]: 2 [28]
  • August 2024: Zen 5 is AMD's first core with full 512-bit floating-point datapaths, executing 512-bit fused multiply–add at full width.[27]: 2, 9 [29]

Compiler and assembler support

Different compilers provide different levels of support for FMA:

  • GCC supports FMA4 with -mfma4 since version 4.5.0,[47] FMA3 with -mfma since version 4.7.0[48] and the AVX-512 forms of FMA3 with -mavx512f since version 4.9.0.[49]
  • Microsoft Visual C++ 2010 SP1 supports FMA4 instructions.[50]
  • Microsoft Visual C++ 2012 supports FMA3 instructions (if the processor also supports AVX2 instruction set extension).
  • Microsoft Visual C++ since VC 2013
  • PathScale supports FMA4 with -mfma.[51]
  • LLVM 3.1 adds FMA4 support.[52] LLVM 3.2 adds FMA3 code generation and intrinsics.[53][54]
  • Open64 5.0 adds "limited support".
  • Intel compilers generate FMA3 instructions when compiling for processors with AVX2 or later.[55] They do not support FMA4.
  • NASM supports FMA3 instructions since version 2.03 and FMA4 instructions since 2.06.
  • FASM supports both FMA3 and FMA4 instructions.

Notes

  1. ↑ The rounding mode is set in the rounding control field of MXCSR (bits 13 and 14).[1]: 10–4  The four rounding modes are round to nearest even (the default), round down, round up, and round toward zero.[1]: 4–18 

References

  1. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1: Basic Architecture (PDF). Intel. June 2024. 253665-084US. Archived (PDF) from the original on September 3, 2026. Retrieved October 13, 2026.
  2. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 AMD64 Architecture Programmer's Manual, Volume 4: 128-Bit and 256-Bit Media Instructions (PDF). Rev. 3.22. Advanced Micro Devices. May 2018. 26568. Archived from the original (PDF) on June 16, 2018. Retrieved October 13, 2026.
  3. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Fog, Agner (May 23, 2026). "The microarchitecture of Intel, AMD and VIA CPUs: An optimization guide for assembly programmers and compiler makers" (PDF). Archived (PDF) from the original on May 27, 2026. Retrieved October 13, 2026.
  4. ↑ White, Sean (August 19, 2011). High-Performance Power-Efficient x86-64 Server and Desktop Processors Using the Core Codenamed "Bulldozer" (PDF). Hot Chips 23. Archived (PDF) from the original on June 2, 2025. Retrieved October 13, 2026.
  5. ↑ Gallagher, Sean (May 15, 2012). "AMD ships Trinity processor, aims for a piece of Intel's ultrabook market". Ars Technica. Archived from the original on November 8, 2012. Retrieved October 13, 2026.
  6. 1 2 Boldo, Sylvie; Muller, Jean-Michel (June 2005). "Some Functions Computable with a Fused-mac". Proceedings of the 17th IEEE Symposium on Computer Arithmetic. 17th IEEE Symposium on Computer Arithmetic (ARITH'05). Cape Cod, Massachusetts: IEEE Computer Society. pp. 52–58. doi:10.1109/ARITH.2005.39. ISBN 0-7695-2366-8. Archived from the original on November 27, 2025. Retrieved October 14, 2026.
  7. 1 2 3 4 IEEE Standard for Floating-Point Arithmetic. IEEE. August 29, 2008. doi:10.1109/IEEESTD.2008.4610935. ISBN 978-0-7381-5752-8. IEEE Std 754-2008.
  8. 1 2 Whitehead, Nathan; Fit-Florea, Alex. "Floating Point and IEEE 754 Compliance for NVIDIA GPUs". Nvidia. §2.3. Archived from the original on October 13, 2026. Retrieved October 13, 2026.
  9. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2C: Instruction Set Reference, V (PDF). Intel. September 2026. 326018-093US. Archived (PDF) from the original on October 14, 2026. Retrieved October 13, 2026.
  10. 1 2 Fog, Agner (August 28, 2011). "Stop the instruction set war". Agner's CPU blog (Reply). Archived from the original on April 2, 2025. Retrieved October 14, 2026.
  11. 1 2 Christie, Dave (May 6, 2009). "Striking a Balance". AMD Developer Central. AMD. Archived from the original on September 9, 2010. Retrieved October 14, 2026.
  12. ↑ Walrath, Josh (May 7, 2009). "AMD Embraces AVX (Sorta)". PC Perspective. Archived from the original on August 24, 2019. Retrieved October 14, 2026.
  13. ↑ Fog, Agner (December 5, 2009). "Stop the instruction set war". Agner's CPU blog. Archived from the original on April 2, 2025. Retrieved October 14, 2026.
  14. 1 2 "/fp (Specify floating-point behavior)". Microsoft Learn. Microsoft. Archived from the original on September 27, 2026. Retrieved October 14, 2026.
  15. 1 2 ISO/IEC JTC1/SC22/WG14 (April 12, 2011). "N1570: Committee Draft of ISO/IEC 9899:201x" (PDF). Archived (PDF) from the original on September 25, 2026. Retrieved October 14, 2026.
  16. 1 2 3 4 5 Corden, Martyn J.; Kreitzer, David (2018). "Consistency of Floating-Point Results using the Intel Compiler, or Why doesn't my application always give the same answer?" (PDF). Intel. Archived (PDF) from the original on November 10, 2024. Retrieved October 14, 2026.
  17. ↑ "Options That Control Optimization". Using the GNU Compiler Collection (GCC). 15.2.0. Free Software Foundation. Archived from the original on April 23, 2026. Retrieved October 14, 2026.
  18. ↑ "Clang 14.0.0 Release Notes". LLVM Project. Archived from the original on October 3, 2026. Retrieved October 14, 2026.
  19. ↑ "Clang Compiler User's Manual". LLVM Project. -ffp-contract. Archived from the original on September 25, 2026. Retrieved October 14, 2026.
  20. ↑ "madd compiled with x86-64 clang 21.1.0 (-O2 -mfma -masm=intel)". Compiler Explorer. Retrieved October 14, 2026.
  21. ↑ "madd compiled with x86-64 clang 21.1.0 (-O2 -mfma4 -masm=intel)". Compiler Explorer. Retrieved October 14, 2026.
  22. ↑ "fma_all_ops compiled with x86-64 clang 21.1.0 (-O2 -mfma -masm=intel)". Compiler Explorer. Retrieved October 14, 2026.
  23. ↑ "fma_all_ops compiled with x86-64 clang 21.1.0 (-O2 -mfma4 -masm=intel)". Compiler Explorer. Retrieved October 14, 2026.
  24. ↑ Maffeo, Robin (March 1, 2012). "AMD and the Visual Studio 11 Beta". AMD. Archived from the original on August 10, 2016. Retrieved 2018-11-07.
  25. ↑ "CPU-Z - ID : y5z6gq". Archived from the original on 2022-12-07. Retrieved 2022-05-01.
  26. ↑ "CPU-Z - ID : kr2mlx". Archived from the original on 2022-12-06. Retrieved 2022-05-01.
  27. 1 2 3 4 Cohen, Brad; Subramony, Mahesh; Clark, Mike (August 2024). Next Generation "Zen 5" Core (PDF). Hot Chips 2024. Archived (PDF) from the original on September 24, 2026. Retrieved October 13, 2026.
  28. 1 2 Larabel, Michael (September 26, 2022). "AMD Zen 4 AVX-512 Performance Analysis On The Ryzen 9 7950X Review". Phoronix. Archived from the original on October 22, 2022. Retrieved October 13, 2026.
  29. 1 2 Lam, Chester (March 1, 2025). "Zen 5's AVX-512 Frequency Behavior". Chips and Cheese. Archived from the original on August 31, 2026. Retrieved October 13, 2026.
  30. ↑ "AMD64 Architecture Programmer's Manual Volume 6: 128-Bit and 256-Bit XOP, FMA4 and CVT16 Instructions" (PDF). AMD. May 1, 2009. Archived from the original (PDF) on August 21, 2018. Retrieved October 24, 2014.
  31. 1 2 3 "New Bulldozer and Piledriver Instructions" (PDF). AMD. Archived from the original (PDF) on 7 January 2013. Retrieved 25 July 2013.
  32. ↑ "Agner's CPU blog - Test results for AMD Ryzen". 2017-05-02. Archived from the original on 2022-04-18. Retrieved 2022-03-14.
  33. 1 2 "Discussion – Ryzen has undocumented support for FMA4". Archived from the original on 2020-07-29. Retrieved 2017-05-10.
  34. ↑ "www.amd.com, FMA4 support model list". Archived from the original on 2018-02-09. Retrieved 2018-02-09.
  35. ↑ "www.amd.com, FMA4 support model list". Archived from the original on 2018-02-08. Retrieved 2018-02-09.
  36. ↑ "www.amd.com, FMA4 support model list". Archived from the original on 2018-01-25. Retrieved 2018-02-09.
  37. ↑ "128-Bit SSE5 Instruction Set". AMD Developer Central. Archived from the original on 2008-01-15. Retrieved 2008-01-28.
  38. ↑ "Intel Advanced Vector Extensions Programming Reference". Intel. Archived from the original (PDF) on 2011-08-07. Retrieved 2008-04-05.
  39. ↑ "Intel Advanced Vector Extensions Programming Reference". Intel. Archived from the original on 2009-03-12. Retrieved 2009-05-06.
  40. ↑ "Software Optimization Guide for AMD Family 15h Processors" (PDF). AMD. Archived from the original (PDF) on 11 May 2012. Retrieved 19 April 2012.
  41. ↑ "Intel Architecture Instruction Set Extensions Programming Reference" (PDF). Intel. Archived from the original (PDF) on 29 September 2013. Retrieved 25 July 2013.
  42. ↑ Fog, Agner. "The microarchitecture of Intel, AMD and VIA CPUs An optimization guide for assembly programmers and compiler makers" (PDF). Archived (PDF) from the original on 2017-03-28. Retrieved 2017-05-02.
  43. ↑ Gopalasubramanian, Ganesh (2015-03-10). "[PATCH] add znver1 processor". Archived from the original on 2016-03-04. Retrieved 2022-05-01.
  44. ↑ Pawar, Amit (2015-08-07). "[PATCH] Remove CpuFMA4 from Znver1 CPU Flags". Archived from the original on 2016-03-07. Retrieved 2022-05-01.
  45. 1 2 3 "Stack Overflow comment by Mysticial". 2019-07-16. Archived from the original on 2019-08-22. Retrieved 2023-09-01.
  46. ↑ "AMD Ryzen Machine Crashes to a Sequence of FMA3 Instructions". 16 March 2017. Archived from the original on 2017-09-10. Retrieved 2017-09-10.
  47. ↑ "GCC 4.5 Release Series: Changes, New Features, and Fixes". GCC. Free Software Foundation. Archived from the original on July 15, 2026. Retrieved October 14, 2026.
  48. ↑ "GCC 4.7 Release Series: Changes, New Features, and Fixes". GCC. Free Software Foundation. Archived from the original on August 22, 2026. Retrieved October 14, 2026.
  49. ↑ "GCC 4.9 Release Series: Changes, New Features, and Fixes". GCC. Free Software Foundation. Archived from the original on September 18, 2026. Retrieved October 14, 2026.
  50. ↑ "FMA4 Intrinsics Added for Visual Studio 2010 SP1". February 4, 2013. Archived from the original on October 13, 2026. Retrieved October 13, 2026.
  51. ↑ "EKOPath man doc". Archived from the original on 2016-06-23. Retrieved 2013-07-24.
  52. ↑ "LLVM 3.1 Release Notes". Archived from the original on 2014-10-01. Retrieved 2014-11-24.
  53. ↑ Demikhovsky, Elena (May 31, 2012). "Added FMA3 Intel instructions". GitHub. LLVM Project. Retrieved October 14, 2026.
  54. ↑ Topper, Craig (June 4, 2012). "Add fma3 intrinsic header file". GitHub. LLVM Project. Retrieved October 14, 2026.
  55. ↑ "fma, Qfma". Intel Fortran Compiler Classic and Intel Fortran Compiler Developer Guide and Reference. 2023.0. Intel. Archived from the original on May 20, 2026. Retrieved October 14, 2026.
Retrieved from "https://en.wikipedia.org/w/index.php?title=FMA_instruction_set&oldid=1380345333"
Categories:
  • X86 instructions
  • SIMD computing
  • AMD technologies
  • Instruction set extensions
Hidden categories:
  • Articles with short description
  • Short description is different from Wikidata
  • All articles lacking reliable references
  • Articles lacking reliable references from October 2026
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.