<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/glibc.git/soft-fp/extended.h, branch azanella/aarch64-split-stack</title>
<subtitle>sourceware.org: git/glibc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/'/>
<entry>
<title>Update copyright dates with scripts/update-copyrights.</title>
<updated>2018-01-01T00:32:25+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2018-01-01T00:32:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=688903eb3ef01301d239ab753d309d45720610a7'/>
<id>688903eb3ef01301d239ab753d309d45720610a7</id>
<content type='text'>
	* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright dates with scripts/update-copyrights.</title>
<updated>2017-01-01T00:14:16+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2017-01-01T00:14:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=bfff8b1becd7d01c074177df7196ab327cd8c844'/>
<id>bfff8b1becd7d01c074177df7196ab327cd8c844</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix soft-fp extended.h unpacking (GCC bug 77265).</title>
<updated>2016-08-16T17:11:46+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2016-08-16T17:11:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=c20809709ab330f927c87fefe439554d3b1f643a'/>
<id>c20809709ab330f927c87fefe439554d3b1f643a</id>
<content type='text'>
soft-fp unpacking for x86 "extended" fails to clear the implicit
mantissa high bit that is explicit in that format, resulting in
problems for operations that expect this bit to be clear in raw
unpacked values.  Specifically, the code for this format is used only
for conversions to and from TFmode (__float128) in libgcc, where this
issue results in GCC bug 77265, extension of long double infinity to
__float128 wrongly produces a NaN.

This patch fixes this by always masking out the implicit bit on
unpacking, so that the results of unpacking meet the expectations of
the rest of the soft-fp code for a normal IEEE format.

Tested for x86_64 in libgcc in conjunction with a GCC testcase for
this issue (this code isn't used in glibc, only in libgcc).

	* soft-fp/extended.h [_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_E):
	Mask implicit bit out of unpacked value.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_EP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_EP): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
soft-fp unpacking for x86 "extended" fails to clear the implicit
mantissa high bit that is explicit in that format, resulting in
problems for operations that expect this bit to be clear in raw
unpacked values.  Specifically, the code for this format is used only
for conversions to and from TFmode (__float128) in libgcc, where this
issue results in GCC bug 77265, extension of long double infinity to
__float128 wrongly produces a NaN.

This patch fixes this by always masking out the implicit bit on
unpacking, so that the results of unpacking meet the expectations of
the rest of the soft-fp code for a normal IEEE format.

Tested for x86_64 in libgcc in conjunction with a GCC testcase for
this issue (this code isn't used in glibc, only in libgcc).

	* soft-fp/extended.h [_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_E):
	Mask implicit bit out of unpacked value.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_EP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_EP): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright dates with scripts/update-copyrights.</title>
<updated>2016-01-04T16:05:18+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2016-01-04T16:05:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=f7a9f785e547bd599dee496fd906a28bcb4ec7fe'/>
<id>f7a9f785e547bd599dee496fd906a28bcb4ec7fe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>soft-fp: Use multiple-include guards.</title>
<updated>2015-03-10T00:32:29+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2015-03-10T00:32:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=a2f8be9c834cb513666e0ce02ee8f4b4a3f358f8'/>
<id>a2f8be9c834cb513666e0ce02ee8f4b4a3f358f8</id>
<content type='text'>
This patch makes soft-fp headers consistently use multiple-include
guards, something previously done mainly only in the Linux kernel
version.  The guard macros aren't the same as those used in the Linux
kernel, but there seems to be enough variation in such guards in Linux
kernel code that hopefully this version will be acceptable there.

Tested for powerpc-nofpu that installed stripped shared libraries are
unchanged by this patch.

	* soft-fp/double.h [SOFT_FP_DOUBLE_H]: New multiple-include guard.
	* soft-fp/extended.h [SOFT_FP_EXTENDED_H]: Likewise.
	* soft-fp/op-1.h [SOFT_FP_OP_1_H]: Likewise.
	* soft-fp/op-2.h [SOFT_FP_OP_2_H]: Likewise.
	* soft-fp/op-4.h [SOFT_FP_OP_4_H]: Likewise.
	* soft-fp/op-8.h [SOFT_FP_OP_8_H]: Likewise.
	* soft-fp/op-common.h [SOFT_FP_OP_COMMON_H]: Likewise.
	* soft-fp/quad.h [SOFT_FP_QUAD_H]: Likewise.
	* soft-fp/single.h [SOFT_FP_SINGLE_H]: Likewise.
	* soft-fp/soft-fp.h (SOFT_FP_H): Define to 1 rather than empty.
	Add comment on closing #endif.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch makes soft-fp headers consistently use multiple-include
guards, something previously done mainly only in the Linux kernel
version.  The guard macros aren't the same as those used in the Linux
kernel, but there seems to be enough variation in such guards in Linux
kernel code that hopefully this version will be acceptable there.

Tested for powerpc-nofpu that installed stripped shared libraries are
unchanged by this patch.

	* soft-fp/double.h [SOFT_FP_DOUBLE_H]: New multiple-include guard.
	* soft-fp/extended.h [SOFT_FP_EXTENDED_H]: Likewise.
	* soft-fp/op-1.h [SOFT_FP_OP_1_H]: Likewise.
	* soft-fp/op-2.h [SOFT_FP_OP_2_H]: Likewise.
	* soft-fp/op-4.h [SOFT_FP_OP_4_H]: Likewise.
	* soft-fp/op-8.h [SOFT_FP_OP_8_H]: Likewise.
	* soft-fp/op-common.h [SOFT_FP_OP_COMMON_H]: Likewise.
	* soft-fp/quad.h [SOFT_FP_QUAD_H]: Likewise.
	* soft-fp/single.h [SOFT_FP_SINGLE_H]: Likewise.
	* soft-fp/soft-fp.h (SOFT_FP_H): Define to 1 rather than empty.
	Add comment on closing #endif.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright dates with scripts/update-copyrights.</title>
<updated>2015-01-02T16:29:47+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2015-01-02T16:28:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=b168057aaacf1d149246d0eb3e84332492d35063'/>
<id>b168057aaacf1d149246d0eb3e84332492d35063</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>soft-fp: Add _FP_TO_INT_ROUND.</title>
<updated>2014-11-04T16:34:49+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2014-11-04T16:34:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=2004e7fb76bd6806253436d63ab3bda7e24c9cc1'/>
<id>2004e7fb76bd6806253436d63ab3bda7e24c9cc1</id>
<content type='text'>
Continuing the series of patches adding soft-fp features from the
kernel version of soft-fp to glibc so that glibc's version is able to
replace the old fork of soft-fp in the kernel, this patch adds the
last major such feature: _FP_TO_INT_ROUND, converting a floating-point
number to an integer with rounding according to the current rounding
direction (as opposed to truncating towards zero, which _FP_TO_INT
does).

The general structure of the implementation follows that of
_FP_TO_INT, but of course is more complicated.  As with glibc's
_FP_TO_INT it works with raw input (the kernel versions of these
macros predate the conversion of _FP_TO_INT and many other macros to
raw or semi-raw input).  I have not tried to work out what bugs there
might be in the kernel version that this might fix; it's a
from-scratch implementation based on _FP_TO_INT.

Tested for powerpc (soft-float) that there is no change to the
installed shared libraries; also tested with the libm tests with lrint
/ lrintf / llrint / llrintf made to use _FP_TO_INT_ROUND, to provide
some test of the functionality.  As we don't have benchmarks for those
functions, I haven't actually included the soft-fp versions of them,
although I expect them to be faster than the existing code (given that
the existing code involves adding and subtracting numbers such as
0x1p52 to achieve the desired rounding, which is not particularly
efficient when the underlying floating point is software floating
point).

2014-11-04  Joseph Myers  &lt;joseph@codesourcery.com&gt;

	* soft-fp/op-common.h (_FP_TO_INT_ROUND): New macro.
	* soft-fp/double.h [_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_ROUND_D): New
	macro.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_ROUND_D): Likewise.
	* soft-fp/extended.h [_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_ROUND_E):
	New macro.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_ROUND_E): Likewise.
	* soft-fp/quad.h [_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_ROUND_Q): New
	macro.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_ROUND_Q): Likewise.
	* soft-fp/single.h (FP_TO_INT_ROUND_S): New macro.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Continuing the series of patches adding soft-fp features from the
