[PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.
Tamar Christina
Tamar.Christina@arm.com
Fri Nov 25 12:19:00 GMT 2016
Hi Joseph,
I have updated the patch with the changes,
w.r.t to the formatting, there are tabs there that seem to be rendered
at 4 spaces wide. In my editor setup at 8 spaces they are correct.
Kind Regards,
Tamar
________________________________________
From: Joseph Myers <joseph@codesourcery.com>
Sent: Thursday, November 24, 2016 6:28:18 PM
To: Tamar Christina
Cc: GCC Patches; Wilco Dijkstra; rguenther@suse.de; law@redhat.com; Michael Meissner; nd
Subject: Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.
On Thu, 24 Nov 2016, Tamar Christina wrote:
> @@ -11499,6 +11503,53 @@ to classify. GCC treats the last argument as type-generic, which
> means it does not do default promotion from float to double.
> @end deftypefn
>
> +@deftypefn {Built-in Function} int __builtin_isnan (...)
> +This built-in implements the C99 isnan functionality which checks if
> +the given argument represents a NaN. The return value of the
> +function will either be a 0 (false) or a 1 (true).
> +On most systems, when an IEEE 754 floating point is used this
> +built-in does not produce a signal when a signaling NaN is used.
"an IEEE 754 floating point" should probably be "an IEEE 754
floating-point type" or similar.
> +GCC treats the argument as type-generic, which means it does
> +not do default promotion from float to double.
I think type names such as float and double should use @code{} in the
manual.
> +the given argument represents an Infinite number. The return
Infinite should not have a capital letter there.
> +@deftypefn {Built-in Function} int __builtin_iszero (...)
> +This built-in implements the C99 iszero functionality which checks if
This isn't C99, it's TS 18661-1:2014.
> +the given argument represents the number 0. The return
0 or -0.
> +@deftypefn {Built-in Function} int __builtin_issubnormal (...)
> +This built-in implements the C99 issubnormal functionality which checks if
Again, TS 18661-1.
> +the given argument represents a sub-normal number. The return
Do not hyphenate subnormal.
> + switch (DECL_FUNCTION_CODE (decl))
> + {
> + case BUILT_IN_SETJMP:
> + lower_builtin_setjmp (gsi);
> + data->cannot_fallthru = false;
> + return;
The indentation in this whole block of code (not all quoted) is wrong.
> + real_inf(&rinf);
Missing space before '('.
> + emit_tree_cond (&body, dest, done_label,
> + is_normal(&body, arg, loc), fp_normal);
> + emit_tree_cond (&body, dest, done_label,
> + is_zero(&body, arg, loc), fp_zero);
> + emit_tree_cond (&body, dest, done_label,
> + is_nan(&body, arg, loc), fp_nan);
> + emit_tree_cond (&body, dest, done_label,
> + is_infinity(&body, arg, loc), fp_infinite);
Likewise.
> + fndecl(&body, arg, loc), t_true);
Likewise.
--
Joseph S. Myers
joseph@codesourcery.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fp-classify-new2.patch
Type: text/x-patch
Size: 65047 bytes
Desc: fp-classify-new2.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161125/4fc20bc7/attachment.bin>
More information about the Gcc-patches
mailing list