]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
optabs.def: Add new optabs fmax_optab/fmin_optab.
authorDavid Sherwood <david.sherwood@arm.com>
Wed, 25 Nov 2015 17:12:28 +0000 (17:12 +0000)
committerDavid Sherwood <davids@gcc.gnu.org>
Wed, 25 Nov 2015 17:12:28 +0000 (17:12 +0000)
2015-11-25  David Sherwood  <david.sherwood@arm.com>

        * optabs.def: Add new optabs fmax_optab/fmin_optab.
        * internal-fn.def: Add new fmax/fmin internal functions.
        * doc/md.texi: Add fmin and fmax patterns.

From-SVN: r230888

gcc/ChangeLog
gcc/doc/md.texi
gcc/internal-fn.def
gcc/optabs.def

index b00bfb0b6b5868bd6e554f125e523769f4a8c94b..c5687e559d54e8c6539caa001561b10884970547 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-25  David Sherwood  <david.sherwood@arm.com>
+
+       * optabs.def: Add new optabs fmax_optab/fmin_optab.
+       * internal-fn.def: Add new fmax/fmin internal functions.
+       * doc/md.texi: Add fmin and fmax patterns.
+
 2015-11-25  Jason Merrill  <jason@redhat.com>
 
        PR c++/68385
index de1b58a985e301bc7b3048aec744897d9ba0efcc..add8920ff4781e93d35717acddc1b0b06d9694c5 100644 (file)
@@ -4980,6 +4980,15 @@ Signed minimum and maximum operations.  When used with floating point,
 if both operands are zeros, or if either operand is @code{NaN}, then
 it is unspecified which of the two operands is returned as the result.
 
+@cindex @code{fmin@var{m}3} instruction pattern
+@cindex @code{fmax@var{m}3} instruction pattern
+@item @samp{fmin@var{m}3}, @samp{fmax@var{m}3}
+IEEE-conformant minimum and maximum operations.  If one operand is a quiet
+@code{NaN}, then the other operand is returned.  If both operands are quiet
+@code{NaN}, then a quiet @code{NaN} is returned.  In the case when gcc supports
+signalling @code{NaN} (-fsignaling-nans) an invalid floating point exception is
+raised and a quiet @code{NaN} is returned.
+
 @cindex @code{reduc_smin_@var{m}} instruction pattern
 @cindex @code{reduc_smax_@var{m}} instruction pattern
 @item @samp{reduc_smin_@var{m}}, @samp{reduc_smax_@var{m}}
index 825dba11f24ee13c53ba58727451c875ca99a1e3..dee9332c3d60990a0d6176dc9f6e871f9136bae0 100644 (file)
@@ -125,6 +125,8 @@ DEF_INTERNAL_FLT_FN (FMOD, ECF_CONST, fmod, binary)
 DEF_INTERNAL_FLT_FN (POW, ECF_CONST, pow, binary)
 DEF_INTERNAL_FLT_FN (REMAINDER, ECF_CONST, remainder, binary)
 DEF_INTERNAL_FLT_FN (SCALB, ECF_CONST, scalb, binary)
+DEF_INTERNAL_FLT_FN (FMIN, ECF_CONST, fmin, binary)
+DEF_INTERNAL_FLT_FN (FMAX, ECF_CONST, fmax, binary)
 
 /* FP scales.  */
 DEF_INTERNAL_FLT_FN (LDEXP, ECF_CONST, ldexp, binary)
index c141a3ca6fffc031e27318814a0f12405b4c0ec1..20e4225d7332d41d0a32f154444e059ce23d1fb5 100644 (file)
@@ -253,6 +253,10 @@ OPTAB_D (sin_optab, "sin$a2")
 OPTAB_D (sincos_optab, "sincos$a3")
 OPTAB_D (tan_optab, "tan$a2")
 
+/* C99 implementations of fmax/fmin.  */
+OPTAB_D (fmax_optab, "fmax$a3")
+OPTAB_D (fmin_optab, "fmin$a3")
+
 /* Vector reduction to a scalar.  */
 OPTAB_D (reduc_smax_scal_optab, "reduc_smax_scal_$a")
 OPTAB_D (reduc_smin_scal_optab, "reduc_smin_scal_$a")