<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/math, branch v1.1.13</title>
<subtitle>musl - an implementation of the standard library for Linux-based systems</subtitle>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/'/>
<entry>
<title>replace armhf math asm source files with inline asm</title>
<updated>2016-01-20T01:09:57+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2016-01-20T01:09:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e4355bd6bec89688e8c739cd7b4c76e675643dca'/>
<id>e4355bd6bec89688e8c739cd7b4c76e675643dca</id>
<content type='text'>
this makes it possible to inline them with LTO, and is the simplest
approach to eliminating the use of .sub files.

this also makes VFP sqrt available for use with the standard EABI
(plain arm rather than armhf subarch) when libc is built with
-mfloat-abi=softfp. the same could have been done for fabs, but when
the argument and return value are in integer registers, moving to VFP
registers and back is almost certainly more costly than a simple
integer operation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this makes it possible to inline them with LTO, and is the simplest
approach to eliminating the use of .sub files.

this also makes VFP sqrt available for use with the standard EABI
(plain arm rather than armhf subarch) when libc is built with
-mfloat-abi=softfp. the same could have been done for fabs, but when
the argument and return value are in integer registers, moving to VFP
registers and back is almost certainly more costly than a simple
integer operation.
</pre>
</div>
</content>
</entry>
<entry>
<title>math: explicitly promote expressions to excess-precision types</title>
<updated>2015-11-22T02:41:42+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2015-11-21T21:23:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=8eead3ef18ea71a64ef3cbff8c09bac3b82f1242'/>
<id>8eead3ef18ea71a64ef3cbff8c09bac3b82f1242</id>
<content type='text'>
a conforming compiler for an arch with excess precision floating point
(FLT_EVAL_METHOD!=0; presently i386 is the only such arch supported)
computes all intermediate results in the types float_t and double_t
rather than the nominal type of the expression. some incorrect
compilers, however, only keep excess precision in registers, and
convert down to the nominal type when spilling intermediate results to
memory, yielding unpredictable results that depend on the compiler's
choices of what/when to spill. in particular, this happens on old gcc
versions with -ffloat-store, which we need in order to work around
bugs where the compiler wrongly keeps explicitly-dropped excess
precision.

by explicitly converting to double_t where expressions are expected be
be evaluated in double_t precision, we can avoid depending on the
compiler to get types correct when spilling; the nominal and
intermediate precision now match. this commit should not change the
code generated by correct compilers, or by old ones on non-i386 archs
where double_t is defined as double.

this fixes a serious bug in argument reduction observed on i386 with
gcc 4.2: for values of x outside the unit circle, sin(x) was producing
results outside the interval [-1,1]. changes made in commit
0ce946cf808274c2d6e5419b139e130c8ad4bd30 were likely responsible for
breaking compatibility with this and other old gcc versions.

patch by Szabolcs Nagy.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
a conforming compiler for an arch with excess precision floating point
(FLT_EVAL_METHOD!=0; presently i386 is the only such arch supported)
computes all intermediate results in the types float_t and double_t
rather than the nominal type of the expression. some incorrect
compilers, however, only keep excess precision in registers, and
convert down to the nominal type when spilling intermediate results to
memory, yielding unpredictable results that depend on the compiler's
choices of what/when to spill. in particular, this happens on old gcc
versions with -ffloat-store, which we need in order to work around
bugs where the compiler wrongly keeps explicitly-dropped excess
precision.

by explicitly converting to double_t where expressions are expected be
be evaluated in double_t precision, we can avoid depending on the
compiler to get types correct when spilling; the nominal and
intermediate precision now match. this commit should not change the
code generated by correct compilers, or by old ones on non-i386 archs
where double_t is defined as double.

this fixes a serious bug in argument reduction observed on i386 with
gcc 4.2: for values of x outside the unit circle, sin(x) was producing
results outside the interval [-1,1]. changes made in commit
0ce946cf808274c2d6e5419b139e130c8ad4bd30 were likely responsible for
breaking compatibility with this and other old gcc versions.

patch by Szabolcs Nagy.
</pre>
</div>
</content>
</entry>
<entry>
<title>explicitly assemble all arm asm sources as UAL</title>
<updated>2015-11-10T05:01:55+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2015-11-10T05:01:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=4e73d12117e362ad4b82946dc084b4a38f76e54b'/>
<id>4e73d12117e362ad4b82946dc084b4a38f76e54b</id>
<content type='text'>
these files are all accepted as legacy arm syntax when producing arm
code, but legacy syntax cannot be used for producing thumb2 with
access to the full ISA. even after switching to UAL, some asm source
files contain instructions which are not valid in thumb mode, so these
will need to be addressed separately.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
these files are all accepted as legacy arm syntax when producing arm
code, but legacy syntax cannot be used for producing thumb2 with
access to the full ISA. even after switching to UAL, some asm source
files contain instructions which are not valid in thumb mode, so these
will need to be addressed separately.
</pre>
</div>
</content>
</entry>
<entry>
<title>declare fpu usage to the assembler in arm hard-float asm files</title>
<updated>2015-10-19T06:05:58+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2015-10-19T06:05:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=7557a8462e3c973466ce082211520182f243dc2a'/>
<id>7557a8462e3c973466ce082211520182f243dc2a</id>
<content type='text'>
Some armhf gcc toolchains (built with --with-float=hard but without
--with-fpu=vfp*) do not pass -mfpu=vfp to the assembler and then
binutils rejects the UAL mnemonics for VFP unless there is an .fpu vfp
directive in the asm source.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some armhf gcc toolchains (built with --with-float=hard but without
--with-fpu=vfp*) do not pass -mfpu=vfp to the assembler and then
binutils rejects the UAL mnemonics for VFP unless there is an .fpu vfp
directive in the asm source.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix regression in x86_64 math asm with old binutils</title>
<updated>2015-04-23T10:21:49+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2015-04-23T10:21:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=18938c299c0923e7034e8bfc5b250ded3b0ef78a'/>
<id>18938c299c0923e7034e8bfc5b250ded3b0ef78a</id>
<content type='text'>
the implicit-operand form of fucomip is rejected by binutils 2.19 and
perhaps other versions still in use. writing both operands explicitly
fixes the issue. there is no change to the resulting output.

commit a732e80d33b4fd6f510f7cec4f5573ef5d89bc4e was the source of this
regression.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the implicit-operand form of fucomip is rejected by binutils 2.19 and
perhaps other versions still in use. writing both operands explicitly
fixes the issue. there is no change to the resulting output.

commit a732e80d33b4fd6f510f7cec4f5573ef5d89bc4e was the source of this
regression.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove potentially PIC-incompatible relocations from x86_64 and x32 asm</title>
<updated>2015-04-19T01:18:23+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2015-04-19T01:18:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=b35c4c475bea3c8f938d8e9696d1138eabb54a89'/>
<id>b35c4c475bea3c8f938d8e9696d1138eabb54a89</id>
<content type='text'>
analogous to commit 8ed66ecbcba1dd0f899f22b534aac92a282f42d5 for i386.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
analogous to commit 8ed66ecbcba1dd0f899f22b534aac92a282f42d5 for i386.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove the last of possible-textrels from i386 asm</title>
<updated>2015-04-19T00:45:39+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2015-04-19T00:45:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=8ed66ecbcba1dd0f899f22b534aac92a282f42d5'/>
<id>8ed66ecbcba1dd0f899f22b534aac92a282f42d5</id>
<content type='text'>
none of these are actual textrels because of ld-time binding performed
by -Bsymbolic-functions, but I'm changing them with the goal of making
ld-time binding purely an optimization rather than relying on it for
semantic purposes.

in the case of memmove's call to memcpy, making it explicit that the
memmove asm is assuming the forward-copying behavior of the memcpy asm
is desirable anyway; in case memcpy is ever changed, the semantic
mismatch would be apparent while editing memmcpy.s.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
none of these are actual textrels because of ld-time binding performed
by -Bsymbolic-functions, but I'm changing them with the goal of making
ld-time binding purely an optimization rather than relying on it for
semantic purposes.

in the case of memmove's call to memcpy, making it explicit that the
memmove asm is assuming the forward-copying behavior of the memcpy asm
is desirable anyway; in case memcpy is ever changed, the semantic
mismatch would be apparent while editing memmcpy.s.
</pre>
</div>
</content>
</entry>
<entry>
<title>math: fix pow(+-0,-inf) not to raise divbyzero flag</title>
<updated>2015-04-18T04:18:52+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2015-04-11T00:35:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=cb5c057c87240a9534f8e0d9b7ff2560082f6218'/>
<id>cb5c057c87240a9534f8e0d9b7ff2560082f6218</id>
<content type='text'>
this reverts the commit f29fea00b5bc72d4b8abccba2bb1e312684d1fce
which was based on a bug in C99 and POSIX and did not match IEEE-754
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1515.pdf
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this reverts the commit f29fea00b5bc72d4b8abccba2bb1e312684d1fce
which was based on a bug in C99 and POSIX and did not match IEEE-754
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1515.pdf
</pre>
</div>
</content>
</entry>
<entry>
<title>add aarch64 port</title>
<updated>2015-03-12T00:12:35+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2015-03-10T21:18:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=01ef3dd9c5fa7a56aa370f244dd08e05c73010f5'/>
<id>01ef3dd9c5fa7a56aa370f244dd08e05c73010f5</id>
<content type='text'>
This adds complete aarch64 target support including bigendian subarch.

Some of the long double math functions are known to be broken otherwise
interfaces should be fully functional, but at this point consider this
port experimental.

Initial work on this port was done by Sireesh Tripurari and Kevin Bortis.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds complete aarch64 target support including bigendian subarch.

Some of the long double math functions are known to be broken otherwise
interfaces should be fully functional, but at this point consider this
port experimental.

Initial work on this port was done by Sireesh Tripurari and Kevin Bortis.
</pre>
</div>
</content>
</entry>
<entry>
<title>math: add dummy implementations of 128 bit long double functions</title>
<updated>2015-03-11T22:54:53+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2015-03-10T20:01:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f4e4632abfa8297db1485e132bb15b9ef6c32a1b'/>
<id>f4e4632abfa8297db1485e132bb15b9ef6c32a1b</id>
<content type='text'>
This is in preparation for the aarch64 port only to have the long
double math symbols available on ld128 platforms. The implementations
should be fixed up later once we have proper tests for these functions.

Added bigendian handling for ld128 bit manipulations too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is in preparation for the aarch64 port only to have the long
double math symbols available on ld128 platforms. The implementations
should be fixed up later once we have proper tests for these functions.

Added bigendian handling for ld128 bit manipulations too.
</pre>
</div>
</content>
</entry>
</feed>
