You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.
Any good, modern ISA should have a fused multiply-accumulate instruction.
We could add four 3-operand instructions:
Name
Operands
Operation
FMA
a, b, c
a ← a + b * c
FMS
a, b, c
a ← a - b * c
FNMA
a, b, c
a ← -a - b * c
FNMS
a, b, c
a ← -a + b * c
Some ISA:s have more flexibility in selecting the output register:
RISC-V has a special four-operand instruction encoding for FMADD, to freely select the output register.
Likewise, early AMD x86 AVX had FMA4 with four operands. That instruction is no longer supported in newer CPU:s though.
The Intel/AMD x86 AVX ISA has FMA3 with three operands, but three variants that effectively allow the selection of which of the three registers to use as an output register.
ARM (VFPv4/NEONv2) has a three-operand FMA.
The text was updated successfully, but these errors were encountered:
mbitsnbites
changed the title
ISA: Add FMA?
Add fused multiply-accumulate (FMA)?
Aug 28, 2020
Any good, modern ISA should have a fused multiply-accumulate instruction.
We could add four 3-operand instructions:
Some ISA:s have more flexibility in selecting the output register:
The text was updated successfully, but these errors were encountered: