aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>2010-10-15 17:42:05 +0000
committerMichael Meissner <meissner@gcc.gnu.org>2010-10-15 17:42:05 +0000
commit1b1562a55947daed482e2d8ef47a4f577397beb9 (patch)
tree5a6ace72e7cb1c4c33366822e3836c93b74e3f78 /gcc/doc
parente74bf53a08b08e94ef88b0e1b0401e393efb1dac (diff)
downloadgcc-1b1562a55947daed482e2d8ef47a4f577397beb9.zip
gcc-1b1562a55947daed482e2d8ef47a4f577397beb9.tar.gz
gcc-1b1562a55947daed482e2d8ef47a4f577397beb9.tar.bz2
Add fma support
From-SVN: r165515
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/cpp.texi9
-rw-r--r--gcc/doc/md.texi10
-rw-r--r--gcc/doc/rtl.texi9
3 files changed, 27 insertions, 1 deletions
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi
index 7276b61..a580e61 100644
--- a/gcc/doc/cpp.texi
+++ b/gcc/doc/cpp.texi
@@ -2345,6 +2345,15 @@ and swap operations on operands 1, 2, 4, 8 or 16 bytes in length, respectively.
This macro is defined when the compiler is emitting Dwarf2 CFI directives
to the assembler. When this is defined, it is possible to emit those same
directives in inline assembly.
+
+@item __FP_FAST_FMA
+@itemx __FP_FAST_FMAF
+@itemx __FP_FAST_FMAL
+These macros are defined with value 1 if the backend supports the
+@code{fma}, @code{fmaf}, and @code{fmal} builtin functions, so that
+the include file @file{math.h} can define the macros
+@code{FP_FAST_FMA}, @code{FP_FAST_FMAF}, and @code{FP_FAST_FMAL}
+for compatibility with the 1999 C standard.
@end table
@node System-specific Predefined Macros
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 1bbdcd0..6de4f36 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -3948,6 +3948,16 @@ means of constraints requiring operands 1 and 0 to be the same location.
@itemx @samp{and@var{m}3}, @samp{ior@var{m}3}, @samp{xor@var{m}3}
Similar, for other arithmetic operations.
+@cindex @code{fma@var{m}4} instruction pattern
+@item @samp{fma@var{m}4}
+Multiply operand 2 and operand 1, then add operand 3, storing the
+result in operand 0. All operands must have mode @var{m}. This
+pattern is used to implement the @code{fma}, @code{fmaf}, and
+@code{fmal} builtin functions from the ISO C99 standard. The
+@code{fma} operation may produce different results than doing the
+multiply followed by the add if the machine does not perform a
+rounding step between the operations.
+
@cindex @code{min@var{m}3} instruction pattern
@cindex @code{max@var{m}3} instruction pattern
@item @samp{smin@var{m}3}, @samp{smax@var{m}3}
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 4c15e8f..6fae670 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -182,7 +182,8 @@ and are lvalues (so they can be used for insertion as well).
@item RTX_TERNARY
An RTX code for other three input operations. Currently only
-@code{IF_THEN_ELSE} and @code{VEC_MERGE}.
+@code{IF_THEN_ELSE}, @code{VEC_MERGE}, @code{SIGN_EXTRACT},
+@code{ZERO_EXTRACT}, and @code{FMA}.
@item RTX_INSN
An RTX code for an entire instruction: @code{INSN}, @code{JUMP_INSN}, and
@@ -2234,6 +2235,12 @@ not be the same.
For unsigned widening multiplication, use the same idiom, but with
@code{zero_extend} instead of @code{sign_extend}.
+@findex fma
+@item (fma:@var{m} @var{x} @var{y} @var{z})
+Represents the @code{fma}, @code{fmaf}, and @code{fmal} builtin
+functions that do a combined multiply of @var{x} and @var{y} and then
+adding to@var{z} without doing an intermediate rounding step.
+
@findex div
@findex ss_div
@cindex division