kernel version of soft-fp to glibc so that glibc's version is able to
replace the old fork of soft-fp in the kernel, this patch adds the
last major such feature: _FP_TO_INT_ROUND, converting a floating-point
number to an integer with rounding according to the current rounding
direction (as opposed to truncating towards zero, which _FP_TO_INT
does).

The general structure of the implementation follows that of
_FP_TO_INT, but of course is more complicated.  As with glibc's
_FP_TO_INT it works with raw input (the kernel versions of these
macros predate the conversion of _FP_TO_INT and many other macros to
raw or semi-raw input).  I have not tried to work out what bugs there
might be in the kernel version that this might fix; it's a
from-scratch implementation based on _FP_TO_INT.

Tested for powerpc (soft-float) that there is no change to the
installed shared libraries; also tested with the libm tests with lrint
/ lrintf / llrint / llrintf made to use _FP_TO_INT_ROUND, to provide
some test of the functionality.  As we don't have benchmarks for those
functions, I haven't actually included the soft-fp versions of them,
although I expect them to be faster than the existing code (given that
the existing code involves adding and subtracting numbers such as
0x1p52 to achieve the desired rounding, which is not particularly
efficient when the underlying floating point is software floating
point).

2014-11-04  Joseph Myers  &lt;joseph@codesourcery.com&gt;

	* soft-fp/op-common.h (_FP_TO_INT_ROUND): New macro.
	* soft-fp/double.h [_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_ROUND_D): New
	macro.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_ROUND_D): Likewise.
	* soft-fp/extended.h [_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_ROUND_E):
	New macro.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_ROUND_E): Likewise.
	* soft-fp/quad.h [_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_ROUND_Q): New
	macro.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_ROUND_Q): Likewise.
	* soft-fp/single.h (FP_TO_INT_ROUND_S): New macro.
</pre>
</div>
</content>
</entry>
<entry>
<title>soft-fp: Use parentheses around macro arguments.</title>
<updated>2014-10-09T17:05:26+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2014-10-09T17:05:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=5c0508a318af0a6c8be2a4cb2e3b76896218bf35'/>
<id>5c0508a318af0a6c8be2a4cb2e3b76896218bf35</id>
<content type='text'>
This patch cleans up the soft-fp code to use parentheses around macro
arguments (where possible; many macro arguments are identifiers used
with ## rather than arbitrary expressions, so cannot be put in
parentheses).  (I'm not aware of any bugs caused by the lack of
parentheses, but this is generally good practice.  The patch is not
exhaustive regarding internal macros where the arguments always come
directly from the mantissa of a floating-point number, although
probably those should be cleaned up in this regard as well.)

Tested for powerpc-nofpu that the installed shared libraries are
unchanged by this patch.

	* soft-fp/double.h [_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_D): Use
	parentheses around macro arguments.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_RAW_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_RAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (_FP_SQRT_MEAT_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_EQ_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_UNORD_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_FROM_INT_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_RAW_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_RAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (_FP_SQRT_MEAT_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_EQ_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_UNORD_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_FROM_INT_D): Likewise.
	* soft-fp/extended.h [_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_E):
	Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_EP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_EP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_EP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_EP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (_FP_SQRT_MEAT_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_EQ_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_UNORD_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_FROM_INT_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_EP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_EP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_EP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_EP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (_FP_SQRT_MEAT_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_EQ_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_UNORD_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_FROM_INT_E): Likewise.
	* soft-fp/op-1.h (_FP_FRAC_SRST_1): Likewise.
	(_FP_FRAC_SRS_1): Likewise.
	(_FP_FRAC_CLZ_1): Likewise.
	(_FP_MUL_MEAT_1_imm): Likewise.
	(_FP_MUL_MEAT_1_wide): Likewise.
	(_FP_MUL_MEAT_1_hard): Likewise.
	(_FP_SQRT_MEAT_1): Likewise.
	(_FP_FRAC_ASSEMBLE_1): Likewise.
	(_FP_FRAC_DISASSEMBLE_1): Likewise.
	* soft-fp/op-2.h (_FP_FRAC_CLZ_2): Likewise.
	(__FP_CLZ_2): Likewise.
	(_FP_MUL_MEAT_2_wide): Likewise.
	(_FP_MUL_MEAT_2_wide_3mul): Likewise.
	(_FP_MUL_MEAT_2_gmp): Likewise.
	(_FP_MUL_MEAT_2_120_240_double): Likewise.
	(_FP_SQRT_MEAT_2): Likewise.
	(_FP_FRAC_ASSEMBLE_2): Likewise.
	(_FP_FRAC_DISASSEMBLE_2): Likewise.
	* soft-fp/op-4.h (_FP_FRAC_SRS_4): Likewise.
	(_FP_FRAC_CLZ_4): Likewise.
	(_FP_MUL_MEAT_4_wide): Likewise.
	(_FP_MUL_MEAT_4_gmp): Likewise.
	(_FP_SQRT_MEAT_4): Likewise.
	(_FP_FRAC_ASSEMBLE_4): Likewise.
	(_FP_FRAC_DISASSEMBLE_4): Likewise.
	* soft-fp/op-common.h (_FP_CMP): Likewise.
	(_FP_CMP_EQ): Likewise.
	(_FP_CMP_UNORD): Likewise.
	(_FP_TO_INT): Likewise.
	(_FP_FROM_INT): Likewise.
	[!__FP_CLZ] (__FP_CLZ): Likewise.
	(_FP_DIV_HELP_imm): Likewise.
	* soft-fp/quad.h [_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_Q):
	Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_RAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_RAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (_FP_SQRT_MEAT_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_EQ_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_UNORD_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_FROM_INT_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_RAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_RAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (_FP_SQRT_MEAT_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_EQ_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_UNORD_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_FROM_INT_Q): Likewise.
	* soft-fp/single.h (FP_UNPACK_RAW_S): Likewise.
	(FP_UNPACK_RAW_SP): Likewise.
	(FP_PACK_RAW_S): Likewise.
	(FP_PACK_RAW_SP): Likewise.
	(FP_UNPACK_S): Likewise.
	(FP_UNPACK_SP): Likewise.
	(FP_UNPACK_SEMIRAW_S): Likewise.
	(FP_UNPACK_SEMIRAW_SP): Likewise.
	(FP_PACK_S): Likewise.
	(FP_PACK_SP): Likewise.
	(FP_PACK_SEMIRAW_S): Likewise.
	(FP_PACK_SEMIRAW_SP): Likewise.
	(_FP_SQRT_MEAT_S): Likewise.
	(FP_CMP_S): Likewise.
	(FP_CMP_EQ_S): Likewise.
	(FP_CMP_UNORD_S): Likewise.
	(FP_TO_INT_S): Likewise.
	(FP_FROM_INT_S): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch cleans up the soft-fp code to use parentheses around macro
arguments (where possible; many macro arguments are identifiers used
with ## rather than arbitrary expressions, so cannot be put in
parentheses).  (I'm not aware of any bugs caused by the lack of
parentheses, but this is generally good practice.  The patch is not
exhaustive regarding internal macros where the arguments always come
directly from the mantissa of a floating-point number, although
probably those should be cleaned up in this regard as well.)

Tested for powerpc-nofpu that the installed shared libraries are
unchanged by this patch.

	* soft-fp/double.h [_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_D): Use
	parentheses around macro arguments.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_RAW_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_RAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (_FP_SQRT_MEAT_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_EQ_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_UNORD_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_D): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_FROM_INT_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_RAW_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_RAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_DP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (_FP_SQRT_MEAT_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_EQ_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_UNORD_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_D): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_FROM_INT_D): Likewise.
	* soft-fp/extended.h [_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_E):
	Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_EP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_EP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_EP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_EP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (_FP_SQRT_MEAT_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_EQ_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_UNORD_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_E): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_FROM_INT_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_EP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_EP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_EP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_EP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (_FP_SQRT_MEAT_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_EQ_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_UNORD_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_E): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_FROM_INT_E): Likewise.
	* soft-fp/op-1.h (_FP_FRAC_SRST_1): Likewise.
	(_FP_FRAC_SRS_1): Likewise.
	(_FP_FRAC_CLZ_1): Likewise.
	(_FP_MUL_MEAT_1_imm): Likewise.
	(_FP_MUL_MEAT_1_wide): Likewise.
	(_FP_MUL_MEAT_1_hard): Likewise.
	(_FP_SQRT_MEAT_1): Likewise.
	(_FP_FRAC_ASSEMBLE_1): Likewise.
	(_FP_FRAC_DISASSEMBLE_1): Likewise.
	* soft-fp/op-2.h (_FP_FRAC_CLZ_2): Likewise.
	(__FP_CLZ_2): Likewise.
	(_FP_MUL_MEAT_2_wide): Likewise.
	(_FP_MUL_MEAT_2_wide_3mul): Likewise.
	(_FP_MUL_MEAT_2_gmp): Likewise.
	(_FP_MUL_MEAT_2_120_240_double): Likewise.
	(_FP_SQRT_MEAT_2): Likewise.
	(_FP_FRAC_ASSEMBLE_2): Likewise.
	(_FP_FRAC_DISASSEMBLE_2): Likewise.
	* soft-fp/op-4.h (_FP_FRAC_SRS_4): Likewise.
	(_FP_FRAC_CLZ_4): Likewise.
	(_FP_MUL_MEAT_4_wide): Likewise.
	(_FP_MUL_MEAT_4_gmp): Likewise.
	(_FP_SQRT_MEAT_4): Likewise.
	(_FP_FRAC_ASSEMBLE_4): Likewise.
	(_FP_FRAC_DISASSEMBLE_4): Likewise.
	* soft-fp/op-common.h (_FP_CMP): Likewise.
	(_FP_CMP_EQ): Likewise.
	(_FP_CMP_UNORD): Likewise.
	(_FP_TO_INT): Likewise.
	(_FP_FROM_INT): Likewise.
	[!__FP_CLZ] (__FP_CLZ): Likewise.
	(_FP_DIV_HELP_imm): Likewise.
	* soft-fp/quad.h [_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_Q):
	Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_RAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_RAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_RAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_UNPACK_SEMIRAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_PACK_SEMIRAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (_FP_SQRT_MEAT_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_EQ_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_CMP_UNORD_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_TO_INT_Q): Likewise.
	[_FP_W_TYPE_SIZE &lt; 64] (FP_FROM_INT_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_RAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_RAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_RAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_UNPACK_SEMIRAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_PACK_SEMIRAW_QP): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (_FP_SQRT_MEAT_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_EQ_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_CMP_UNORD_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_TO_INT_Q): Likewise.
	[_FP_W_TYPE_SIZE &gt;= 64] (FP_FROM_INT_Q): Likewise.
	* soft-fp/single.h (FP_UNPACK_RAW_S): Likewise.
	(FP_UNPACK_RAW_SP): Likewise.
	(FP_PACK_RAW_S): Likewise.
	(FP_PACK_RAW_SP): Likewise.
	(FP_UNPACK_S): Likewise.
	(FP_UNPACK_SP): Likewise.
	(FP_UNPACK_SEMIRAW_S): Likewise.
	(FP_UNPACK_SEMIRAW_SP): Likewise.
	(FP_PACK_S): Likewise.
	(FP_PACK_SP): Likewise.
	(FP_PACK_SEMIRAW_S): Likewise.
	(FP_PACK_SEMIRAW_SP): Likewise.
	(_FP_SQRT_MEAT_S): Likewise.
	(FP_CMP_S): Likewise.
	(FP_CMP_EQ_S): Likewise.
	(FP_CMP_UNORD_S): Likewise.
	(FP_TO_INT_S): Likewise.
	(FP_FROM_INT_S): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>soft-fp: Refactor exception handling for comparisons.</title>
<updated>2014-10-09T01:03:56+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2014-10-09T01:03:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=73e28d9c885fdfed91e6d70c4aab7e8e801818e3'/>
<id>73e28d9c885fdfed91e6d70c4aab7e8e801818e3</id>
<content type='text'>
This patch refactors how soft-fp comparisons handle setting exceptions
for NaN operands, so that exceptions are set through the FP_CMP macros
rather than directly in the C files calling them.

The _FP_CMP* and FP_CMP* macros gain an extra argument to specify when
exceptions should be set, 0 for no exception setting (I'm not sure
this is actually needed - at least it's not needed for IEEE operations
in glibc / libgcc, but might be relevant in some cases for kernel
use), 1 for exceptions only for signaling NaNs and 2 for exceptions
for all NaNs.  This argument is handled through _FP_CMP_CHECK_NAN,
newly called by the _FP_CMP* macros when a NaN is encountered.  Calls
to these macros are updated, which eliminates all the existing
checking and exception setting in soft-fp *.c files in glibc.

Tested for powerpc-nofpu.  (The __unord* functions have no code
changes; the __eq* / __ge* / __le* functions get slightly larger, but
I don't think that's significant.)

	* soft-fp/op-common.h (_FP_CMP_CHECK_NAN): New macro.
	(_FP_CMP): Add extra argument EX.  Call _FP_CMP_CHECK_NAN.
	(_FP_CMP_EQ): Likewise.
	(_FP_CMP_UNORD): Likewise.
	* soft-fp/double.h (FP_CMP_D): Add extra argument EX.
	(FP_CMP_EQ_D): Likewise.
	(FP_CMP_UNORD_D): Likewise.
	* soft-fp/extended.h (FP_CMP_E): Likewise.
	(FP_CMP_EQ_E): Likewise.
	(FP_CMP_UNORD_E): Likewise.
	* soft-fp/quad.h (FP_CMP_Q): Likewise.
	(FP_CMP_EQ_Q): Likewise.
	(FP_CMP_UNORD_Q): Likewise.
	* soft-fp/single.h (FP_CMP_S): Likewise.
	(FP_CMP_EQ_S): Likewise.
	(FP_CMP_UNORD_S): Likewise.
	* soft-fp/eqdf2.c (__eqdf2): Update call to FP_CMP_EQ_D.
	* soft-fp/eqsf2.c (__eqsf2): Update call to FP_CMP_EQ_S.
	* soft-fp/eqtf2.c (__eqtf2): Update call to FP_CMP_EQ_Q.
	* soft-fp/gedf2.c (__gedf2): Update call to FP_CMP_D.
	* soft-fp/gesf2.c (__gesf2): Update call to FP_CMP_S.
	* soft-fp/getf2.c (__getf2): Update call to FP_CMP_Q.
	* soft-fp/ledf2.c (__ledf2): Update call to FP_CMP_D.
	* soft-fp/lesf2.c (__lesf2): Update call to FP_CMP_S.
	* soft-fp/letf2.c (__letf2): Update call to FP_CMP_Q.
	* soft-fp/unorddf2.c (__unorddf2): Update call to FP_CMP_UNORD_D.
	* soft-fp/unordsf2.c (__unordsf2): Update call to FP_CMP_UNORD_S.
	* soft-fp/unordtf2.c (__unordtf2): Update call to FP_CMP_UNORD_Q.
	* sysdeps/alpha/soft-fp/ots_cmpe.c (internal_compare): Update call
	to FP_CMP_Q.
	* sysdeps/sparc/sparc32/soft-fp/q_cmp.c (_Q_cmp): Update call to
	FP_CMP_Q.
	* sysdeps/sparc/sparc32/soft-fp/q_cmpe.c (_Q_cmpe): Likewise.
	* sysdeps/sparc/sparc32/soft-fp/q_feq.c (_Q_feq): Update call to
	FP_CMP_EQ_Q.
	* sysdeps/sparc/sparc32/soft-fp/q_fge.c (_Q_fge): Update call to
	FP_CMP_Q.
	* sysdeps/sparc/sparc32/soft-fp/q_fgt.c (_Q_fgt): Likewise.
	* sysdeps/sparc/sparc32/soft-fp/q_fle.c (_Q_fle): Likewise.
	* sysdeps/sparc/sparc32/soft-fp/q_flt.c (_Q_flt): Likewise.
	* sysdeps/sparc/sparc32/soft-fp/q_fne.c (_Q_fne): Update call to
	FP_CMP_EQ_Q.
	* sysdeps/sparc/sparc64/soft-fp/qp_cmp.c (_Qp_cmp): Update call to
	FP_CMP_Q.
	* sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c (_Qp_cmpe): Likewise.
	* sysdeps/sparc/sparc64/soft-fp/qp_feq.c (_Qp_feq): Update call to
	FP_CMP_EQ_Q.
	* sysdeps/sparc/sparc64/soft-fp/qp_fge.c (_Qp_fge): Update call to
	FP_CMP_Q.
	* sysdeps/sparc/sparc64/soft-fp/qp_fgt.c (_Qp_fgt): Likewise.
	* sysdeps/sparc/sparc64/soft-fp/qp_fle.c (_Qp_fle): Likewise.
	* sysdeps/sparc/sparc64/soft-fp/qp_flt.c (_Qp_flt): Likewise.
	* sysdeps/sparc/sparc64/soft-fp/qp_fne.c (_Qp_fne): Update call to
	FP_CMP_EQ_Q.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch refactors how soft-fp comparisons handle setting exceptions
for NaN operands, so that exceptions are set through the FP_CMP macros
rather than directly in the C files calling them.

The _FP_CMP* and FP_CMP* macros gain an extra argument to specify when
exceptions should be set, 0 for no exception setting (I'm not sure
this is actually needed - at least it's not needed for IEEE operations
in glibc / libgcc, but might be relevant in some cases for kernel
use), 1 for exceptions only for signaling NaNs and 2 for exceptions
for all NaNs.  This argument is handled through _FP_CMP_CHECK_NAN,
newly called by the _FP_CMP* macros when a NaN is encountered.  Calls
to these macros are updated, which eliminates all the existing
checking and exception setting in soft-fp *.c files in glibc.

Tested for powerpc-nofpu.  (The __unord* functions have no code
changes; the __eq* / __ge* / __le* functions get slightly larger, but
I don't think that's significant.)

	* soft-fp/op-common.h (_FP_CMP_CHECK_NAN): New macro.
	(_FP_CMP): Add extra argument EX.  Call _FP_CMP_CHECK_NAN.
	(_FP_CMP_EQ): Likewise.
	(_FP_CMP_UNORD): Likewise.
	* soft-fp/double.h (FP_CMP_D): Add extra argument EX.
	(FP_CMP_EQ_D): Likewise.
	(FP_CMP_UNORD_D): Likewise.
	* soft-fp/extended.h (FP_CMP_E): Likewise.
	(FP_CMP_EQ_E): Likewise.
	(FP_CMP_UNORD_E): Likewise.
	* soft-fp/quad.h (FP_CMP_Q): Likewise.
	(FP_CMP_EQ_Q): Likewise.
	(FP_CMP_UNORD_Q): Likewise.
	* soft-fp/single.h (FP_CMP_S): Likewise.
	(FP_CMP_EQ_S): Likewise.
	(FP_CMP_UNORD_S): Likewise.
	* soft-fp/eqdf2.c (__eqdf2): Update call to FP_CMP_EQ_D.
	* soft-fp/eqsf2.c (__eqsf2): Update call to FP_CMP_EQ_S.
	* soft-fp/eqtf2.c (__eqtf2): Update call to FP_CMP_EQ_Q.
	* soft-fp/gedf2.c (__gedf2): Update call to FP_CMP_D.
	* soft-fp/gesf2.c (__gesf2): Update call to FP_CMP_S.
	* soft-fp/getf2.c (__getf2): Update call to FP_CMP_Q.
	* soft-fp/ledf2.c (__ledf2): Update call to FP_CMP_D.
	* soft-fp/lesf2.c (__lesf2): Update call to FP_CMP_S.
	* soft-fp/letf2.c (__letf2): Update call to FP_CMP_Q.
	* soft-fp/unorddf2.c (__unorddf2): Update call to FP_CMP_UNORD_D.
	* soft-fp/unordsf2.c (__unordsf2): Update call to FP_CMP_UNORD_S.
	* soft-fp/unordtf2.c (__unordtf2): Update call to FP_CMP_UNORD_Q.
	* sysdeps/alpha/soft-fp/ots_cmpe.c (internal_compare): Update call
	to FP_CMP_Q.
	* sysdeps/sparc/sparc32/soft-fp/q_cmp.c (_Q_cmp): Update call to
	FP_CMP_Q.
	* sysdeps/sparc/sparc32/soft-fp/q_cmpe.c (_Q_cmpe): Likewise.
	* sysdeps/sparc/sparc32/soft-fp/q_feq.c (_Q_feq): Update call to
	FP_CMP_EQ_Q.
	* sysdeps/sparc/sparc32/soft-fp/q_fge.c (_Q_fge): Update call to
	FP_CMP_Q.
	* sysdeps/sparc/sparc32/soft-fp/q_fgt.c (_Q_fgt): Likewise.
	* sysdeps/sparc/sparc32/soft-fp/q_fle.c (_Q_fle): Likewise.
	* sysdeps/sparc/sparc32/soft-fp/q_flt.c (_Q_flt): Likewise.
	* sysdeps/sparc/sparc32/soft-fp/q_fne.c (_Q_fne): Update call to
	FP_CMP_EQ_Q.
	* sysdeps/sparc/sparc64/soft-fp/qp_cmp.c (_Qp_cmp): Update call to
	FP_CMP_Q.
	* sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c (_Qp_cmpe): Likewise.
	* sysdeps/sparc/sparc64/soft-fp/qp_feq.c (_Qp_feq): Update call to
	FP_CMP_EQ_Q.
	* sysdeps/sparc/sparc64/soft-fp/qp_fge.c (_Qp_fge): Update call to
	FP_CMP_Q.
	* sysdeps/sparc/sparc64/soft-fp/qp_fgt.c (_Qp_fgt): Likewise.
	* sysdeps/sparc/sparc64/soft-fp/qp_fle.c (_Qp_fle): Likewise.
	* sysdeps/sparc/sparc64/soft-fp/qp_flt.c (_Qp_flt): Likewise.
	* sysdeps/sparc/sparc64/soft-fp/qp_fne.c (_Qp_fne): Update call to
	FP_CMP_EQ_Q.
</pre>
</div>
</content>
</entry>
<entry>
<title>soft-fp: Fix comment formatting.</title>
<updated>2014-09-17T22:20:45+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2014-09-17T22:20:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=c4fe3ea7cf2e9f261006ab7ea65bd20c60fe270c'/>
<id>c4fe3ea7cf2e9f261006ab7ea65bd20c60fe270c</id>
<content type='text'>
This patch fixes formatting of comments in soft-fp (in particular, the
normal style in glibc does not have a leading '*' on each line, and
comments should start with capital letters and end with ".  */").

Tested for powerpc-nofpu that the disassembly of installed shared
libraries is unchanged by this patch.

	* soft-fp/extended.h: Fix comment formatting.
	* soft-fp/op-1.h: Likewise.
	* soft-fp/op-2.h: Likewise.
	* soft-fp/op-4.h: Likewise.
	* soft-fp/op-8.h: Likewise.
	* soft-fp/op-common.h: Likewise.
	* soft-fp/soft-fp.h: Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes formatting of comments in soft-fp (in particular, the
normal style in glibc does not have a leading '*' on each line, and
comments should start with capital letters and end with ".  */").

Tested for powerpc-nofpu that the disassembly of installed shared
libraries is unchanged by this patch.

	* soft-fp/extended.h: Fix comment formatting.
	* soft-fp/op-1.h: Likewise.
	* soft-fp/op-2.h: Likewise.
	* soft-fp/op-4.h: Likewise.
	* soft-fp/op-8.h: Likewise.
	* soft-fp/op-common.h: Likewise.
	* soft-fp/soft-fp.h: Likewise.
</pre>
</div>
</content>
</entry>
</feed>
