diff options
author | Andreas Jaeger <aj@suse.de> | 2012-03-07 08:55:31 +0100 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2012-03-07 08:55:31 +0100 |
commit | 580716898d5e80784f1993a0129d1b821bc6e3bf (patch) | |
tree | c346faaab5b1f4005f3c0dd8f16ba701a30ad541 /sysdeps | |
parent | 625d134f42d65ebc0349c03a0d9592400e86d084 (diff) | |
parent | 3bd2c723160f04b1c151daffb8f6596dbd633f5e (diff) | |
download | glibc-580716898d5e80784f1993a0129d1b821bc6e3bf.tar.gz glibc-580716898d5e80784f1993a0129d1b821bc6e3bf.tar.xz glibc-580716898d5e80784f1993a0129d1b821bc6e3bf.zip |
Merge branch 'master' into bug13658-branch
Diffstat (limited to 'sysdeps')
82 files changed, 4412 insertions, 1894 deletions
diff --git a/sysdeps/generic/dl-osinfo.h b/sysdeps/generic/dl-osinfo.h index 2eaab3b760..548fc4666a 100644 --- a/sysdeps/generic/dl-osinfo.h +++ b/sysdeps/generic/dl-osinfo.h @@ -30,8 +30,8 @@ _dl_setup_stack_chk_guard (void *dl_random) if (dl_random == NULL) { - ret.bytes[sizeof (ret) - 2] = 255; - ret.bytes[sizeof (ret) - 3] = '\n'; + ret.bytes[sizeof (ret) - 1] = 255; + ret.bytes[sizeof (ret) - 2] = '\n'; } else { diff --git a/sysdeps/gnu/errlist-compat.awk b/sysdeps/gnu/errlist-compat.awk index 0e97d05d66..4f70e927c5 100644 --- a/sysdeps/gnu/errlist-compat.awk +++ b/sysdeps/gnu/errlist-compat.awk @@ -84,7 +84,10 @@ END { printf "#define ERR_MAX %d\n\n", highest; } - for (old in compat) { + # same regardless of awk's ordering of the associative array. + num_compat_elems = asorti(compat, compat_indices) + for (i = 1; i <= num_compat_elems; i++) { + old = compat_indices[i] new = compat[old]; n = vcount[old]; printf "#if SHLIB_COMPAT (libc, %s, %s)\n", old, new; diff --git a/sysdeps/gnu/errlist.c b/sysdeps/gnu/errlist.c index 75085c01f6..62613ff891 100644 --- a/sysdeps/gnu/errlist.c +++ b/sysdeps/gnu/errlist.c @@ -386,7 +386,7 @@ TRANS not representable because of overflow or underflow. */ /* TRANS Resource temporarily unavailable; the call might work if you try again TRANS later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN}; -TRANS they are always the same in the GNU C library. +TRANS they are always the same in @theglibc{}. TRANS TRANS This error can happen in a few different situations: TRANS @@ -421,7 +421,7 @@ TRANS @end itemize */ #endif #if defined (EWOULDBLOCK) && EWOULDBLOCK != EAGAIN /* -TRANS In the GNU C library, this is another name for @code{EAGAIN} (above). +TRANS In @theglibc{}, this is another name for @code{EAGAIN} (above). TRANS The values are always the same, on every operating system. TRANS TRANS C libraries in many older Unix systems have @code{EWOULDBLOCK} as a diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps index 83a68aff6c..c5568b9832 100644 --- a/sysdeps/i386/fpu/libm-test-ulps +++ b/sysdeps/i386/fpu/libm-test-ulps @@ -280,10 +280,173 @@ ifloat: 1 ildouble: 1 ldouble: 1 +# cos_downward +Test "cos_downward (1) == 0.5403023058681397174009366074429766037323": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (10) == -0.8390715290764524522588639478240648345199": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cos_downward (3) == -0.9899924966004454572715727947312613023937": +double: 1 +idouble: 1 +Test "cos_downward (4) == -0.6536436208636119146391681830977503814241": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_downward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (8) == -0.1455000338086135258688413818311946826093": +ildouble: 1 +ldouble: 1 +Test "cos_downward (9) == -0.9111302618846769883682947111811653112463": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cos_tonearest +Test "cos_tonearest (8) == -0.1455000338086135258688413818311946826093": +ildouble: 1 +ldouble: 1 +Test "cos_tonearest (9) == -0.9111302618846769883682947111811653112463": +ildouble: 1 +ldouble: 1 + +# cos_towardzero +Test "cos_towardzero (1) == 0.5403023058681397174009366074429766037323": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (2) == -0.4161468365471423869975682295007621897660": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (4) == -0.6536436208636119146391681830977503814241": +double: 1 +idouble: 1 +Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_towardzero (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (8) == -0.1455000338086135258688413818311946826093": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cos_upward +Test "cos_upward (1) == 0.5403023058681397174009366074429766037323": +float: 1 +ifloat: 1 +Test "cos_upward (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_upward (2) == -0.4161468365471423869975682295007621897660": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (4) == -0.6536436208636119146391681830977503814241": +double: 1 +idouble: 1 +Test "cos_upward (5) == 0.2836621854632262644666391715135573083344": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (6) == 0.9601702866503660205456522979229244054519": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (7) == 0.7539022543433046381411975217191820122183": +double: 1 +idouble: 1 +Test "cos_upward (8) == -0.1455000338086135258688413818311946826093": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + # cosh Test "cosh (0.75) == 1.29468328467684468784170818539018176": ildouble: 1 +# cosh_downward +Test "cosh_downward (22) == 1792456423.065795780980053377632656584997": +double: 1 +float: 1 +ldouble: 2 +Test "cosh_downward (23) == 4872401723.124451300068625740569997090344": +double: 1 +float: 1 +ldouble: 1 +Test "cosh_downward (24) == 13244561064.92173614708845674912733665919": +float: 1 +ldouble: 1 + +# cosh_tonearest +Test "cosh_tonearest (22) == 1792456423.065795780980053377632656584997": +ldouble: 1 + +# cosh_towardzero +Test "cosh_towardzero (22) == 1792456423.065795780980053377632656584997": +double: 1 +float: 1 +ldouble: 2 +Test "cosh_towardzero (23) == 4872401723.124451300068625740569997090344": +double: 1 +float: 1 +ldouble: 1 +Test "cosh_towardzero (24) == 13244561064.92173614708845674912733665919": +float: 1 +ldouble: 1 + +# cosh_upward +Test "cosh_upward (23) == 4872401723.124451300068625740569997090344": +ldouble: 1 +Test "cosh_upward (24) == 13244561064.92173614708845674912733665919": +double: 1 + # cpow Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": float: 1 @@ -370,8 +533,8 @@ ifloat: 1 Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 idouble: 1 -ildouble: 439 -ldouble: 439 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": float: 1 ifloat: 1 @@ -390,13 +553,13 @@ ldouble: 3 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -ildouble: 5 -ldouble: 5 +ildouble: 3 +ldouble: 3 Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": float: 1 ifloat: 1 -ildouble: 25 -ldouble: 25 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": float: 1 ifloat: 1 @@ -422,6 +585,17 @@ idouble: 1 Test "erfc (0.75) == 0.288844366346484868401062165408589223": float: 1 ifloat: 1 +Test "erfc (0x1.f7303cp+1) == 2.705500297238986897105236321218861842255e-8": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "erfc (0x1.ffa002p+2) == 1.233585992097580296336099501489175967033e-29": +ildouble: 1 +ldouble: 1 +Test "erfc (0x1.ffffc8p+2) == 1.122671365033056305522366683719541099329e-29": +double: 1 +idouble: 1 Test "erfc (1.25) == 0.0770998717435417698634765188027188596": ildouble: 1 ldouble: 1 @@ -437,10 +611,6 @@ ldouble: 1 # exp Test "exp (0.75) == 2.11700001661267466854536981983709561": ildouble: 1 -Test "exp (1000.0) == 0.197007111401704699388887935224332313e435": -ildouble: 754 -Test "exp (50.0) == 5184705528587072464087.45332293348538": -ildouble: 16 # exp10 Test "exp10 (-1) == 0.1": @@ -453,9 +623,56 @@ Test "exp10 (3) == 1000": ildouble: 8 ldouble: 8 +# exp_downward +Test "exp_downward (1) == e": +ildouble: 1 +ldouble: 1 +Test "exp_downward (2) == e^2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "exp_downward (3) == e^3": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_towardzero +Test "exp_towardzero (1) == e": +ildouble: 1 +ldouble: 1 +Test "exp_towardzero (2) == e^2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "exp_towardzero (3) == e^3": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_upward +Test "exp_upward (1) == e": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + # expm1 Test "expm1 (1) == M_El - 1.0": ildouble: 1 +Test "expm1 (11356.25) == 9.05128237311923300051376115753226014206e+4931": +ldouble: 1 # gamma Test "gamma (-0.5) == log(2*sqrt(pi))": @@ -719,6 +936,174 @@ ifloat: 1 ildouble: 1 ldouble: 1 +# pow_downward +Test "pow_downward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# pow_towardzero +Test "pow_towardzero (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "pow_towardzero (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# pow_upward +Test "pow_upward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "pow_upward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# sin_downward +Test "sin_downward (1) == 0.8414709848078965066525023216302989996226": +ildouble: 1 +ldouble: 1 +Test "sin_downward (10) == -0.5440211108893698134047476618513772816836": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (2) == 0.9092974268256816953960198659117448427023": +double: 1 +idouble: 1 +Test "sin_downward (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_downward (4) == -0.7568024953079282513726390945118290941359": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (5) == -0.9589242746631384688931544061559939733525": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (6) == -0.2794154981989258728115554466118947596280": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sin_downward (7) == 0.6569865987187890903969990915936351779369": +ildouble: 1 +ldouble: 1 +Test "sin_downward (8) == 0.9893582466233817778081235982452886721164": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (9) == 0.4121184852417565697562725663524351793439": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sin_tonearest +Test "sin_tonearest (10) == -0.5440211108893698134047476618513772816836": +ildouble: 1 +ldouble: 1 +Test "sin_tonearest (4) == -0.7568024953079282513726390945118290941359": +ildouble: 1 +ldouble: 1 +Test "sin_tonearest (9) == 0.4121184852417565697562725663524351793439": +ildouble: 1 +ldouble: 1 + +# sin_towardzero +Test "sin_towardzero (1) == 0.8414709848078965066525023216302989996226": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_towardzero (2) == 0.9092974268256816953960198659117448427023": +double: 1 +idouble: 1 +Test "sin_towardzero (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_towardzero (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_towardzero (6) == -0.2794154981989258728115554466118947596280": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (7) == 0.6569865987187890903969990915936351779369": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (8) == 0.9893582466233817778081235982452886721164": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (9) == 0.4121184852417565697562725663524351793439": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sin_upward +Test "sin_upward (1) == 0.8414709848078965066525023216302989996226": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sin_upward (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_upward (2) == 0.9092974268256816953960198659117448427023": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_upward (3) == 0.1411200080598672221007448028081102798469": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sin_upward (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_upward (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_upward (6) == -0.2794154981989258728115554466118947596280": +ildouble: 1 +ldouble: 1 +Test "sin_upward (7) == 0.6569865987187890903969990915936351779369": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sin_upward (8) == 0.9893582466233817778081235982452886721164": +float: 1 +ifloat: 1 + # sincos Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 @@ -745,11 +1130,216 @@ Test "sinh (0.75) == 0.822316731935829980703661634446913849": double: 1 ildouble: 1 +# sinh_downward +Test "sinh_downward (22) == 1792456423.065795780701106568345764104225": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ldouble: 4 +Test "sinh_downward (23) == 4872401723.124451299966006944252978187305": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sinh_downward (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 +ldouble: 5 + +# sinh_tonearest +Test "sinh_tonearest (22) == 1792456423.065795780701106568345764104225": +ldouble: 3 +Test "sinh_tonearest (23) == 4872401723.124451299966006944252978187305": +ldouble: 1 +Test "sinh_tonearest (24) == 13244561064.92173614705070540368454568168": +ldouble: 6 + +# sinh_towardzero +Test "sinh_towardzero (22) == 1792456423.065795780701106568345764104225": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ldouble: 4 +Test "sinh_towardzero (23) == 4872401723.124451299966006944252978187305": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sinh_towardzero (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 +ldouble: 5 + +# sinh_upward +Test "sinh_upward (22) == 1792456423.065795780701106568345764104225": +ldouble: 16 +Test "sinh_upward (23) == 4872401723.124451299966006944252978187305": +ldouble: 27 +Test "sinh_upward (24) == 13244561064.92173614705070540368454568168": +double: 1 +idouble: 1 +ldouble: 7 + # tan Test "tan (pi/4) == 1": double: 1 idouble: 1 +# tan_downward +Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tan_downward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_downward (2) == -2.1850398632615189916433061023136825434320": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tan_downward (3) == -0.1425465430742778052956354105339134932261": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (4) == 1.1578212823495775831373424182673239231198": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (5) == -3.3805150062465856369827058794473439087096": +ildouble: 1 +ldouble: 1 +Test "tan_downward (6) == -0.2910061913847491570536995888681755428312": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tan_downward (7) == 0.8714479827243187364564508896003135663222": +double: 1 +idouble: 1 +Test "tan_downward (8) == -6.7997114552203786999252627596086333648814": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 + +# tan_tonearest +Test "tan_tonearest (1) == 1.5574077246549022305069748074583601730873": +ildouble: 1 +ldouble: 1 +Test "tan_tonearest (2) == -2.1850398632615189916433061023136825434320": +ildouble: 1 +ldouble: 1 +Test "tan_tonearest (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_tonearest (8) == -6.7997114552203786999252627596086333648814": +ildouble: 1 +ldouble: 1 +Test "tan_tonearest (9) == -0.4523156594418098405903708757987855343087": +ildouble: 1 +ldouble: 1 + +# tan_towardzero +Test "tan_towardzero (1) == 1.5574077246549022305069748074583601730873": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tan_towardzero (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_towardzero (2) == -2.1850398632615189916433061023136825434320": +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (4) == 1.1578212823495775831373424182673239231198": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (5) == -3.3805150062465856369827058794473439087096": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (7) == 0.8714479827243187364564508896003135663222": +double: 1 +idouble: 1 +Test "tan_towardzero (8) == -6.7997114552203786999252627596086333648814": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "tan_towardzero (9) == -0.4523156594418098405903708757987855343087": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# tan_upward +Test "tan_upward (1) == 1.5574077246549022305069748074583601730873": +ildouble: 1 +ldouble: 1 +Test "tan_upward (10) == 0.6483608274590866712591249330098086768169": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (2) == -2.1850398632615189916433061023136825434320": +ildouble: 1 +ldouble: 1 +Test "tan_upward (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (4) == 1.1578212823495775831373424182673239231198": +double: 1 +idouble: 1 +Test "tan_upward (5) == -3.3805150062465856369827058794473439087096": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_upward (7) == 0.8714479827243187364564508896003135663222": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (8) == -6.7997114552203786999252627596086333648814": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "tan_upward (9) == -0.4523156594418098405903708757987855343087": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": double: 2 @@ -943,8 +1533,8 @@ ifloat: 1 # Maximal error of functions: Function: "acos": -ildouble: 622 -ldouble: 622 +ildouble: 1 +ldouble: 1 Function: "asin": ildouble: 1 @@ -1088,16 +1678,61 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "cos_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "cos_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "cosh": ildouble: 1 +Function: "cosh_downward": +double: 1 +float: 1 +ldouble: 2 + +Function: "cosh_tonearest": +ldouble: 1 + +Function: "cosh_towardzero": +double: 1 +float: 1 +ldouble: 2 + +Function: "cosh_upward": +double: 1 +ldouble: 1 + Function: Real part of "cpow": double: 1 float: 4 idouble: 1 ifloat: 4 -ildouble: 763 -ldouble: 763 +ildouble: 6 +ldouble: 6 Function: Imaginary part of "cpow": double: 2 @@ -1136,8 +1771,8 @@ ldouble: 2 Function: Real part of "ctan": double: 1 idouble: 1 -ildouble: 439 -ldouble: 439 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ctan": double: 1 @@ -1152,16 +1787,16 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 5 -ldouble: 5 +ildouble: 3 +ldouble: 3 Function: Imaginary part of "ctanh": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 25 -ldouble: 25 +ildouble: 1 +ldouble: 1 Function: "erf": double: 1 @@ -1175,15 +1810,35 @@ ifloat: 1 ildouble: 1 ldouble: 1 -Function: "exp": -ildouble: 754 - Function: "exp10": ildouble: 8 ldouble: 8 +Function: "exp_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "exp_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "exp_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + Function: "expm1": ildouble: 1 +ldouble: 1 Function: "gamma": double: 1 @@ -1236,6 +1891,58 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "pow_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "sin_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "sincos": double: 1 float: 1 @@ -1248,10 +1955,60 @@ Function: "sinh": double: 1 ildouble: 1 +Function: "sinh_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ldouble: 5 + +Function: "sinh_tonearest": +ldouble: 6 + +Function: "sinh_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ldouble: 5 + +Function: "sinh_upward": +double: 1 +idouble: 1 +ldouble: 27 + Function: "tan": double: 1 idouble: 1 +Function: "tan_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "tan_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "tan_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "tan_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + Function: "tgamma": double: 2 float: 1 diff --git a/sysdeps/i386/i486/bits/atomic.h b/sysdeps/i386/i486/bits/atomic.h index b633ce984a..b59a556db5 100644 --- a/sysdeps/i386/i486/bits/atomic.h +++ b/sysdeps/i386/i486/bits/atomic.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2004,2006,2007,2009,2011 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -55,33 +55,10 @@ typedef uintmax_t uatomic_max_t; #endif -#if __GNUC_PREREQ (4, 1) -# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ +#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ __sync_val_compare_and_swap (mem, oldval, newval) -# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ +#define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ (! __sync_bool_compare_and_swap (mem, oldval, newval)) -#else -# define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ - ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK_PREFIX "cmpxchgb %b2, %1" \ - : "=a" (ret), "=m" (*mem) \ - : "q" (newval), "m" (*mem), "0" (oldval)); \ - ret; }) - -# define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ - ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK_PREFIX "cmpxchgw %w2, %1" \ - : "=a" (ret), "=m" (*mem) \ - : "r" (newval), "m" (*mem), "0" (oldval)); \ - ret; }) - -# define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ - ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK_PREFIX "cmpxchgl %2, %1" \ - : "=a" (ret), "=m" (*mem) \ - : "r" (newval), "m" (*mem), "0" (oldval)); \ - ret; }) -#endif #define __arch_c_compare_and_exchange_val_8_acq(mem, newval, oldval) \ @@ -254,13 +231,8 @@ typedef uintmax_t uatomic_max_t; } \ __result; }) -#if __GNUC_PREREQ (4, 1) -# define atomic_exchange_and_add(mem, value) \ +#define atomic_exchange_and_add(mem, value) \ __sync_fetch_and_add (mem, value) -#else -# define atomic_exchange_and_add(mem, value) \ - __arch_exchange_and_add_body (LOCK_PREFIX, __arch, mem, value) -#endif #define __arch_exchange_and_add_cprefix \ "cmpl $0, %%gs:%P4\n\tje 0f\n\tlock\n0:\t" diff --git a/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c b/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c index d10e872568..d4fcd2b4a1 100644 --- a/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c +++ b/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c @@ -6,6 +6,8 @@ extern __typeof (strcasecmp_l) __strcasecmp_l_nonascii; #define USE_IN_EXTENDED_LOCALE_MODEL 1 #include <string/strcasecmp.c> +strong_alias (__strcasecmp_l_nonascii, __strcasecmp_l_ia32) + /* The needs of strcasecmp in libc are minimal, no need to go through the IFUNC. */ strong_alias (__strcasecmp_l_nonascii, __GI___strcasecmp_l) diff --git a/sysdeps/i386/i686/multiarch/strcmp.S b/sysdeps/i386/i686/multiarch/strcmp.S index 5410d17e09..b3b9eb87bc 100644 --- a/sysdeps/i386/i686/multiarch/strcmp.S +++ b/sysdeps/i386/i686/multiarch/strcmp.S @@ -111,6 +111,7 @@ END(STRCMP) # endif #endif -#ifndef USE_AS_STRNCMP +#if !defined USE_AS_STRNCMP && !defined USE_AS_STRCASECMP_L \ + && !defined USE_AS_STRNCASECMP_L # include "../strcmp.S" #endif diff --git a/sysdeps/i386/i686/multiarch/strncase_l-c.c b/sysdeps/i386/i686/multiarch/strncase_l-c.c index 0c68b8d1cb..7e601af271 100644 --- a/sysdeps/i386/i686/multiarch/strncase_l-c.c +++ b/sysdeps/i386/i686/multiarch/strncase_l-c.c @@ -6,6 +6,8 @@ extern __typeof (strncasecmp_l) __strncasecmp_l_nonascii; #define USE_IN_EXTENDED_LOCALE_MODEL 1 #include <string/strncase.c> +strong_alias (__strncasecmp_l_nonascii, __strncasecmp_l_ia32) + /* The needs of strcasecmp in libc are minimal, no need to go through the IFUNC. */ strong_alias (__strncasecmp_l_nonascii, __GI___strncasecmp_l) diff --git a/sysdeps/ieee754/dbl-64/e_exp.c b/sysdeps/ieee754/dbl-64/e_exp.c index cfdb8e2c7d..8231c5698c 100644 --- a/sysdeps/ieee754/dbl-64/e_exp.c +++ b/sysdeps/ieee754/dbl-64/e_exp.c @@ -1,7 +1,7 @@ /* * IBM Accurate Mathematical Library * written by International Business Machines Corp. - * Copyright (C) 2001, 2011 Free Software Foundation + * Copyright (C) 2001-2012 Free Software Foundation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -38,6 +38,7 @@ #include "MathLib.h" #include "uexp.tbl" #include "math_private.h" +#include <fenv.h> #ifndef SECTION # define SECTION @@ -58,6 +59,10 @@ __ieee754_exp(double x) { int4 k; #endif int4 i,j,m,n,ex; + fenv_t env; + double retval; + + libc_feholdexcept_setround (&env, FE_TONEAREST); junk1.x = x; m = junk1.i[HIGH_HALF]; @@ -90,18 +95,19 @@ __ieee754_exp(double x) { rem=(bet + bet*eps)+al*eps; res = al + rem; cor = (al - res) + rem; - if (res == (res+cor*err_0)) return res*binexp.x; - else return __slowexp(x); /*if error is over bound */ + if (res == (res+cor*err_0)) { retval = res*binexp.x; goto ret; } + else { retval = __slowexp(x); goto ret; } /*if error is over bound */ } - if (n <= smallint) return 1.0; + if (n <= smallint) { retval = 1.0; goto ret; } if (n >= badint) { - if (n > infint) return(x+x); /* x is NaN */ - if (n < infint) return ( (x>0) ? (hhuge*hhuge) : (tiny*tiny) ); + if (n > infint) { retval = x+x; goto ret; } /* x is NaN */ + if (n < infint) { retval = (x>0) ? (hhuge*hhuge) : (tiny*tiny); goto ret; } /* x is finite, cause either overflow or underflow */ - if (junk1.i[LOW_HALF] != 0) return (x+x); /* x is NaN */ - return ((x>0)?inf.x:zero ); /* |x| = inf; return either inf or 0 */ + if (junk1.i[LOW_HALF] != 0) { retval = x+x; goto ret; } /* x is NaN */ + retval = (x>0)?inf.x:zero; /* |x| = inf; return either inf or 0 */ + goto ret; } y = x*log2e.x + three51.x; @@ -126,8 +132,8 @@ __ieee754_exp(double x) { if (res < 1.0) {res+=res; cor+=cor; ex-=1;} if (ex >=-1022) { binexp.i[HIGH_HALF] = (1023+ex)<<20; - if (res == (res+cor*err_0)) return res*binexp.x; - else return __slowexp(x); /*if error is over bound */ + if (res == (res+cor*err_0)) { retval = res*binexp.x; goto ret; } + else { retval = __slowexp(x); goto ret; } /*if error is over bound */ } ex = -(1022+ex); binexp.i[HIGH_HALF] = (1023-ex)<<20; @@ -140,15 +146,19 @@ __ieee754_exp(double x) { cor = (t-res)+y; if (res == (res + eps*cor)) { binexp.i[HIGH_HALF] = 0x00100000; - return (res-1.0)*binexp.x; + retval = (res-1.0)*binexp.x; + goto ret; } - else return __slowexp(x); /* if error is over bound */ + else { retval = __slowexp(x); goto ret; } /* if error is over bound */ } else { binexp.i[HIGH_HALF] =(junk1.i[LOW_HALF]+767)<<20; - if (res == (res+cor*err_0)) return res*binexp.x*t256.x; - else return __slowexp(x); + if (res == (res+cor*err_0)) { retval = res*binexp.x*t256.x; goto ret; } + else { retval = __slowexp(x); goto ret; } } + ret: + libc_feupdateenv (&env); + return retval; } #ifndef __ieee754_exp strong_alias (__ieee754_exp, __exp_finite) diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c index 28435fd36d..f668b4b5fc 100644 --- a/sysdeps/ieee754/dbl-64/e_pow.c +++ b/sysdeps/ieee754/dbl-64/e_pow.c @@ -1,7 +1,7 @@ /* * IBM Accurate Mathematical Library * written by International Business Machines Corp. - * Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation + * Copyright (C) 2001-2012 Free Software Foundation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -41,6 +41,7 @@ #include "MathLib.h" #include "upow.tbl" #include "math_private.h" +#include <fenv.h> #ifndef SECTION # define SECTION @@ -84,6 +85,11 @@ __ieee754_pow(double x, double y) { (u.i[HIGH_HALF]==0 && u.i[LOW_HALF]!=0)) && /* 2^-1023< x<= 2^-1023 * 0x1.0000ffffffff */ (v.i[HIGH_HALF]&0x7fffffff) < 0x4ff00000) { /* if y<-1 or y>1 */ + fenv_t env; + double retval; + + libc_feholdexcept_setround (&env, FE_TONEAREST); + z = log1(x,&aa,&error); /* x^y =e^(y log (X)) */ t = y*134217729.0; y1 = t - (t-y); @@ -97,7 +103,10 @@ __ieee754_pow(double x, double y) { a2 = (a-a1)+aa; error = error*ABS(y); t = __exp1(a1,a2,1.9e16*error); /* return -10 or 0 if wasn't computed exactly */ - return (t>0)?t:power1(x,y); + retval = (t>0)?t:power1(x,y); + + libc_feupdateenv (&env); + return retval; } if (x == 0) { diff --git a/sysdeps/ieee754/dbl-64/s_scalbln.c b/sysdeps/ieee754/dbl-64/s_scalbln.c index 89174b47fb..b5903c97d0 100644 --- a/sysdeps/ieee754/dbl-64/s_scalbln.c +++ b/sysdeps/ieee754/dbl-64/s_scalbln.c @@ -38,11 +38,13 @@ __scalbln (double x, long int n) k = ((hx&0x7ff00000)>>20) - 54; } if (__builtin_expect(k==0x7ff, 0)) return x+x; /* NaN or Inf */ - k = k+n; - if (__builtin_expect(n> 50000 || k > 0x7fe, 0)) - return huge*__copysign(huge,x); /* overflow */ if (__builtin_expect(n< -50000, 0)) return tiny*__copysign(tiny,x); /*underflow*/ + if (__builtin_expect(n> 50000 || k+n > 0x7fe, 0)) + return huge*__copysign(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (__builtin_expect(k > 0, 1)) /* normal result */ {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;} if (k <= -54) diff --git a/sysdeps/ieee754/dbl-64/s_scalbn.c b/sysdeps/ieee754/dbl-64/s_scalbn.c index 1e67dbe5eb..c2488fbbee 100644 --- a/sysdeps/ieee754/dbl-64/s_scalbn.c +++ b/sysdeps/ieee754/dbl-64/s_scalbn.c @@ -38,11 +38,13 @@ __scalbn (double x, int n) k = ((hx&0x7ff00000)>>20) - 54; } if (__builtin_expect(k==0x7ff, 0)) return x+x; /* NaN or Inf */ - k = k+n; - if (__builtin_expect(n> 50000 || k > 0x7fe, 0)) - return huge*__copysign(huge,x); /* overflow */ if (__builtin_expect(n< -50000, 0)) return tiny*__copysign(tiny,x); /*underflow*/ + if (__builtin_expect(n> 50000 || k+n > 0x7fe, 0)) + return huge*__copysign(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (__builtin_expect(k > 0, 1)) /* normal result */ {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;} if (k <= -54) diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c index 5b79854004..32ba66d1a0 100644 --- a/sysdeps/ieee754/dbl-64/s_sin.c +++ b/sysdeps/ieee754/dbl-64/s_sin.c @@ -53,6 +53,7 @@ #include "usncs.h" #include "MathLib.h" #include "math_private.h" +#include <fenv.h> #ifndef SECTION # define SECTION @@ -107,12 +108,16 @@ __sin(double x){ #if 0 int4 nn; #endif + fenv_t env; + double retval = 0; + + libc_feholdexcept_setround (&env, FE_TONEAREST); u.x = x; m = u.i[HIGH_HALF]; k = 0x7fffffff&m; /* no sign */ if (k < 0x3e500000) /* if x->0 =>sin(x)=x */ - return x; + { retval = x; goto ret; } /*---------------------------- 2^-26 < |x|< 0.25 ----------------------*/ else if (k < 0x3fd00000){ xx = x*x; @@ -120,7 +125,8 @@ __sin(double x){ t = ((((s5.x*xx + s4.x)*xx + s3.x)*xx + s2.x)*xx + s1.x)*(xx*x); res = x+t; cor = (x-res)+t; - return (res == res + 1.07*cor)? res : slow(x); + retval = (res == res + 1.07*cor)? res : slow(x); + goto ret; } /* else if (k < 0x3fd00000) */ /*---------------------------- 0.25<|x|< 0.855469---------------------- */ else if (k < 0x3feb6000) { @@ -137,7 +143,8 @@ __sin(double x){ cor=(ssn+s*ccs-sn*c)+cs*s; res=sn+cor; cor=(sn-res)+cor; - return (res==res+1.096*cor)? res : slow1(x); + retval = (res==res+1.096*cor)? res : slow1(x); + goto ret; } /* else if (k < 0x3feb6000) */ /*----------------------- 0.855469 <|x|<2.426265 ----------------------*/ @@ -163,7 +170,8 @@ __sin(double x){ cor=(ccs-s*ssn-cs*c)-sn*s; res=cs+cor; cor=(cs-res)+cor; - return (res==res+1.020*cor)? ((m>0)?res:-res) : slow2(x); + retval = (res==res+1.020*cor)? ((m>0)?res:-res) : slow2(x); + goto ret; } /* else if (k < 0x400368fd) */ /*-------------------------- 2.426265<|x|< 105414350 ----------------------*/ @@ -189,7 +197,8 @@ __sin(double x){ res = a+t; cor = (a-res)+t; cor = (cor>0)? 1.02*cor+eps : 1.02*cor -eps; - return (res == res + cor)? res : sloww(a,da,x); + retval = (res == res + cor)? res : sloww(a,da,x); + goto ret; } else { if (a>0) @@ -210,7 +219,8 @@ __sin(double x){ res=sn+cor; cor=(sn-res)+cor; cor = (cor>0)? 1.035*cor+eps : 1.035*cor-eps; - return (res==res+cor)? ((m)?res:-res) : sloww1(a,da,x); + retval = (res==res+cor)? ((m)?res:-res) : sloww1(a,da,x); + goto ret; } break; @@ -232,7 +242,8 @@ __sin(double x){ res=cs+cor; cor=(cs-res)+cor; cor = (cor>0)? 1.025*cor+eps : 1.025*cor-eps; - return (res==res+cor)? ((n&2)?-res:res) : sloww2(a,da,x,n); + retval = (res==res+cor)? ((n&2)?-res:res) : sloww2(a,da,x,n); + goto ret; break; @@ -268,7 +279,8 @@ __sin(double x){ res = a+t; cor = (a-res)+t; cor = (cor>0)? 1.02*cor+eps : 1.02*cor -eps; - return (res == res + cor)? res : bsloww(a,da,x,n); + retval = (res == res + cor)? res : bsloww(a,da,x,n); + goto ret; } else { if (a>0) {m=1;t=a;db=da;} @@ -287,7 +299,8 @@ __sin(double x){ res=sn+cor; cor=(sn-res)+cor; cor = (cor>0)? 1.035*cor+eps : 1.035*cor-eps; - return (res==res+cor)? ((m)?res:-res) : bsloww1(a,da,x,n); + retval = (res==res+cor)? ((m)?res:-res) : bsloww1(a,da,x,n); + goto ret; } break; @@ -309,7 +322,8 @@ __sin(double x){ res=cs+cor; cor=(cs-res)+cor; cor = (cor>0)? 1.025*cor+eps : 1.025*cor-eps; - return (res==res+cor)? ((n&2)?-res:res) : bsloww2(a,da,x,n); + retval = (res==res+cor)? ((n&2)?-res:res) : bsloww2(a,da,x,n); + goto ret; break; @@ -323,17 +337,20 @@ __sin(double x){ n = __branred(x,&a,&da); switch (n) { case 0: - if (a*a < 0.01588) return bsloww(a,da,x,n); - else return bsloww1(a,da,x,n); + if (a*a < 0.01588) retval = bsloww(a,da,x,n); + else retval = bsloww1(a,da,x,n); + goto ret; break; case 2: - if (a*a < 0.01588) return bsloww(-a,-da,x,n); - else return bsloww1(-a,-da,x,n); + if (a*a < 0.01588) retval = bsloww(-a,-da,x,n); + else retval = bsloww1(-a,-da,x,n); + goto ret; break; case 1: case 3: - return bsloww2(a,da,x,n); + retval = bsloww2(a,da,x,n); + goto ret; break; } @@ -343,9 +360,13 @@ __sin(double x){ else { if (k == 0x7ff00000 && u.i[LOW_HALF] == 0) __set_errno (EDOM); - return x / x; + retval = x / x; + goto ret; } - return 0; /* unreachable */ + + ret: + libc_feupdateenv (&env); + return retval; } @@ -362,11 +383,16 @@ __cos(double x) mynumber u,v; int4 k,m,n; + fenv_t env; + double retval = 0; + + libc_feholdexcept_setround (&env, FE_TONEAREST); + u.x = x; m = u.i[HIGH_HALF]; k = 0x7fffffff&m; - if (k < 0x3e400000 ) return 1.0; /* |x|<2^-27 => cos(x)=1 */ + if (k < 0x3e400000 ) { retval = 1.0; goto ret; } /* |x|<2^-27 => cos(x)=1 */ else if (k < 0x3feb6000 ) {/* 2^-27 < |x| < 0.855469 */ y=ABS(x); @@ -383,7 +409,8 @@ __cos(double x) cor=(ccs-s*ssn-cs*c)-sn*s; res=cs+cor; cor=(cs-res)+cor; - return (res==res+1.020*cor)? res : cslow2(x); + retval = (res==res+1.020*cor)? res : cslow2(x); + goto ret; } /* else if (k < 0x3feb6000) */ @@ -397,7 +424,8 @@ __cos(double x) res = a+t; cor = (a-res)+t; cor = (cor>0)? 1.02*cor+1.0e-31 : 1.02*cor -1.0e-31; - return (res == res + cor)? res : csloww(a,da,x); + retval = (res == res + cor)? res : csloww(a,da,x); + goto ret; } else { if (a>0) {m=1;t=a;db=da;} @@ -416,7 +444,8 @@ __cos(double x) res=sn+cor; cor=(sn-res)+cor; cor = (cor>0)? 1.035*cor+1.0e-31 : 1.035*cor-1.0e-31; - return (res==res+cor)? ((m)?res:-res) : csloww1(a,da,x); + retval = (res==res+cor)? ((m)?res:-res) : csloww1(a,da,x); + goto ret; } } /* else if (k < 0x400368fd) */ @@ -443,7 +472,8 @@ __cos(double x) res = a+t; cor = (a-res)+t; cor = (cor>0)? 1.02*cor+eps : 1.02*cor -eps; - return (res == res + cor)? res : csloww(a,da,x); + retval = (res == res + cor)? res : csloww(a,da,x); + goto ret; } else { if (a>0) {m=1;t=a;db=da;} @@ -462,7 +492,8 @@ __cos(double x) res=sn+cor; cor=(sn-res)+cor; cor = (cor>0)? 1.035*cor+eps : 1.035*cor-eps; - return (res==res+cor)? ((m)?res:-res) : csloww1(a,da,x); + retval = (res==res+cor)? ((m)?res:-res) : csloww1(a,da,x); + goto ret; } break; @@ -483,7 +514,8 @@ __cos(double x) res=cs+cor; cor=(cs-res)+cor; cor = (cor>0)? 1.025*cor+eps : 1.025*cor-eps; - return (res==res+cor)? ((n)?-res:res) : csloww2(a,da,x,n); + retval = (res==res+cor)? ((n)?-res:res) : csloww2(a,da,x,n); + goto ret; break; @@ -518,7 +550,8 @@ __cos(double x) res = a+t; cor = (a-res)+t; cor = (cor>0)? 1.02*cor+eps : 1.02*cor -eps; - return (res == res + cor)? res : bsloww(a,da,x,n); + retval = (res == res + cor)? res : bsloww(a,da,x,n); + goto ret; } else { if (a>0) {m=1;t=a;db=da;} @@ -537,7 +570,8 @@ __cos(double x) res=sn+cor; cor=(sn-res)+cor; cor = (cor>0)? 1.035*cor+eps : 1.035*cor-eps; - return (res==res+cor)? ((m)?res:-res) : bsloww1(a,da,x,n); + retval = (res==res+cor)? ((m)?res:-res) : bsloww1(a,da,x,n); + goto ret; } break; @@ -558,7 +592,8 @@ __cos(double x) res=cs+cor; cor=(cs-res)+cor; cor = (cor>0)? 1.025*cor+eps : 1.025*cor-eps; - return (res==res+cor)? ((n)?-res:res) : bsloww2(a,da,x,n); + retval = (res==res+cor)? ((n)?-res:res) : bsloww2(a,da,x,n); + goto ret; break; } @@ -570,17 +605,20 @@ __cos(double x) n = __branred(x,&a,&da); switch (n) { case 1: - if (a*a < 0.01588) return bsloww(-a,-da,x,n); - else return bsloww1(-a,-da,x,n); + if (a*a < 0.01588) retval = bsloww(-a,-da,x,n); + else retval = bsloww1(-a,-da,x,n); + goto ret; break; case 3: - if (a*a < 0.01588) return bsloww(a,da,x,n); - else return bsloww1(a,da,x,n); + if (a*a < 0.01588) retval = bsloww(a,da,x,n); + else retval = bsloww1(a,da,x,n); + goto ret; break; case 0: case 2: - return bsloww2(a,da,x,n); + retval = bsloww2(a,da,x,n); + goto ret; break; } @@ -592,10 +630,13 @@ __cos(double x) else { if (k == 0x7ff00000 && u.i[LOW_HALF] == 0) __set_errno (EDOM); - return x / x; /* |x| > 2^1024 */ + retval = x / x; /* |x| > 2^1024 */ + goto ret; } - return 0; + ret: + libc_feupdateenv (&env); + return retval; } /************************************************************************/ diff --git a/sysdeps/ieee754/dbl-64/s_tan.c b/sysdeps/ieee754/dbl-64/s_tan.c index 962a4eba6b..2c26756ff2 100644 --- a/sysdeps/ieee754/dbl-64/s_tan.c +++ b/sysdeps/ieee754/dbl-64/s_tan.c @@ -39,6 +39,8 @@ #include "mpa.h" #include "MathLib.h" #include "math.h" +#include "math_private.h" +#include <fenv.h> #ifndef SECTION # define SECTION @@ -66,21 +68,27 @@ tan(double x) { mp_no mpy; #endif + fenv_t env; + double retval; + int __branred(double, double *, double *); int __mpranred(double, mp_no *, int); + libc_feholdexcept_setround (&env, FE_TONEAREST); + /* x=+-INF, x=NaN */ num.d = x; ux = num.i[HIGH_HALF]; if ((ux&0x7ff00000)==0x7ff00000) { if ((ux&0x7fffffff)==0x7ff00000) __set_errno (EDOM); - return x-x; + retval = x-x; + goto ret; } w=(x<ZERO) ? -x : x; /* (I) The case abs(x) <= 1.259e-8 */ - if (w<=g1.d) return x; + if (w<=g1.d) { retval = x; goto ret; } /* (II) The case 1.259e-8 < abs(x) <= 0.0608 */ if (w<=g2.d) { @@ -88,7 +96,7 @@ tan(double x) { /* First stage */ x2 = x*x; t2 = x*x2*(d3.d+x2*(d5.d+x2*(d7.d+x2*(d9.d+x2*d11.d)))); - if ((y=x+(t2-u1.d*t2)) == x+(t2+u1.d*t2)) return y; + if ((y=x+(t2-u1.d*t2)) == x+(t2+u1.d*t2)) { retval = y; goto ret; } /* Second stage */ c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+ @@ -108,8 +116,9 @@ tan(double x) { MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8) MUL2(x ,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8) ADD2(x ,zero.d,c2,cc2,c1,cc1,t1,t2) - if ((y=c1+(cc1-u2.d*c1)) == c1+(cc1+u2.d*c1)) return y; - return tanMp(x); + if ((y=c1+(cc1-u2.d*c1)) == c1+(cc1+u2.d*c1)) { retval = y; goto ret; } + retval = tanMp(x); + goto ret; } /* (III) The case 0.0608 < abs(x) <= 0.787 */ @@ -120,10 +129,10 @@ tan(double x) { z = w-xfg[i][0].d; z2 = z*z; s = (x<ZERO) ? MONE : ONE; pz = z+z*z2*(e0.d+z2*e1.d); fi = xfg[i][1].d; gi = xfg[i][2].d; t2 = pz*(gi+fi)/(gi-pz); - if ((y=fi+(t2-fi*u3.d))==fi+(t2+fi*u3.d)) return (s*y); + if ((y=fi+(t2-fi*u3.d))==fi+(t2+fi*u3.d)) { retval = (s*y); goto ret; } t3 = (t2<ZERO) ? -t2 : t2; t4 = fi*ua3.d+t3*ub3.d; - if ((y=fi+(t2-t4))==fi+(t2+t4)) return (s*y); + if ((y=fi+(t2-t4))==fi+(t2+t4)) { retval = (s*y); goto ret; } /* Second stage */ ffi = xfg[i][3].d; @@ -141,8 +150,9 @@ tan(double x) { SUB2(one.d,zero.d,c3,cc3,c1,cc1,t1,t2) DIV2(c2,cc2,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c3+(cc3-u4.d*c3))==c3+(cc3+u4.d*c3)) return (s*y); - return tanMp(x); + if ((y=c3+(cc3-u4.d*c3))==c3+(cc3+u4.d*c3)) { retval = (s*y); goto ret; } + retval = tanMp(x); + goto ret; } /* (---) The case 0.787 < abs(x) <= 25 */ @@ -160,7 +170,7 @@ tan(double x) { else {ya= a; yya= da; sy= ONE;} /* (IV),(V) The case 0.787 < abs(x) <= 25, abs(y) <= 1e-7 */ - if (ya<=gy1.d) return tanMp(x); + if (ya<=gy1.d) { retval = tanMp(x); goto ret; } /* (VI) The case 0.787 < abs(x) <= 25, 1e-7 < abs(y) <= 0.0608 */ if (ya<=gy2.d) { @@ -170,10 +180,10 @@ tan(double x) { /* First stage -cot */ EADD(a,t2,b,db) DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c+(dc-u6.d*c))==c+(dc+u6.d*c)) return (-y); } + if ((y=c+(dc-u6.d*c))==c+(dc+u6.d*c)) { retval = (-y); goto ret; } } else { /* First stage tan */ - if ((y=a+(t2-u5.d*a))==a+(t2+u5.d*a)) return y; } + if ((y=a+(t2-u5.d*a))==a+(t2+u5.d*a)) { retval = y; goto ret; } } /* Second stage */ /* Range reduction by algorithm ii */ t = (x*hpinv.d + toint.d); @@ -211,11 +221,12 @@ tan(double x) { if (n) { /* Second stage -cot */ DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c2+(cc2-u8.d*c2)) == c2+(cc2+u8.d*c2)) return (-y); } + if ((y=c2+(cc2-u8.d*c2)) == c2+(cc2+u8.d*c2)) { retval = (-y); goto ret; } } else { /* Second stage tan */ - if ((y=c1+(cc1-u7.d*c1)) == c1+(cc1+u7.d*c1)) return y; } - return tanMp(x); + if ((y=c1+(cc1-u7.d*c1)) == c1+(cc1+u7.d*c1)) { retval = y; goto ret; } } + retval = tanMp(x); + goto ret; } /* (VII) The case 0.787 < abs(x) <= 25, 0.0608 < abs(y) <= 0.787 */ @@ -229,17 +240,17 @@ tan(double x) { if (n) { /* -cot */ t2 = pz*(fi+gi)/(fi+pz); - if ((y=gi-(t2-gi*u10.d))==gi-(t2+gi*u10.d)) return (-sy*y); + if ((y=gi-(t2-gi*u10.d))==gi-(t2+gi*u10.d)) { retval = (-sy*y); goto ret; } t3 = (t2<ZERO) ? -t2 : t2; t4 = gi*ua10.d+t3*ub10.d; - if ((y=gi-(t2-t4))==gi-(t2+t4)) return (-sy*y); } + if ((y=gi-(t2-t4))==gi-(t2+t4)) { retval = (-sy*y); goto ret; } } else { /* tan */ t2 = pz*(gi+fi)/(gi-pz); - if ((y=fi+(t2-fi*u9.d))==fi+(t2+fi*u9.d)) return (sy*y); + if ((y=fi+(t2-fi*u9.d))==fi+(t2+fi*u9.d)) { retval = (sy*y); goto ret; } t3 = (t2<ZERO) ? -t2 : t2; t4 = fi*ua9.d+t3*ub9.d; - if ((y=fi+(t2-t4))==fi+(t2+t4)) return (sy*y); } + if ((y=fi+(t2-t4))==fi+(t2+t4)) { retval = (sy*y); goto ret; } } /* Second stage */ ffi = xfg[i][3].d; @@ -260,13 +271,14 @@ tan(double x) { if (n) { /* -cot */ DIV2(c1,cc1,c2,cc2,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c3+(cc3-u12.d*c3))==c3+(cc3+u12.d*c3)) return (-sy*y); } + if ((y=c3+(cc3-u12.d*c3))==c3+(cc3+u12.d*c3)) { retval = (-sy*y); goto ret; } } else { /* tan */ DIV2(c2,cc2,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c3+(cc3-u11.d*c3))==c3+(cc3+u11.d*c3)) return (sy*y); } + if ((y=c3+(cc3-u11.d*c3))==c3+(cc3+u11.d*c3)) { retval = (sy*y); goto ret; } } - return tanMp(x); + retval = tanMp(x); + goto ret; } /* (---) The case 25 < abs(x) <= 1e8 */ @@ -288,7 +300,7 @@ tan(double x) { else {ya= a; yya= da; sy= ONE;} /* (+++) The case 25 < abs(x) <= 1e8, abs(y) <= 1e-7 */ - if (ya<=gy1.d) return tanMp(x); + if (ya<=gy1.d) { retval = tanMp(x); goto ret; } /* (VIII) The case 25 < abs(x) <= 1e8, 1e-7 < abs(y) <= 0.0608 */ if (ya<=gy2.d) { @@ -298,10 +310,10 @@ tan(double x) { /* First stage -cot */ EADD(a,t2,b,db) DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c+(dc-u14.d*c))==c+(dc+u14.d*c)) return (-y); } + if ((y=c+(dc-u14.d*c))==c+(dc+u14.d*c)) { retval = (-y); goto ret; } } else { /* First stage tan */ - if ((y=a+(t2-u13.d*a))==a+(t2+u13.d*a)) return y; } + if ((y=a+(t2-u13.d*a))==a+(t2+u13.d*a)) { retval = y; goto ret; } } /* Second stage */ MUL2(a,da,a,da,x2,xx2,t1,t2,t3,t4,t5,t6,t7,t8) @@ -325,11 +337,12 @@ tan(double x) { if (n) { /* Second stage -cot */ DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c2+(cc2-u16.d*c2)) == c2+(cc2+u16.d*c2)) return (-y); } + if ((y=c2+(cc2-u16.d*c2)) == c2+(cc2+u16.d*c2)) { retval = (-y); goto ret; } } else { /* Second stage tan */ - if ((y=c1+(cc1-u15.d*c1)) == c1+(cc1+u15.d*c1)) return (y); } - return tanMp(x); + if ((y=c1+(cc1-u15.d*c1)) == c1+(cc1+u15.d*c1)) { retval = (y); goto ret; } } + retval = tanMp(x); + goto ret; } /* (IX) The case 25 < abs(x) <= 1e8, 0.0608 < abs(y) <= 0.787 */ @@ -342,17 +355,17 @@ tan(double x) { if (n) { /* -cot */ t2 = pz*(fi+gi)/(fi+pz); - if ((y=gi-(t2-gi*u18.d))==gi-(t2+gi*u18.d)) return (-sy*y); + if ((y=gi-(t2-gi*u18.d))==gi-(t2+gi*u18.d)) { retval = (-sy*y); goto ret; } t3 = (t2<ZERO) ? -t2 : t2; t4 = gi*ua18.d+t3*ub18.d; - if ((y=gi-(t2-t4))==gi-(t2+t4)) return (-sy*y); } + if ((y=gi-(t2-t4))==gi-(t2+t4)) { retval = (-sy*y); goto ret; } } else { /* tan */ t2 = pz*(gi+fi)/(gi-pz); - if ((y=fi+(t2-fi*u17.d))==fi+(t2+fi*u17.d)) return (sy*y); + if ((y=fi+(t2-fi*u17.d))==fi+(t2+fi*u17.d)) { retval = (sy*y); goto ret; } t3 = (t2<ZERO) ? -t2 : t2; t4 = fi*ua17.d+t3*ub17.d; - if ((y=fi+(t2-t4))==fi+(t2+t4)) return (sy*y); } + if ((y=fi+(t2-t4))==fi+(t2+t4)) { retval = (sy*y); goto ret; } } /* Second stage */ ffi = xfg[i][3].d; @@ -373,12 +386,13 @@ tan(double x) { if (n) { /* -cot */ DIV2(c1,cc1,c2,cc2,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c3+(cc3-u20.d*c3))==c3+(cc3+u20.d*c3)) return (-sy*y); } + if ((y=c3+(cc3-u20.d*c3))==c3+(cc3+u20.d*c3)) { retval = (-sy*y); goto ret; } } else { /* tan */ DIV2(c2,cc2,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c3+(cc3-u19.d*c3))==c3+(cc3+u19.d*c3)) return (sy*y); } - return tanMp(x); + if ((y=c3+(cc3-u19.d*c3))==c3+(cc3+u19.d*c3)) { retval = (sy*y); goto ret; } } + retval = tanMp(x); + goto ret; } /* (---) The case 1e8 < abs(x) < 2**1024 */ @@ -389,7 +403,7 @@ tan(double x) { else {ya= a; yya= da; sy= ONE;} /* (+++) The case 1e8 < abs(x) < 2**1024, abs(y) <= 1e-7 */ - if (ya<=gy1.d) return tanMp(x); + if (ya<=gy1.d) { retval = tanMp(x); goto ret; } /* (X) The case 1e8 < abs(x) < 2**1024, 1e-7 < abs(y) <= 0.0608 */ if (ya<=gy2.d) { @@ -399,10 +413,10 @@ tan(double x) { /* First stage -cot */ EADD(a,t2,b,db) DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c+(dc-u22.d*c))==c+(dc+u22.d*c)) return (-y); } + if ((y=c+(dc-u22.d*c))==c+(dc+u22.d*c)) { retval = (-y); goto ret; } } else { /* First stage tan */ - if ((y=a+(t2-u21.d*a))==a+(t2+u21.d*a)) return y; } + if ((y=a+(t2-u21.d*a))==a+(t2+u21.d*a)) { retval = y; goto ret; } } /* Second stage */ /* Reduction by algorithm iv */ @@ -431,11 +445,12 @@ tan(double x) { if (n) { /* Second stage -cot */ DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c2+(cc2-u24.d*c2)) == c2+(cc2+u24.d*c2)) return (-y); } + if ((y=c2+(cc2-u24.d*c2)) == c2+(cc2+u24.d*c2)) { retval = (-y); goto ret; } } else { /* Second stage tan */ - if ((y=c1+(cc1-u23.d*c1)) == c1+(cc1+u23.d*c1)) return y; } - return tanMp(x); + if ((y=c1+(cc1-u23.d*c1)) == c1+(cc1+u23.d*c1)) { retval = y; goto ret; } } + retval = tanMp(x); + goto ret; } /* (XI) The case 1e8 < abs(x) < 2**1024, 0.0608 < abs(y) <= 0.787 */ @@ -448,17 +463,17 @@ tan(double x) { if (n) { /* -cot */ t2 = pz*(fi+gi)/(fi+pz); - if ((y=gi-(t2-gi*u26.d))==gi-(t2+gi*u26.d)) return (-sy*y); + if ((y=gi-(t2-gi*u26.d))==gi-(t2+gi*u26.d)) { retval = (-sy*y); goto ret; } t3 = (t2<ZERO) ? -t2 : t2; t4 = gi*ua26.d+t3*ub26.d; - if ((y=gi-(t2-t4))==gi-(t2+t4)) return (-sy*y); } + if ((y=gi-(t2-t4))==gi-(t2+t4)) { retval = (-sy*y); goto ret; } } else { /* tan */ t2 = pz*(gi+fi)/(gi-pz); - if ((y=fi+(t2-fi*u25.d))==fi+(t2+fi*u25.d)) return (sy*y); + if ((y=fi+(t2-fi*u25.d))==fi+(t2+fi*u25.d)) { retval = (sy*y); goto ret; } t3 = (t2<ZERO) ? -t2 : t2; t4 = fi*ua25.d+t3*ub25.d; - if ((y=fi+(t2-t4))==fi+(t2+t4)) return (sy*y); } + if ((y=fi+(t2-t4))==fi+(t2+t4)) { retval = (sy*y); goto ret; } } /* Second stage */ ffi = xfg[i][3].d; @@ -479,14 +494,18 @@ tan(double x) { if (n) { /* -cot */ DIV2(c1,cc1,c2,cc2,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c3+(cc3-u28.d*c3))==c3+(cc3+u28.d*c3)) return (-sy*y); } + if ((y=c3+(cc3-u28.d*c3))==c3+(cc3+u28.d*c3)) { retval = (-sy*y); goto ret; } } else { /* tan */ DIV2(c2,cc2,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) - if ((y=c3+(cc3-u27.d*c3))==c3+(cc3+u27.d*c3)) return (sy*y); } - return tanMp(x); -} + if ((y=c3+(cc3-u27.d*c3))==c3+(cc3+u27.d*c3)) { retval = (sy*y); goto ret; } } + retval = tanMp(x); + goto ret; + ret: + libc_feupdateenv (&env); + return retval; +} /* multiple precision stage */ /* Convert x to multi precision number,compute tan(x) by mptan() routine */ diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbln.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbln.c index d6b97b5483..1d0da687c1 100644 --- a/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbln.c +++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbln.c @@ -39,11 +39,13 @@ __scalbln (double x, long int n) k = ((ix >> 52) & 0x7ff) - 54; } if (__builtin_expect(k==0x7ff, 0)) return x+x; /* NaN or Inf */ - k = k+n; - if (__builtin_expect(n> 50000 || k > 0x7fe, 0)) - return huge*__copysign(huge,x); /* overflow */ if (__builtin_expect(n< -50000, 0)) return tiny*__copysign(tiny,x); /*underflow*/ + if (__builtin_expect(n> 50000 || k+n > 0x7fe, 0)) + return huge*__copysign(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (__builtin_expect(k > 0, 1)) /* normal result */ {INSERT_WORDS64(x,(ix&UINT64_C(0x800fffffffffffff))|(k<<52)); return x;} diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c index 7f0e21f646..e183c3875f 100644 --- a/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c +++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c @@ -39,11 +39,13 @@ __scalbn (double x, int n) k = ((ix >> 52) & 0x7ff) - 54; } if (__builtin_expect(k==0x7ff, 0)) return x+x; /* NaN or Inf */ - k = k+n; - if (__builtin_expect(n> 50000 || k > 0x7fe, 0)) - return huge*__copysign(huge,x); /* overflow */ if (__builtin_expect(n< -50000, 0)) return tiny*__copysign(tiny,x); /*underflow*/ + if (__builtin_expect(n> 50000 || k+n > 0x7fe, 0)) + return huge*__copysign(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (__builtin_expect(k > 0, 1)) /* normal result */ {INSERT_WORDS64(x,(ix&UINT64_C(0x800fffffffffffff))|(k<<52)); return x;} diff --git a/sysdeps/ieee754/flt-32/s_erff.c b/sysdeps/ieee754/flt-32/s_erff.c index 576618309b..8a0610d5c5 100644 --- a/sysdeps/ieee754/flt-32/s_erff.c +++ b/sysdeps/ieee754/flt-32/s_erff.c @@ -200,7 +200,7 @@ float __erfcf(float x) sb5+s*(sb6+s*sb7)))))); } GET_FLOAT_WORD(ix,x); - SET_FLOAT_WORD(z,ix&0xfffff000); + SET_FLOAT_WORD(z,ix&0xffffe000); r = __ieee754_expf(-z*z-(float)0.5625)* __ieee754_expf((z-x)*(z+x)+R/S); if(hx>0) return r/x; else return two-r/x; diff --git a/sysdeps/ieee754/flt-32/s_scalblnf.c b/sysdeps/ieee754/flt-32/s_scalblnf.c index 5256c32592..2a2d7ab651 100644 --- a/sysdeps/ieee754/flt-32/s_scalblnf.c +++ b/sysdeps/ieee754/flt-32/s_scalblnf.c @@ -35,11 +35,13 @@ __scalblnf (float x, long int n) k = ((ix&0x7f800000)>>23) - 25; } if (__builtin_expect(k==0xff, 0)) return x+x; /* NaN or Inf */ - k = k+n; - if (__builtin_expect(n> 50000 || k > 0xfe, 0)) - return huge*copysignf(huge,x); /* overflow */ if (__builtin_expect(n< -50000, 0)) return tiny*copysignf(tiny,x); /*underflow*/ + if (__builtin_expect(n> 50000 || k+n > 0xfe, 0)) + return huge*copysignf(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (__builtin_expect(k > 0, 1)) /* normal result */ {SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;} if (k <= -25) diff --git a/sysdeps/ieee754/flt-32/s_scalbnf.c b/sysdeps/ieee754/flt-32/s_scalbnf.c index 3be2925a03..a7cb1a1a49 100644 --- a/sysdeps/ieee754/flt-32/s_scalbnf.c +++ b/sysdeps/ieee754/flt-32/s_scalbnf.c @@ -35,11 +35,13 @@ __scalbnf (float x, int n) k = ((ix&0x7f800000)>>23) - 25; } if (__builtin_expect(k==0xff, 0)) return x+x; /* NaN or Inf */ - k = k+n; - if (__builtin_expect(n> 50000 || k > 0xfe, 0)) - return huge*__copysignf(huge,x); /* overflow */ if (__builtin_expect(n< -50000, 0)) return tiny*__copysignf(tiny,x); /*underflow*/ + if (__builtin_expect(n> 50000 || k+n > 0xfe, 0)) + return huge*__copysignf(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (__builtin_expect(k > 0, 1)) /* normal result */ {SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;} if (k <= -25) diff --git a/sysdeps/ieee754/ldbl-128/s_scalblnl.c b/sysdeps/ieee754/ldbl-128/s_scalblnl.c index f5624e2a73..9ad976bb11 100644 --- a/sysdeps/ieee754/ldbl-128/s_scalblnl.c +++ b/sysdeps/ieee754/ldbl-128/s_scalblnl.c @@ -46,10 +46,12 @@ long double __scalblnl (long double x, long int n) k = ((hx>>48)&0x7fff) - 114; } if (k==0x7fff) return x+x; /* NaN or Inf */ - k = k+n; - if (n> 50000 || k > 0x7ffe) - return huge*__copysignl(huge,x); /* overflow */ if (n< -50000) return tiny*__copysignl(tiny,x); /*underflow*/ + if (n> 50000 || k+n > 0x7ffe) + return huge*__copysignl(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (k > 0) /* normal result */ {SET_LDOUBLE_MSW64(x,(hx&0x8000ffffffffffffULL)|(k<<48)); return x;} if (k <= -114) diff --git a/sysdeps/ieee754/ldbl-128/s_scalbnl.c b/sysdeps/ieee754/ldbl-128/s_scalbnl.c index b9de0f74fc..a928ecccec 100644 --- a/sysdeps/ieee754/ldbl-128/s_scalbnl.c +++ b/sysdeps/ieee754/ldbl-128/s_scalbnl.c @@ -46,10 +46,12 @@ long double __scalbnl (long double x, int n) k = ((hx>>48)&0x7fff) - 114; } if (k==0x7fff) return x+x; /* NaN or Inf */ - k = k+n; - if (n> 50000 || k > 0x7ffe) - return huge*__copysignl(huge,x); /* overflow */ if (n< -50000) return tiny*__copysignl(tiny,x); /*underflow*/ + if (n> 50000 || k+n > 0x7ffe) + return huge*__copysignl(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (k > 0) /* normal result */ {SET_LDOUBLE_MSW64(x,(hx&0x8000ffffffffffffULL)|(k<<48)); return x;} if (k <= -114) diff --git a/sysdeps/ieee754/ldbl-128ibm/e_coshl.c b/sysdeps/ieee754/ldbl-128ibm/e_coshl.c index ebc9436396..569b8418bf 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_coshl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_coshl.c @@ -20,9 +20,9 @@ * 2*exp(x) * * exp(x) + 1/exp(x) - * ln2/2 <= x <= 22 : cosh(x) := ------------------- + * ln2/2 <= x <= 40 : cosh(x) := ------------------- * 2 - * 22 <= x <= lnovft : cosh(x) := exp(x)/2 + * 40 <= x <= lnovft : cosh(x) := exp(x)/2 * lnovft <= x <= ln2ovft: cosh(x) := exp(x/2)/2 * exp(x/2) * ln2ovft < x : cosh(x) := huge*huge (overflow) * @@ -57,13 +57,13 @@ __ieee754_coshl (long double x) return one+(t*t)/(w+w); } - /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */ - if (ix < 0x4036000000000000LL) { + /* |x| in [0.5*ln2,40], return (exp(|x|)+1/exp(|x|)/2; */ + if (ix < 0x4044000000000000LL) { t = __ieee754_expl(fabsl(x)); return half*t+half/t; } - /* |x| in [22, log(maxdouble)] return half*exp(|x|) */ + /* |x| in [40, log(maxdouble)] return half*exp(|x|) */ if (ix < 0x40862e42fefa39efLL) return half*__ieee754_expl(fabsl(x)); /* |x| in [log(maxdouble), overflowthresold] */ diff --git a/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c b/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c index b8e86b1a6b..4b53d90c93 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c @@ -16,10 +16,10 @@ * 1. Replace x by |x| (sinh(-x) = -sinh(x)). * 2. * E + E/(E+1) - * 0 <= x <= 22 : sinh(x) := --------------, E=expm1(x) + * 0 <= x <= 40 : sinh(x) := --------------, E=expm1(x) * 2 * - * 22 <= x <= lnovft : sinh(x) := exp(x)/2 + * 40 <= x <= lnovft : sinh(x) := exp(x)/2 * lnovft <= x <= ln2ovft: sinh(x) := exp(x/2)/2 * exp(x/2) * ln2ovft < x : sinh(x) := x*shuge (overflow) * @@ -48,8 +48,8 @@ __ieee754_sinhl(long double x) h = 0.5; if (jx<0) h = -h; - /* |x| in [0,22], return sign(x)*0.5*(E+E/(E+1))) */ - if (ix < 0x4036000000000000LL) { /* |x|<22 */ + /* |x| in [0,40], return sign(x)*0.5*(E+E/(E+1))) */ + if (ix < 0x4044000000000000LL) { /* |x|<40 */ if (ix<0x3e20000000000000LL) /* |x|<2**-29 */ if(shuge+x>one) return x;/* sinhl(tiny) = tiny with inexact */ t = __expm1l(fabsl(x)); @@ -57,7 +57,7 @@ __ieee754_sinhl(long double x) return h*(t+t/(t+one)); } - /* |x| in [22, log(maxdouble)] return 0.5*exp(|x|) */ + /* |x| in [40, log(maxdouble)] return 0.5*exp(|x|) */ if (ix < 0x40862e42fefa39efLL) return h*__ieee754_expl(fabsl(x)); /* |x| in [log(maxdouble), overflowthresold] */ diff --git a/sysdeps/ieee754/ldbl-128ibm/s_erfl.c b/sysdeps/ieee754/ldbl-128ibm/s_erfl.c index 85cdbe0ff8..8868f7e1cf 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_erfl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_erfl.c @@ -920,7 +920,8 @@ __erfcl (long double x) } u.value = x; u.parts32.w3 = 0; - u.parts32.w2 &= 0xffffe000; + u.parts32.w2 = 0; + u.parts32.w1 &= 0xf8000000; z = u.value; r = __ieee754_expl (-z * z - 0.5625) * __ieee754_expl ((z - x) * (z + x) + p); diff --git a/sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c b/sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c index a1632e77fc..2c30d1c78a 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c @@ -52,10 +52,12 @@ long double __scalblnl (long double x, long int n) k = ((hx>>52)&0x7ff) - 54; } else if (k==0x7ff) return x+x; /* NaN or Inf */ - k = k+n; - if (n> 50000 || k > 0x7fe) - return huge*__copysignl(huge,x); /* overflow */ if (n< -50000) return tiny*__copysignl(tiny,x); /*underflow */ + if (n> 50000 || k+n > 0x7fe) + return huge*__copysignl(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (k > 0) { /* normal result */ hx = (hx&0x800fffffffffffffULL)|(k<<52); if ((lx & 0x7fffffffffffffffULL) == 0) { /* low part +-0 */ diff --git a/sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c b/sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c index a52cd42f0b..48102efcf5 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c @@ -52,10 +52,12 @@ long double __scalbnl (long double x, int n) k = ((hx>>52)&0x7ff) - 54; } else if (k==0x7ff) return x+x; /* NaN or Inf */ - k = k+n; - if (n> 50000 || k > 0x7fe) - return huge*__copysignl(huge,x); /* overflow */ if (n< -50000) return tiny*__copysignl(tiny,x); /*underflow */ + if (n> 50000 || k+n > 0x7fe) + return huge*__copysignl(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (k > 0) { /* normal result */ hx = (hx&0x800fffffffffffffULL)|(k<<52); if ((lx & 0x7fffffffffffffffULL) == 0) { /* low part +-0 */ diff --git a/sysdeps/ieee754/ldbl-96/s_scalblnl.c b/sysdeps/ieee754/ldbl-96/s_scalblnl.c index ada587b9d5..755a212555 100644 --- a/sysdeps/ieee754/ldbl-96/s_scalblnl.c +++ b/sysdeps/ieee754/ldbl-96/s_scalblnl.c @@ -43,11 +43,13 @@ __scalblnl (long double x, long int n) k = (hx&0x7fff) - 63; } if (__builtin_expect(k==0x7fff, 0)) return x+x; /* NaN or Inf */ - k = k+n; - if (__builtin_expect(n> 50000 || k > 0x7ffe, 0)) - return huge*__copysignl(huge,x); /* overflow */ if (__builtin_expect(n< -50000, 0)) return tiny*__copysignl(tiny,x); + if (__builtin_expect(n> 50000 || k+n > 0x7ffe, 0)) + return huge*__copysignl(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (__builtin_expect(k > 0, 1)) /* normal result */ {SET_LDOUBLE_EXP(x,(es&0x8000)|k); return x;} if (k <= -63) diff --git a/sysdeps/ieee754/ldbl-96/s_scalbnl.c b/sysdeps/ieee754/ldbl-96/s_scalbnl.c index 6a41920aca..6946cf232f 100644 --- a/sysdeps/ieee754/ldbl-96/s_scalbnl.c +++ b/sysdeps/ieee754/ldbl-96/s_scalbnl.c @@ -43,11 +43,13 @@ __scalbnl (long double x, int n) k = (hx&0x7fff) - 64; } if (__builtin_expect(k==0x7fff, 0)) return x+x; /* NaN or Inf */ - k = k+n; - if (__builtin_expect(n> 50000 || k > 0x7ffe, 0)) - return huge*__copysignl(huge,x); /* overflow */ if (__builtin_expect(n< -50000, 0)) return tiny*__copysignl(tiny,x); + if (__builtin_expect(n> 50000 || k+n > 0x7ffe, 0)) + return huge*__copysignl(huge,x); /* overflow */ + /* Now k and n are bounded we know that k = k+n does not + overflow. */ + k = k+n; if (__builtin_expect(k > 0, 1)) /* normal result */ {SET_LDOUBLE_EXP(x,(es&0x8000)|k); return x;} if (k <= -64) diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps index 589bae1227..f3d4dd994a 100644 --- a/sysdeps/powerpc/fpu/libm-test-ulps +++ b/sysdeps/powerpc/fpu/libm-test-ulps @@ -32,9 +32,26 @@ float: 1 ifloat: 1 # cabs +Test "cabs (-0.75 + 12.390625 i) == 12.4133028598606664302388810868156657": +float: 1 +ifloat: 1 +Test "cabs (-0.75 - 12.390625 i) == 12.4133028598606664302388810868156657": +float: 1 +ifloat: 1 +Test "cabs (-12.390625 + 0.75 i) == 12.4133028598606664302388810868156657": +float: 1 +ifloat: 1 +Test "cabs (-12.390625 - 0.75 i) == 12.4133028598606664302388810868156657": +float: 1 +ifloat: 1 Test "cabs (0.75 + 1.25 i) == 1.45773797371132511771853821938639577": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 +Test "cabs (0.75 + 12.390625 i) == 12.4133028598606664302388810868156657": +float: 1 +ifloat: 1 # cacosh Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": @@ -172,8 +189,8 @@ ifloat: 3 ildouble: 1 ldouble: 1 Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": -float: 1 -ifloat: 1 +float: 2 +ifloat: 2 ildouble: 2 ldouble: 2 Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": @@ -195,6 +212,9 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": +double: 1 +idouble: 1 Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": double: 1 float: 5 @@ -262,8 +282,8 @@ ifloat: 1 ildouble: 1 ldouble: 1 Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": -float: 1 -ifloat: 1 +float: 2 +ifloat: 2 ildouble: 3 ldouble: 3 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": @@ -315,6 +335,152 @@ float: 1 idouble: 1 ifloat: 1 +# cos_downward +Test "cos_downward (1) == 0.5403023058681397174009366074429766037323": +float: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 +Test "cos_downward (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_downward (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +Test "cos_downward (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +Test "cos_downward (4) == -0.6536436208636119146391681830977503814241": +float: 1 +ifloat: 1 +Test "cos_downward (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_downward (6) == 0.9601702866503660205456522979229244054519": +ildouble: 1 +ldouble: 1 +Test "cos_downward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_downward (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "cos_downward (9) == -0.9111302618846769883682947111811653112463": +ildouble: 1 +ldouble: 1 + +# cos_tonearest +Test "cos_tonearest (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 + +# cos_towardzero +Test "cos_towardzero (1) == 0.5403023058681397174009366074429766037323": +ildouble: 2 +ldouble: 2 +Test "cos_towardzero (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +Test "cos_towardzero (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +Test "cos_towardzero (4) == -0.6536436208636119146391681830977503814241": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_towardzero (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_towardzero (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# cos_upward +Test "cos_upward (1) == 0.5403023058681397174009366074429766037323": +ildouble: 2 +ldouble: 2 +Test "cos_upward (10) == -0.8390715290764524522588639478240648345199": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (4) == -0.6536436208636119146391681830977503814241": +ildouble: 1 +ldouble: 1 +Test "cos_upward (5) == 0.2836621854632262644666391715135573083344": +ildouble: 1 +ldouble: 1 +Test "cos_upward (6) == 0.9601702866503660205456522979229244054519": +float: 1 +ifloat: 1 +Test "cos_upward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (9) == -0.9111302618846769883682947111811653112463": +float: 2 +ifloat: 2 + +# cosh_downward +Test "cosh_downward (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_downward (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_downward (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cosh_tonearest +Test "cosh_tonearest (24) == 13244561064.92173614708845674912733665919": +ildouble: 1 +ldouble: 1 + +# cosh_towardzero +Test "cosh_towardzero (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_towardzero (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_towardzero (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cosh_upward +Test "cosh_upward (22) == 1792456423.065795780980053377632656584997": +ildouble: 2 +ldouble: 2 +Test "cosh_upward (23) == 4872401723.124451300068625740569997090344": +ildouble: 2 +ldouble: 2 +Test "cosh_upward (24) == 13244561064.92173614708845674912733665919": +ildouble: 2 +ldouble: 2 + # cpow Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": float: 1 @@ -322,8 +488,8 @@ ifloat: 1 ildouble: 1 ldouble: 1 Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": -float: 1 -ifloat: 1 +float: 2 +ifloat: 2 ildouble: 1 ldouble: 1 Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": @@ -331,14 +497,22 @@ double: 1 float: 4 idouble: 1 ifloat: 4 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": +float: 1 +ifloat: 1 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": +float: 1 +ifloat: 1 ildouble: 2 ldouble: 2 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": double: 2 -float: 3 +float: 4 idouble: 2 -ifloat: 3 +ifloat: 4 +Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": +float: 1 +ifloat: 1 Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": ildouble: 1 ldouble: 1 @@ -381,9 +555,21 @@ ldouble: 1 Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 +Test "Imaginary part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 +Test "Imaginary part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (0 - 1 i) == M_SQRT_2_2 - M_SQRT_2_2 i": +double: 1 +idouble: 1 +Test "Imaginary part of: csqrt (0 - 1 i) == M_SQRT_2_2 - M_SQRT_2_2 i": +double: 1 +idouble: 1 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": @@ -422,6 +608,15 @@ idouble: 1 Test "erfc (0.75) == 0.288844366346484868401062165408589223": float: 1 ifloat: 1 +Test "erfc (0x1.f7303cp+1) == 2.705500297238986897105236321218861842255e-8": +double: 1 +idouble: 1 +Test "erfc (0x1.ffa002p+2) == 1.233585992097580296336099501489175967033e-29": +float: 1 +ifloat: 1 +Test "erfc (0x1.ffff56789abcdef0123456789a8p+2) == 1.123161416304655390092138725253789378459e-29": +ildouble: 1 +ldouble: 1 Test "erfc (2.0) == 0.00467773498104726583793074363274707139": double: 1 idouble: 1 @@ -465,6 +660,33 @@ Test "exp2 (10) == 1024": ildouble: 2 ldouble: 2 +# exp_downward +Test "exp_downward (2) == e^2": +float: 1 +ifloat: 1 +Test "exp_downward (3) == e^3": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_towardzero +Test "exp_towardzero (2) == e^2": +float: 1 +ifloat: 1 +Test "exp_towardzero (3) == e^3": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_upward +Test "exp_upward (1) == e": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + # expm1 Test "expm1 (0.75) == 1.11700001661267466854536981983709561": double: 1 @@ -477,31 +699,49 @@ ifloat: 1 # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "hypot (0.75, 1.25) == 1.45773797371132511771853821938639577": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": +double: 1 float: 1 +idouble: 1 ifloat: 1 Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": +double: 1 float: 1 +idouble: 1 ifloat: 1 # j0 @@ -520,7 +760,9 @@ ifloat: 1 ildouble: 1 ldouble: 1 Test "j0 (2.0) == 0.223890779141235668051827454649948626": +double: 1 float: 2 +idouble: 1 ifloat: 2 Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 @@ -530,7 +772,9 @@ ifloat: 2 ildouble: 1 ldouble: 1 Test "j0 (8.0) == 0.171650807137553906090869407851972001": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 @@ -566,7 +810,9 @@ ifloat: 1 ildouble: 1 ldouble: 1 Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": +double: 1 float: 2 +idouble: 1 ifloat: 2 Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 @@ -576,7 +822,9 @@ ifloat: 2 ildouble: 1 ldouble: 1 Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 @@ -612,7 +860,9 @@ Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": ildouble: 1 ldouble: 1 Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": +double: 2 float: 1 +idouble: 2 ifloat: 1 ildouble: 4 ldouble: 4 @@ -693,9 +943,9 @@ ifloat: 2 ildouble: 4 ldouble: 4 Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 ildouble: 7 ldouble: 7 @@ -734,11 +984,124 @@ Test "log2 (e) == M_LOG2El": ildouble: 1 ldouble: 1 +# pow_downward +Test "pow_downward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +ildouble: 1 +ldouble: 1 +Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_towardzero +Test "pow_towardzero (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +ildouble: 1 +ldouble: 1 +Test "pow_towardzero (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_upward +Test "pow_upward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +float: 1 +ifloat: 1 +Test "pow_upward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +ildouble: 1 +ldouble: 1 + # sin Test "sin (16.0) == -0.2879033166650652947844562482186175296207": ildouble: 2 ldouble: 2 +# sin_downward +Test "sin_downward (1) == 0.8414709848078965066525023216302989996226": +ildouble: 4 +ldouble: 4 +Test "sin_downward (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_downward (2) == 0.9092974268256816953960198659117448427023": +ildouble: 1 +ldouble: 1 +Test "sin_downward (3) == 0.1411200080598672221007448028081102798469": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "sin_downward (4) == -0.7568024953079282513726390945118290941359": +ildouble: 1 +ldouble: 1 +Test "sin_downward (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_downward (6) == -0.2794154981989258728115554466118947596280": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "sin_downward (8) == 0.9893582466233817778081235982452886721164": +ildouble: 1 +ldouble: 1 + +# sin_tonearest +Test "sin_tonearest (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 + +# sin_towardzero +Test "sin_towardzero (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "sin_towardzero (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_towardzero (2) == 0.9092974268256816953960198659117448427023": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_towardzero (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_towardzero (8) == 0.9893582466233817778081235982452886721164": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sin_upward +Test "sin_upward (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "sin_upward (2) == 0.9092974268256816953960198659117448427023": +float: 2 +ifloat: 2 +Test "sin_upward (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_upward (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_upward (6) == -0.2794154981989258728115554466118947596280": +ildouble: 1 +ldouble: 1 +Test "sin_upward (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 + # sincos Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 @@ -764,6 +1127,52 @@ Test "sinh (0.75) == 0.822316731935829980703661634446913849": ildouble: 1 ldouble: 1 +# sinh_downward +Test "sinh_downward (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "sinh_downward (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_downward (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sinh_towardzero +Test "sinh_towardzero (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "sinh_towardzero (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_towardzero (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sinh_upward +Test "sinh_upward (23) == 4872401723.124451299966006944252978187305": +ildouble: 1 +ldouble: 1 +Test "sinh_upward (24) == 13244561064.92173614705070540368454568168": +ildouble: 1 +ldouble: 1 + +# sqrt +Test "sqrt (0.75) == 0.866025403784438646763723170752936183": +double: 1 +idouble: 1 +Test "sqrt (2) == M_SQRT2l": +double: 1 +idouble: 1 + # tan Test "tan (pi/4) == 1": double: 1 @@ -771,6 +1180,102 @@ idouble: 1 ildouble: 1 ldouble: 1 +# tan_downward +Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "tan_downward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "tan_downward (2) == -2.1850398632615189916433061023136825434320": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (6) == -0.2910061913847491570536995888681755428312": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (8) == -6.7997114552203786999252627596086333648814": +float: 1 +ifloat: 1 +Test "tan_downward (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# tan_tonearest +Test "tan_tonearest (10) == 0.6483608274590866712591249330098086768169": +ildouble: 1 +ldouble: 1 +Test "tan_tonearest (4) == 1.1578212823495775831373424182673239231198": +ildouble: 1 +ldouble: 1 +Test "tan_tonearest (7) == 0.8714479827243187364564508896003135663222": +ildouble: 1 +ldouble: 1 + +# tan_towardzero +Test "tan_towardzero (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "tan_towardzero (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "tan_towardzero (4) == 1.1578212823495775831373424182673239231198": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (5) == -3.3805150062465856369827058794473439087096": +float: 1 +ifloat: 1 +Test "tan_towardzero (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (7) == 0.8714479827243187364564508896003135663222": +ildouble: 2 +ldouble: 2 +Test "tan_towardzero (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# tan_upward +Test "tan_upward (10) == 0.6483608274590866712591249330098086768169": +ildouble: 1 +ldouble: 1 +Test "tan_upward (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 +Test "tan_upward (5) == -3.3805150062465856369827058794473439087096": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_upward (7) == 0.8714479827243187364564508896003135663222": +ildouble: 1 +ldouble: 1 +Test "tan_upward (9) == -0.4523156594418098405903708757987855343087": +ildouble: 1 +ldouble: 1 + # tanh Test "tanh (-0.75) == -0.635148952387287319214434357312496495": ildouble: 1 @@ -846,7 +1351,7 @@ ifloat: 1 ildouble: 2 ldouble: 2 Test "y1 (2.0) == -0.107032431540937546888370772277476637": -double: 1 +double: 2 float: 1 idouble: 2 ifloat: 2 @@ -908,9 +1413,9 @@ ifloat: 1 ildouble: 2 ldouble: 2 Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": -double: 1 +double: 2 float: 1 -idouble: 1 +idouble: 2 ifloat: 1 Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": double: 1 @@ -989,6 +1494,8 @@ float: 1 ifloat: 1 Function: "cabs": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1111,8 +1618,8 @@ ildouble: 1 ldouble: 1 Function: Real part of "clog": -float: 1 -ifloat: 1 +float: 2 +ifloat: 2 ildouble: 2 ldouble: 2 @@ -1123,16 +1630,18 @@ ildouble: 1 ldouble: 1 Function: Real part of "clog10": -float: 1 -ifloat: 1 +double: 1 +float: 2 +idouble: 1 +ifloat: 2 ildouble: 3 ldouble: 3 Function: Imaginary part of "clog10": double: 1 -float: 5 +float: 1 idouble: 1 -ifloat: 5 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1144,10 +1653,54 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "cos_downward": +float: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: "cos_tonearest": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "cos_upward": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + Function: "cosh": ildouble: 1 ldouble: 1 +Function: "cosh_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cosh_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "cosh_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cosh_upward": +ildouble: 2 +ldouble: 2 + Function: Real part of "cpow": double: 2 float: 5 @@ -1187,12 +1740,18 @@ ildouble: 1 ldouble: 1 Function: Real part of "csqrt": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1252,6 +1811,28 @@ Function: "exp2": ildouble: 2 ldouble: 2 +Function: "exp_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "exp_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp_upward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "expm1": double: 1 float: 1 @@ -1263,7 +1844,9 @@ ildouble: 1 ldouble: 1 Function: "hypot": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 @@ -1326,10 +1909,52 @@ Function: "pow": ildouble: 1 ldouble: 1 +Function: "pow_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_upward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "sin": ildouble: 1 ldouble: 1 +Function: "sin_downward": +float: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: "sin_tonearest": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "sin_upward": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + Function: "sincos": double: 1 float: 1 @@ -1342,12 +1967,58 @@ Function: "sinh": ildouble: 1 ldouble: 1 +Function: "sinh_downward": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "sinh_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "sinh_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "sinh_upward": +ildouble: 1 +ldouble: 1 + +Function: "sqrt": +double: 1 +idouble: 1 + Function: "tan": double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Function: "tan_downward": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "tan_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "tan_towardzero": +float: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: "tan_upward": +float: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + Function: "tanh": ildouble: 1 ldouble: 1 diff --git a/sysdeps/sparc/crti.S b/sysdeps/sparc/crti.S index caed362293..7aa54537da 100644 --- a/sysdeps/sparc/crti.S +++ b/sysdeps/sparc/crti.S @@ -71,15 +71,9 @@ _init: save %sp, -STACKFRAME_SIZE, %sp #if PREINIT_FUNCTION_WEAK SETUP_PIC_REG(l7) -#ifdef HAVE_BINUTILS_GOTDATA sethi %gdop_hix22(PREINIT_FUNCTION), %g1 xor %g1, %gdop_lox10(PREINIT_FUNCTION), %g1 GOT_LOAD [%l7 + %g1], %g1, %gdop(PREINIT_FUNCTION) -#else - sethi %hi(PREINIT_FUNCTION), %g1 - or %g1, %lo(PREINIT_FUNCTION), %g1 - GOT_LOAD [%l7 + %g1], %g1 -#endif cmp %g1, 0 be 1f nop diff --git a/sysdeps/sparc/elf/configure b/sysdeps/sparc/elf/configure index a2545403ef..3553444177 100644 --- a/sysdeps/sparc/elf/configure +++ b/sysdeps/sparc/elf/configure @@ -137,45 +137,6 @@ if test $libc_cv_sparc_tls = no; then as_fn_error $? "the assembler must support TLS" "$LINENO" 5 fi -# Check for GOTDATA relocation support in assembler and linker. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc binutils GOTDATA reloc support" >&5 -$as_echo_n "checking for sparc binutils GOTDATA reloc support... " >&6; } -if ${libc_cv_sparc_gotdata+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.S <<\EOF - .data - .globl data -data: .word 0 - .text - .globl foo -foo: sethi %gdop_hix22(data), %g1 - xor %g1, %gdop_lox10(data), %g1 -#ifdef __arch64__ - ldx [%l7 + %g1], %g1, %gdop(data) -#else - ld [%l7 + %g1], %g1, %gdop(data) -#endif -EOF -if { ac_try='${CC-cc} -c $CFLAGS conftest.S 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - libc_cv_sparc_gotdata=yes -else - libc_cv_sparc_gotdata=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparc_gotdata" >&5 -$as_echo "$libc_cv_sparc_gotdata" >&6; } -if test $libc_cv_sparc_gotdata = yes; then - $as_echo "#define HAVE_BINUTILS_GOTDATA 1" >>confdefs.h - -fi - # Check for a GCC emitting GOTDATA relocations. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc gcc GOTDATA reloc support" >&5 $as_echo_n "checking for sparc gcc GOTDATA reloc support... " >&6; } @@ -210,8 +171,7 @@ if test $libc_cv_sparc_gcc_gotdata = yes; then fi -if test $libc_cv_sparc_gcc_gotdata = yes \ - && test $libc_cv_sparc_gotdata = yes; then +if test $libc_cv_sparc_gcc_gotdata = yes; then $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h fi diff --git a/sysdeps/sparc/elf/configure.in b/sysdeps/sparc/elf/configure.in index 1a2f61a90c..ec683455c7 100644 --- a/sysdeps/sparc/elf/configure.in +++ b/sysdeps/sparc/elf/configure.in @@ -46,35 +46,6 @@ if test $libc_cv_sparc_tls = no; then AC_MSG_ERROR([the assembler must support TLS]) fi -# Check for GOTDATA relocation support in assembler and linker. -AC_CACHE_CHECK(for sparc binutils GOTDATA reloc support, libc_cv_sparc_gotdata, [dnl -changequote(,)dnl -cat > conftest.S <<\EOF - .data - .globl data -data: .word 0 - .text - .globl foo -foo: sethi %gdop_hix22(data), %g1 - xor %g1, %gdop_lox10(data), %g1 -#ifdef __arch64__ - ldx [%l7 + %g1], %g1, %gdop(data) -#else - ld [%l7 + %g1], %g1, %gdop(data) -#endif -EOF -changequote([,])dnl -dnl -if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.S 1>&AS_MESSAGE_LOG_FD); then - libc_cv_sparc_gotdata=yes -else - libc_cv_sparc_gotdata=no -fi -rm -f conftest*]) -if test $libc_cv_sparc_gotdata = yes; then - AC_DEFINE(HAVE_BINUTILS_GOTDATA) -fi - # Check for a GCC emitting GOTDATA relocations. AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl changequote(,)dnl @@ -99,7 +70,6 @@ if test $libc_cv_sparc_gcc_gotdata = yes; then AC_DEFINE(HAVE_GCC_GOTDATA) fi -if test $libc_cv_sparc_gcc_gotdata = yes \ - && test $libc_cv_sparc_gotdata = yes; then +if test $libc_cv_sparc_gcc_gotdata = yes; then AC_DEFINE(PI_STATIC_AND_HIDDEN) fi diff --git a/sysdeps/sparc/sparc32/fpu/libm-test-ulps b/sysdeps/sparc/fpu/libm-test-ulps index 91e6760d52..178c1971b1 100644 --- a/sysdeps/sparc/sparc32/fpu/libm-test-ulps +++ b/sysdeps/sparc/fpu/libm-test-ulps @@ -312,6 +312,131 @@ ifloat: 1 ildouble: 1 ldouble: 1 +# cos_downward +Test "cos_downward (1) == 0.5403023058681397174009366074429766037323": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_downward (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (4) == -0.6536436208636119146391681830977503814241": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (6) == 0.9601702866503660205456522979229244054519": +ildouble: 1 +ldouble: 1 +Test "cos_downward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# cos_tonearest +Test "cos_tonearest (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 + +# cos_towardzero +Test "cos_towardzero (1) == 0.5403023058681397174009366074429766037323": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (4) == -0.6536436208636119146391681830977503814241": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (6) == 0.9601702866503660205456522979229244054519": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# cos_upward +Test "cos_upward (10) == -0.8390715290764524522588639478240648345199": +float: 1 +ifloat: 1 +Test "cos_upward (6) == 0.9601702866503660205456522979229244054519": +float: 1 +ifloat: 1 +Test "cos_upward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_upward (9) == -0.9111302618846769883682947111811653112463": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# cosh_downward +Test "cosh_downward (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +Test "cosh_downward (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +Test "cosh_downward (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 + +# cosh_towardzero +Test "cosh_towardzero (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +Test "cosh_towardzero (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +Test "cosh_towardzero (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 + # cpow Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": float: 1 @@ -436,6 +561,17 @@ double: 1 idouble: 1 # erfc +Test "erfc (0x1.f7303cp+1) == 2.705500297238986897105236321218861842255e-8": +double: 1 +idouble: 1 +Test "erfc (0x1.ffa002p+2) == 1.233585992097580296336099501489175967033e-29": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "erfc (0x1.ffffc8p+2) == 1.122671365033056305522366683719541099329e-29": +ildouble: 1 +ldouble: 1 Test "erfc (2.0) == 0.00467773498104726583793074363274707139": double: 1 idouble: 1 @@ -470,6 +606,37 @@ Test "exp2 (10) == 1024": ildouble: 2 ldouble: 2 +# exp_downward +Test "exp_downward (2) == e^2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "exp_downward (3) == e^3": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_towardzero +Test "exp_towardzero (2) == e^2": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "exp_towardzero (3) == e^3": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_upward +Test "exp_upward (1) == e": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + # expm1 Test "expm1 (0.75) == 1.11700001661267466854536981983709561": double: 1 @@ -773,6 +940,131 @@ Test "log2 (0.75) == -.415037499278843818546261056052183492": ildouble: 1 ldouble: 1 +# pow_downward +Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_towardzero +Test "pow_towardzero (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 + +# pow_upward +Test "pow_upward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +float: 1 +ifloat: 1 + +# sin_downward +Test "sin_downward (1) == 0.8414709848078965066525023216302989996226": +ildouble: 1 +ldouble: 1 +Test "sin_downward (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_downward (2) == 0.9092974268256816953960198659117448427023": +ildouble: 1 +ldouble: 1 +Test "sin_downward (3) == 0.1411200080598672221007448028081102798469": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (4) == -0.7568024953079282513726390945118290941359": +ildouble: 1 +ldouble: 1 +Test "sin_downward (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (6) == -0.2794154981989258728115554466118947596280": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (8) == 0.9893582466233817778081235982452886721164": +ildouble: 1 +ldouble: 1 + +# sin_tonearest +Test "sin_tonearest (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_tonearest (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_tonearest (6) == -0.2794154981989258728115554466118947596280": +ildouble: 1 +ldouble: 1 +Test "sin_tonearest (9) == 0.4121184852417565697562725663524351793439": +ildouble: 1 +ldouble: 1 + +# sin_towardzero +Test "sin_towardzero (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_towardzero (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_towardzero (2) == 0.9092974268256816953960198659117448427023": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_towardzero (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (6) == -0.2794154981989258728115554466118947596280": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (8) == 0.9893582466233817778081235982452886721164": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# sin_upward +Test "sin_upward (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_upward (10) == -0.5440211108893698134047476618513772816836": +ildouble: 1 +ldouble: 1 +Test "sin_upward (2) == 0.9092974268256816953960198659117448427023": +float: 2 +ifloat: 2 +Test "sin_upward (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_upward (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_upward (7) == 0.6569865987187890903969990915936351779369": +ildouble: 1 +ldouble: 1 +Test "sin_upward (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + # sincos Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 @@ -799,6 +1091,28 @@ Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646763723170752936 float: 1 ifloat: 1 +# sinh_downward +Test "sinh_downward (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +Test "sinh_downward (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_downward (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 + +# sinh_towardzero +Test "sinh_towardzero (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +Test "sinh_towardzero (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_towardzero (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 + # sqrt Test "sqrt (2) == M_SQRT2l": ildouble: 1 @@ -809,6 +1123,92 @@ Test "tan (pi/4) == 1": double: 1 idouble: 1 +# tan_downward +Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_downward (2) == -2.1850398632615189916433061023136825434320": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (6) == -0.2910061913847491570536995888681755428312": +float: 1 +ifloat: 1 +Test "tan_downward (8) == -6.7997114552203786999252627596086333648814": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 + +# tan_towardzero +Test "tan_towardzero (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_towardzero (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (4) == 1.1578212823495775831373424182673239231198": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (5) == -3.3805150062465856369827058794473439087096": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# tan_upward +Test "tan_upward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +Test "tan_upward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (2) == -2.1850398632615189916433061023136825434320": +ildouble: 1 +ldouble: 1 +Test "tan_upward (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (4) == 1.1578212823495775831373424182673239231198": +ildouble: 1 +ldouble: 1 +Test "tan_upward (5) == -3.3805150062465856369827058794473439087096": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_upward (9) == -0.4523156594418098405903708757987855343087": +ildouble: 1 +ldouble: 1 + # tanh Test "tanh (-0.75) == -0.635148952387287319214434357312496495": ildouble: 1 @@ -1161,6 +1561,36 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "cos_downward": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "cos_tonearest": +float: 1 +ifloat: 1 + +Function: "cos_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "cos_upward": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "cosh_downward": +float: 1 +ifloat: 1 + +Function: "cosh_towardzero": +float: 1 +ifloat: 1 + Function: Real part of "cpow": double: 2 float: 4 @@ -1239,7 +1669,9 @@ idouble: 1 Function: "erfc": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1255,6 +1687,24 @@ Function: "exp2": ildouble: 2 ldouble: 2 +Function: "exp_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp_upward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "expm1": double: 1 float: 1 @@ -1321,6 +1771,42 @@ Function: "log2": ildouble: 1 ldouble: 1 +Function: "pow_downward": +float: 1 +ifloat: 1 + +Function: "pow_towardzero": +float: 1 +ifloat: 1 + +Function: "pow_upward": +float: 1 +ifloat: 1 + +Function: "sin_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_tonearest": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "sin_upward": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + Function: "sincos": double: 1 float: 1 @@ -1329,6 +1815,14 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "sinh_downward": +float: 1 +ifloat: 1 + +Function: "sinh_towardzero": +float: 1 +ifloat: 1 + Function: "sqrt": ildouble: 1 ldouble: 1 @@ -1337,6 +1831,24 @@ Function: "tan": double: 1 idouble: 1 +Function: "tan_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "tan_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "tan_upward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "tanh": ildouble: 1 ldouble: 1 diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h index 7ea97fbffd..1620ca54df 100644 --- a/sysdeps/sparc/sparc32/dl-machine.h +++ b/sysdeps/sparc/sparc32/dl-machine.h @@ -216,17 +216,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ -#ifdef HAVE_BINUTILS_GOTDATA #define RTLD_GOT_ADDRESS(pic_reg, reg, symbol) \ "sethi %gdop_hix22(" #symbol "), " #reg "\n\t" \ "xor " #reg ", %gdop_lox10(" #symbol "), " #reg "\n\t" \ "ld [" #pic_reg " + " #reg "], " #reg ", %gdop(" #symbol ")" -#else -#define RTLD_GOT_ADDRESS(pic_reg, reg, symbol) \ - "sethi %hi(" #symbol "), " #reg "\n\t" \ - "or " #reg ", %lo(" #symbol "), " #reg "\n\t" \ - "ld [" #pic_reg " + " #reg "], " #reg -#endif #define RTLD_START __asm__ ("\ .text\n\ diff --git a/sysdeps/sparc/sparc32/elf/start.S b/sysdeps/sparc/sparc32/elf/start.S index 0426714c5e..1efa8e8393 100644 --- a/sysdeps/sparc/sparc32/elf/start.S +++ b/sysdeps/sparc/sparc32/elf/start.S @@ -66,7 +66,6 @@ _start: or %o3, %lo(__libc_csu_init), %o3 or %o4, %lo(__libc_csu_fini), %o4 #else -#ifdef HAVE_BINUTILS_GOTDATA sethi %gdop_hix22(main), %o0 sethi %gdop_hix22(__libc_csu_init), %o3 sethi %gdop_hix22(__libc_csu_fini), %o4 @@ -76,17 +75,6 @@ _start: ld [%l7 + %o0], %o0, %gdop(main) ld [%l7 + %o3], %o3, %gdop(__libc_csu_init) ld [%l7 + %o4], %o4, %gdop(__libc_csu_fini) -#else - sethi %hi(main), %o0 - sethi %hi(__libc_csu_init), %o3 - sethi %hi(__libc_csu_fini), %o4 - or %o0, %lo(main), %o0 - or %o3, %lo(__libc_csu_init), %o3 - or %o4, %lo(__libc_csu_fini), %o4 - ld [%l7 + %o0], %o0 - ld [%l7 + %o3], %o3 - ld [%l7 + %o4], %o4 -#endif #endif /* When starting a binary via the dynamic linker, %g1 contains the diff --git a/sysdeps/sparc/sparc32/fpu/s_copysign.S b/sysdeps/sparc/sparc32/fpu/s_copysign.S new file mode 100644 index 0000000000..18c44c5d3c --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/s_copysign.S @@ -0,0 +1,31 @@ +/* copysign function, sparc32 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2012. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__copysign) + sethi %hi(0x80000000), %g1 + and %o2, %g1, %o4 + andn %o0, %g1, %o0 + or %o0, %o4, %o0 + std %o0, [%sp + 72] + retl + ldd [%sp + 72], %f0 +END (__copysign) +weak_alias (__copysign, copysign) \ No newline at end of file diff --git a/sysdeps/sparc/sparc32/fpu/s_copysignf.S b/sysdeps/sparc/sparc32/fpu/s_copysignf.S new file mode 100644 index 0000000000..7753c35e87 --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/s_copysignf.S @@ -0,0 +1,31 @@ +/* float copysign function, sparc32 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2012. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__copysignf) + sethi %hi(0x80000000), %g1 + and %o1, %g1, %o4 + andn %o0, %g1, %o0 + or %o0, %o4, %o0 + st %o0, [%sp + 68] + retl + ld [%sp + 68], %f0 +END (__copysignf) +weak_alias (__copysignf, copysignf) \ No newline at end of file diff --git a/sysdeps/sparc/sparc32/fpu/s_signbit.S b/sysdeps/sparc/sparc32/fpu/s_signbit.S new file mode 100644 index 0000000000..3756bf431a --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/s_signbit.S @@ -0,0 +1,32 @@ +/* signbit(). sparc32 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__signbit) + retl + srl %o0, 31, %o0 +END (__signbit) +weak_alias (__signbit, signbit) + +/* On 32-bit the double version will also always work for + single-precision since in both cases the word with the + sign bit in it is passed always in register %o0. */ +strong_alias (__signbit, __signbitf) +hidden_def (__signbitf) +weak_alias (__signbitf, signbitf) diff --git a/sysdeps/sparc/sparc32/fpu/s_signbitf.S b/sysdeps/sparc/sparc32/fpu/s_signbitf.S new file mode 100644 index 0000000000..91886af6d5 --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/s_signbitf.S @@ -0,0 +1 @@ +/* signbitf is implemented in s_signbit.S */ \ No newline at end of file diff --git a/sysdeps/sparc/sparc32/fpu/s_signbitl.S b/sysdeps/sparc/sparc32/fpu/s_signbitl.S new file mode 100644 index 0000000000..2feaee0361 --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/s_signbitl.S @@ -0,0 +1,32 @@ +/* signbitl(). sparc32 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> +#include <math_ldbl_opt.h> + +ENTRY (___signbitl) + ld [%o0], %o1 + retl + srl %o1, 31, %o0 +END (___signbitl) + +#ifdef IS_IN_libm +long_double_symbol (libm, ___signbitl, __signbitl); +#else +long_double_symbol (libc, ___signbitl, __signbitl); +#endif diff --git a/sysdeps/sparc/sparc32/fpu/w_sqrt.S b/sysdeps/sparc/sparc32/fpu/w_sqrt.S new file mode 100644 index 0000000000..667c71c625 --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/w_sqrt.S @@ -0,0 +1,53 @@ +/* sqrt function. sparc32 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__sqrt) + clr %g1 + std %g0, [%sp + 72] + std %o0, [%sp + 80] + ldd [%sp + 72], %f8 + ldd [%sp + 80], %f0 + fcmpd %f0, %f8 + fbl 1f + nop +8: retl + fsqrtd %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be 8b + mov %o0, %o2 + mov %o1, %o3 + mov 26, %o4 + mov %o7, %g1 + call __kernel_standard + mov %g1, %o7 +END (__sqrt) + +weak_alias (__sqrt, sqrt) diff --git a/sysdeps/sparc/sparc32/fpu/w_sqrtf.S b/sysdeps/sparc/sparc32/fpu/w_sqrtf.S new file mode 100644 index 0000000000..5260bec373 --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/w_sqrtf.S @@ -0,0 +1,51 @@ +/* sqrtf function. sparc32 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__sqrtf) + st %g0, [%sp + 68] + st %o0, [%sp + 72] + ld [%sp + 68], %f8 + ld [%sp + 72], %f0 + fcmps %f0, %f8 + fbl 1f + nop +8: retl + fsqrts %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be 8b + mov %o0, %o1 + mov 126, %o2 + mov %o7, %g1 + call __kernel_standard_f + mov %g1, %o7 +END (__sqrtf) + +weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S new file mode 100644 index 0000000000..3122528a06 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S @@ -0,0 +1,32 @@ +/* isnan(). sparc32 v9 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__isnan) + sethi %hi(0x7ff00000), %g1 + sllx %o0, 33, %o0 + sllx %g1, 32, %g1 + srlx %o0, 1, %o0 + or %o0, %o1, %o0 + sub %g1, %o0, %o0 + retl + srlx %o0, 63, %o0 +END (__isnan) +hidden_def (__isnan) +weak_alias (__isnan, isnan) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S new file mode 100644 index 0000000000..8ec9b4dcb4 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S @@ -0,0 +1,67 @@ +/* llrint(), sparc32 v9 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2012. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__llrint) + sethi %hi(TWO_FIFTYTWO), %o2 + sllx %o0, 32, %o0 + + or %o0, %o1, %o0 + fzero ZERO + + stx %o0, [%sp + 72] + sllx %o2, 32, %o2 + fnegd ZERO, SIGN_BIT + + ldd [%sp + 72], %f0 + + stx %o2, [%sp + 72] + fabsd %f0, %f14 + + ldd [%sp + 72], %f16 + fcmpd %fcc3, %f14, %f16 + + fmovduge %fcc3, ZERO, %f16 + fand %f0, SIGN_BIT, SIGN_BIT + + for %f16, SIGN_BIT, %f16 + faddd %f0, %f16, %f6 + fsubd %f6, %f16, %f0 + fabsd %f0, %f0 + for %f0, SIGN_BIT, %f0 + fdtox %f0, %f4 + std %f4, [%sp + 72] + retl + ldd [%sp + 72], %o0 +END (__llrint) +weak_alias (__llrint, llrint) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S new file mode 100644 index 0000000000..73e9d64875 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S @@ -0,0 +1,62 @@ +/* llrintf(), sparc32 v9 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2012. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__llrintf) + st %o0, [%sp + 68] + sethi %hi(TWO_TWENTYTHREE), %o2 + fzeros ZERO + + ld [%sp + 68], %f1 + fnegs ZERO, SIGN_BIT + + st %o2, [%sp + 68] + fabss %f1, %f14 + + ld [%sp + 68], %f16 + fcmps %fcc3, %f14, %f16 + + fmovsuge %fcc3, ZERO, %f16 + fands %f1, SIGN_BIT, SIGN_BIT + + fors %f16, SIGN_BIT, %f16 + fadds %f1, %f16, %f5 + fsubs %f5, %f16, %f0 + fabss %f0, %f0 + fors %f0, SIGN_BIT, %f0 + fstox %f0, %f4 + std %f4, [%sp + 72] + retl + ldd [%sp + 72], %o0 +END (__llrintf) +weak_alias (__llrintf, llrintf) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S new file mode 100644 index 0000000000..062faba170 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S @@ -0,0 +1,67 @@ +/* lrint(), sparc32 v9 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2012. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__lrint) + sethi %hi(TWO_FIFTYTWO), %o2 + sllx %o0, 32, %o0 + + or %o0, %o1, %o0 + fzero ZERO + + stx %o0, [%sp + 72] + sllx %o2, 32, %o2 + fnegd ZERO, SIGN_BIT + + ldd [%sp + 72], %f0 + + stx %o2, [%sp + 72] + fabsd %f0, %f14 + + ldd [%sp + 72], %f16 + fcmpd %fcc3, %f14, %f16 + + fmovduge %fcc3, ZERO, %f16 + fand %f0, SIGN_BIT, SIGN_BIT + + for %f16, SIGN_BIT, %f16 + faddd %f0, %f16, %f6 + fsubd %f6, %f16, %f0 + fabsd %f0, %f0 + for %f0, SIGN_BIT, %f0 + fdtoi %f0, %f3 + st %f3, [%sp + 72] + retl + ld [%sp + 72], %o0 +END (__lrint) +weak_alias (__lrint, lrint) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S new file mode 100644 index 0000000000..c546e67c27 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S @@ -0,0 +1,62 @@ +/* lrintf(), sparc32 v9 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2012. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__lrintf) + st %o0, [%sp + 68] + sethi %hi(TWO_TWENTYTHREE), %o2 + fzeros ZERO + + ld [%sp + 68], %f1 + fnegs ZERO, SIGN_BIT + + st %o2, [%sp + 68] + fabss %f1, %f14 + + ld [%sp + 68], %f16 + fcmps %fcc3, %f14, %f16 + + fmovsuge %fcc3, ZERO, %f16 + fands %f1, SIGN_BIT, SIGN_BIT + + fors %f16, SIGN_BIT, %f16 + fadds %f1, %f16, %f5 + fsubs %f5, %f16, %f0 + fabss %f0, %f0 + fors %f0, SIGN_BIT, %f0 + fstoi %f0, %f3 + st %f3, [%sp + 68] + retl + ld [%sp + 68], %o0 +END (__lrintf) +weak_alias (__lrintf, lrintf) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S new file mode 100644 index 0000000000..ce7491e438 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S @@ -0,0 +1,51 @@ +/* sqrt function. sparc32 v9 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__sqrt) + std %o0, [%sp + 80] + fzero %f8 + ldd [%sp + 80], %f0 + fcmpd %f0, %f8 + fbl 1f + nop +8: retl + fsqrtd %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be 8b + mov %o0, %o2 + mov %o1, %o3 + mov 26, %o4 + mov %o7, %g1 + call __kernel_standard + mov %g1, %o7 +END (__sqrt) + +weak_alias (__sqrt, sqrt) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S new file mode 100644 index 0000000000..0e00b66964 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S @@ -0,0 +1,50 @@ +/* sqrtf function. sparc32 v9 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__sqrtf) + st %o0, [%sp + 72] + fzeros %f8 + ld [%sp + 72], %f0 + fcmps %f0, %f8 + fbl 1f + nop +8: retl + fsqrts %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be 8b + mov %o0, %o1 + mov 126, %o2 + mov %o7, %g1 + call __kernel_standard_f + mov %g1, %o7 +END (__sqrtf) + +weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index 6bab5ce310..87655d28ad 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -264,17 +264,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ -#ifdef HAVE_BINUTILS_GOTDATA #define RTLD_GOT_ADDRESS(pic_reg, reg, symbol) \ "sethi %gdop_hix22(" #symbol "), " #reg "\n\t" \ "xor " #reg ", %gdop_lox10(" #symbol "), " #reg "\n\t" \ "ldx [" #pic_reg " + " #reg "], " #reg ", %gdop(" #symbol ")\n" -#else -#define RTLD_GOT_ADDRESS(pic_reg, reg, symbol) \ - "sethi %hi(" #symbol "), " #reg "\n\t" \ - "or " #reg ", %lo(" #symbol "), " #reg "\n\t" \ - "ldx [" #pic_reg " + " #reg "], " #reg "\n" -#endif #define __S1(x) #x #define __S(x) __S1(x) diff --git a/sysdeps/sparc/sparc64/elf/start.S b/sysdeps/sparc/sparc64/elf/start.S index 50f2df2c7e..7924fb4828 100644 --- a/sysdeps/sparc/sparc64/elf/start.S +++ b/sysdeps/sparc/sparc64/elf/start.S @@ -67,7 +67,6 @@ _start: or %o3, %lo(__libc_csu_init), %o3 or %o4, %lo(__libc_csu_fini), %o4 #else -#ifdef HAVE_BINUTILS_GOTDATA sethi %gdop_hix22(main), %o0 sethi %gdop_hix22(__libc_csu_init), %o3 sethi %gdop_hix22(__libc_csu_fini), %o4 @@ -77,17 +76,6 @@ _start: ldx [%l7 + %o0], %o0, %gdop(main) ldx [%l7 + %o3], %o3, %gdop(__libc_csu_init) ldx [%l7 + %o4], %o4, %gdop(__libc_csu_fini) -#else - sethi %hi(main), %o0 - sethi %hi(__libc_csu_init), %o3 - sethi %hi(__libc_csu_fini), %o4 - or %o0, %lo(main), %o0 - or %o3, %lo(__libc_csu_init), %o3 - or %o4, %lo(__libc_csu_fini), %o4 - ldx [%l7 + %o0], %o0 - ldx [%l7 + %o3], %o3 - ldx [%l7 + %o4], %o4 -#endif #endif /* When starting a binary via the dynamic linker, %g1 contains the diff --git a/sysdeps/sparc/sparc64/fpu/libm-test-ulps b/sysdeps/sparc/sparc64/fpu/libm-test-ulps deleted file mode 100644 index 91e6760d52..0000000000 --- a/sysdeps/sparc/sparc64/fpu/libm-test-ulps +++ /dev/null @@ -1,1376 +0,0 @@ -# Begin of automatic generation - -# atan2 -Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112": -float: 6 -ifloat: 6 -ildouble: 1 -ldouble: 1 -Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 -ildouble: 1 -ldouble: 1 -Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025": -float: 3 -ifloat: 3 -ildouble: 1 -ldouble: 1 -Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# atanh -Test "atanh (0.75) == 0.972955074527656652552676371721589865": -float: 1 -ifloat: 1 - -# cacos -Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": -ildouble: 1 -ldouble: 1 - -# cacosh -Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 -float: 7 -idouble: 1 -ifloat: 7 -ildouble: 5 -ldouble: 5 -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": -double: 1 -float: 3 -idouble: 1 -ifloat: 3 -ildouble: 1 -ldouble: 1 - -# casin -Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": -ildouble: 1 -ldouble: 1 - -# casinh -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 5 -float: 1 -idouble: 5 -ifloat: 1 -ildouble: 4 -ldouble: 4 -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 -ildouble: 2 -ldouble: 2 -Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# catan -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -float: 3 -ifloat: 3 -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": -float: 4 -ifloat: 4 -Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": -ildouble: 1 -ldouble: 1 - -# catanh -Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -double: 4 -idouble: 4 -Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -float: 4 -ifloat: 4 -Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": -float: 6 -ifloat: 6 -ildouble: 1 -ldouble: 1 - -# cbrt -Test "cbrt (-0.001) == -0.1": -ildouble: 1 -ldouble: 1 -Test "cbrt (-27.0) == -3.0": -double: 1 -idouble: 1 -Test "cbrt (0.75) == 0.908560296416069829445605878163630251": -double: 1 -idouble: 1 -Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217": -double: 1 -idouble: 1 - -# ccos -Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i": -float: 1 -ifloat: 1 - -# ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i": -float: 1 -ifloat: 1 - -# cexp -Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i": -ildouble: 1 -ldouble: 1 - -# clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -float: 3 -ifloat: 3 -Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# clog10 -Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i": -double: 1 -float: 5 -idouble: 1 -ifloat: 5 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": -double: 1 -idouble: 1 -Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# cos -Test "cos (M_PI_6l * 2.0) == 0.5": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "cos (M_PI_6l * 4.0) == -0.5": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "cos (pi/2) == 0": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# cpow -Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": -float: 1 -ifloat: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 -ildouble: 4 -ldouble: 4 -Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": -ildouble: 2 -ldouble: 2 -Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": -ildouble: 1 -ldouble: 1 -Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i": -double: 2 -float: 3 -idouble: 2 -ifloat: 3 -ildouble: 10 -ldouble: 10 -Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": -ildouble: 2 -ldouble: 2 -Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 -ildouble: 3 -ldouble: 3 -Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": -float: 2 -ifloat: 2 -Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# csin -Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i": -ildouble: 1 -ldouble: 1 -Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i": -ildouble: 1 -ldouble: 1 - -# csinh -Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": -double: 1 -idouble: 1 -Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": -float: 1 -ifloat: 1 -Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": -float: 1 -ifloat: 1 - -# csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i": -ildouble: 1 -ldouble: 1 - -# ctan -Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 - -# ctanh -Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": -float: 1 -ifloat: 1 -Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i": -double: 1 -idouble: 1 - -# erf -Test "erf (1.25) == 0.922900128256458230136523481197281140": -double: 1 -idouble: 1 - -# erfc -Test "erfc (2.0) == 0.00467773498104726583793074363274707139": -double: 1 -idouble: 1 -Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318": -ildouble: 1 -ldouble: 1 -Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": -double: 1 -idouble: 1 - -# exp10 -Test "exp10 (-1) == 0.1": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "exp10 (0.75) == 5.62341325190349080394951039776481231": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "exp10 (3) == 1000": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# exp2 -Test "exp2 (10) == 1024": -ildouble: 2 -ldouble: 2 - -# expm1 -Test "expm1 (0.75) == 1.11700001661267466854536981983709561": -double: 1 -idouble: 1 -Test "expm1 (1) == M_El - 1.0": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# gamma -Test "gamma (-0.5) == log(2*sqrt(pi))": -ildouble: 1 -ldouble: 1 - -# hypot -Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 - -# j0 -Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "j0 (0.75) == 0.864242275166648623555731103820923211": -float: 1 -ifloat: 1 -Test "j0 (10.0) == -0.245935764451348335197760862485328754": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "j0 (2.0) == 0.223890779141235668051827454649948626": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "j0 (8.0) == 0.171650807137553906090869407851972001": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# j1 -Test "j1 (-1.0) == -0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "j1 (0.75) == 0.349243602174862192523281016426251335": -ildouble: 1 -ldouble: 1 -Test "j1 (1.0) == 0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "j1 (10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "j1 (2.0) == 0.576724807756873387202448242269137087": -double: 1 -idouble: 1 -Test "j1 (8.0) == 0.234636346853914624381276651590454612": -double: 1 -idouble: 1 -ildouble: 4 -ldouble: 4 - -# jn -Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": -float: 1 -ifloat: 1 -Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "jn (0, 2.0) == 0.223890779141235668051827454649948626": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (1, -1.0) == -0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "jn (1, 0.75) == 0.349243602174862192523281016426251335": -ildouble: 1 -ldouble: 1 -Test "jn (1, 1.0) == 0.440050585744933515959682203718914913": -ildouble: 1 -ldouble: 1 -Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883": -float: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 -Test "jn (1, 2.0) == 0.576724807756873387202448242269137087": -double: 1 -idouble: 1 -Test "jn (1, 8.0) == 0.234636346853914624381276651590454612": -double: 1 -idouble: 1 -ildouble: 4 -ldouble: 4 -Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9": -ildouble: 1 -ldouble: 1 -Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9": -ildouble: 1 -ldouble: 1 -Test "jn (10, 10.0) == 0.207486106633358857697278723518753428": -double: 4 -float: 3 -idouble: 4 -ifloat: 3 -ildouble: 2 -ldouble: 2 -Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6": -double: 1 -float: 4 -idouble: 1 -ifloat: 4 -Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813": -double: 3 -idouble: 3 -ildouble: 1 -ldouble: 1 -Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2": -double: 4 -float: 3 -idouble: 4 -ifloat: 3 -ildouble: 5 -ldouble: 5 -Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3": -double: 3 -float: 5 -idouble: 3 -ifloat: 5 -ildouble: 3 -ldouble: 3 -Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -ildouble: 8 -ldouble: 8 -Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 3 -ldouble: 3 - -# lgamma -Test "lgamma (-0.5) == log(2*sqrt(pi))": -ildouble: 1 -ldouble: 1 -Test "lgamma (0.7) == 0.260867246531666514385732417016759578": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# log10 -Test "log10 (0.75) == -0.124938736608299953132449886193870744": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -Test "log10 (e) == log10(e)": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -# log1p -Test "log1p (-0.25) == -0.287682072451780927439219005993827432": -float: 1 -ifloat: 1 -Test "log1p (M_El - 1.0) == 1": -ildouble: 1 -ldouble: 1 - -# log2 -Test "log2 (0.75) == -.415037499278843818546261056052183492": -ildouble: 1 -ldouble: 1 - -# sincos -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": -float: 1 -ifloat: 1 - -# sqrt -Test "sqrt (2) == M_SQRT2l": -ildouble: 1 -ldouble: 1 - -# tan -Test "tan (pi/4) == 1": -double: 1 -idouble: 1 - -# tanh -Test "tanh (-0.75) == -0.635148952387287319214434357312496495": -ildouble: 1 -ldouble: 1 -Test "tanh (-1.0) == -0.7615941559557648881194582826047935904": -ildouble: 1 -ldouble: 1 -Test "tanh (0.75) == 0.635148952387287319214434357312496495": -ildouble: 1 -ldouble: 1 -Test "tanh (1.0) == 0.7615941559557648881194582826047935904": -ildouble: 1 -ldouble: 1 - -# tgamma -Test "tgamma (-0.5) == -2 sqrt (pi)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "tgamma (0.5) == sqrt (pi)": -float: 1 -ifloat: 1 -Test "tgamma (0.7) == 1.29805533264755778568117117915281162": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "tgamma (4) == 6": -ildouble: 1 -ldouble: 1 - -# y0 -Test "y0 (1.0) == 0.0882569642156769579829267660235151628": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "y0 (1.5) == 0.382448923797758843955068554978089862": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "y0 (10.0) == 0.0556711672835993914244598774101900481": -float: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 -Test "y0 (8.0) == 0.223521489387566220527323400498620359": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 - -# y1 -Test "y1 (0.125) == -5.19993611253477499595928744876579921": -double: 1 -idouble: 1 -Test "y1 (0.75) == -1.03759455076928541973767132140642198": -ildouble: 1 -ldouble: 1 -Test "y1 (1.5) == -0.412308626973911295952829820633445323": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "y1 (10.0) == 0.249015424206953883923283474663222803": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "y1 (2.0) == -0.107032431540937546888370772277476637": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "y1 (8.0) == -0.158060461731247494255555266187483550": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -# yn -Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "yn (0, 1.5) == 0.382448923797758843955068554978089862": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481": -float: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 -Test "yn (0, 8.0) == 0.223521489387566220527323400498620359": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 -Test "yn (1, 0.125) == -5.19993611253477499595928744876579921": -double: 1 -idouble: 1 -Test "yn (1, 0.75) == -1.03759455076928541973767132140642198": -ildouble: 1 -ldouble: 1 -Test "yn (1, 1.5) == -0.412308626973911295952829820633445323": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (1, 10.0) == 0.249015424206953883923283474663222803": -double: 3 -float: 1 -idouble: 3 -ifloat: 1 -Test "yn (1, 2.0) == -0.107032431540937546888370772277476637": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (1, 8.0) == -0.158060461731247494255555266187483550": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 -Test "yn (10, 0.125) == -127057845771019398.252538486899753195": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 -Test "yn (10, 0.75) == -2133501638.90573424452445412893839236": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 5 -ldouble: 5 -Test "yn (10, 1.0) == -121618014.278689189288130426667971145": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 -Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "yn (10, 2.0) == -129184.542208039282635913145923304214": -double: 2 -idouble: 2 -ildouble: 2 -ldouble: 2 -Test "yn (3, 0.125) == -2612.69757350066712600220955744091741": -double: 1 -idouble: 1 -Test "yn (3, 0.75) == -12.9877176234475433186319774484809207": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 -Test "yn (3, 10.0) == -0.251362657183837329779204747654240998": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "yn (3, 2.0) == -1.12778377684042778608158395773179238": -double: 1 -idouble: 1 - -# Maximal error of functions: -Function: "atan2": -float: 6 -ifloat: 6 -ildouble: 1 -ldouble: 1 - -Function: "atanh": -float: 1 -ifloat: 1 - -Function: Imaginary part of "cacos": -ildouble: 1 -ldouble: 1 - -Function: Real part of "cacosh": -double: 1 -float: 7 -idouble: 1 -ifloat: 7 -ildouble: 5 -ldouble: 5 - -Function: Imaginary part of "cacosh": -double: 1 -float: 3 -idouble: 1 -ifloat: 3 -ildouble: 1 -ldouble: 1 - -Function: Real part of "casin": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Imaginary part of "casin": -ildouble: 1 -ldouble: 1 - -Function: Real part of "casinh": -double: 5 -float: 1 -idouble: 5 -ifloat: 1 -ildouble: 4 -ldouble: 4 - -Function: Imaginary part of "casinh": -double: 3 -float: 6 -idouble: 3 -ifloat: 6 -ildouble: 2 -ldouble: 2 - -Function: Real part of "catan": -float: 4 -ifloat: 4 - -Function: Imaginary part of "catan": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "catanh": -double: 4 -idouble: 4 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "catanh": -float: 6 -ifloat: 6 -ildouble: 1 -ldouble: 1 - -Function: "cbrt": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "ccos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ccos": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "ccosh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ccosh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "cexp": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "cexp": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "clog": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "clog": -float: 3 -ifloat: 3 - -Function: Real part of "clog10": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "clog10": -double: 1 -float: 5 -idouble: 1 -ifloat: 5 -ildouble: 1 -ldouble: 1 - -Function: "cos": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Real part of "cpow": -double: 2 -float: 4 -idouble: 2 -ifloat: 4 -ildouble: 10 -ldouble: 10 - -Function: Imaginary part of "cpow": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: Real part of "csin": -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csin": -ildouble: 1 -ldouble: 1 - -Function: Real part of "csinh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csinh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Real part of "csqrt": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "csqrt": -ildouble: 1 -ldouble: 1 - -Function: Real part of "ctan": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ctan": -double: 1 -idouble: 1 -ildouble: 2 -ldouble: 2 - -Function: Real part of "ctanh": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: Imaginary part of "ctanh": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "erf": -double: 1 -idouble: 1 - -Function: "erfc": -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 - -Function: "exp10": -double: 6 -float: 2 -idouble: 6 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "exp2": -ildouble: 2 -ldouble: 2 - -Function: "expm1": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "gamma": -ildouble: 1 -ldouble: 1 - -Function: "hypot": -float: 1 -ifloat: 1 - -Function: "j0": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 -ildouble: 2 -ldouble: 2 - -Function: "j1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 4 -ldouble: 4 - -Function: "jn": -double: 4 -float: 5 -idouble: 4 -ifloat: 5 -ildouble: 8 -ldouble: 8 - -Function: "lgamma": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "log10": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "log1p": -float: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "log2": -ildouble: 1 -ldouble: 1 - -Function: "sincos": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "sqrt": -ildouble: 1 -ldouble: 1 - -Function: "tan": -double: 1 -idouble: 1 - -Function: "tanh": -ildouble: 1 -ldouble: 1 - -Function: "tgamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 1 -ldouble: 1 - -Function: "y0": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 -ildouble: 3 -ldouble: 3 - -Function: "y1": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -ildouble: 1 -ldouble: 1 - -Function: "yn": -double: 3 -float: 2 -idouble: 3 -ifloat: 2 -ildouble: 5 -ldouble: 5 - -# end of automatic generation diff --git a/sysdeps/sparc/sparc64/fpu/s_copysign.S b/sysdeps/sparc/sparc64/fpu/s_copysign.S new file mode 100644 index 0000000000..571f57cbdc --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_copysign.S @@ -0,0 +1,31 @@ +/* copysign function, sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2012. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__copysign) + sethi %hi(0x80000000), %g1 + st %g1, [%sp + STACK_BIAS + 128] + ld [%sp + STACK_BIAS + 128], %f7 + fands %f2, %f7, %f9 + fandnot2s %f0, %f7, %f0 + retl + fors %f0, %f9, %f0 +END (__copysign) +weak_alias (__copysign, copysign) \ No newline at end of file diff --git a/sysdeps/sparc/sparc64/fpu/s_copysignf.S b/sysdeps/sparc/sparc64/fpu/s_copysignf.S new file mode 100644 index 0000000000..db6a384c60 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_copysignf.S @@ -0,0 +1,31 @@ +/* float copysign function, sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2012. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__copysignf) + sethi %hi(0x80000000), %g1 + st %g1, [%sp + STACK_BIAS + 128] + ld [%sp + STACK_BIAS + 128], %f7 + fands %f3, %f7, %f9 + fandnot2s %f1, %f7, %f1 + retl + fors %f1, %f9, %f0 +END (__copysignf) +weak_alias (__copysignf, copysignf) \ No newline at end of file diff --git a/sysdeps/sparc/sparc64/fpu/s_finite.S b/sysdeps/sparc/sparc64/fpu/s_finite.S new file mode 100644 index 0000000000..f93297e27b --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_finite.S @@ -0,0 +1,31 @@ +/* finite(). sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__finite) + fabsd %f0, %f0 + st %f0, [%sp + STACK_BIAS + 128] + sethi %hi(0x7ff00000), %o2 + ld [%sp + STACK_BIAS + 128], %o0 + sub %o0, %o2, %o0 + retl + srl %o0, 31, %o0 +END (__finite) +hidden_def (__finite) +weak_alias (__finite, finite) diff --git a/sysdeps/sparc/sparc64/fpu/s_finitef.S b/sysdeps/sparc/sparc64/fpu/s_finitef.S new file mode 100644 index 0000000000..2ebac99b34 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_finitef.S @@ -0,0 +1,31 @@ +/* finitef(). sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__finitef) + fabss %f1, %f0 + st %f0, [%sp + STACK_BIAS + 128] + sethi %hi(0x7f800000), %o2 + ld [%sp + STACK_BIAS + 128], %o0 + sub %o0, %o2, %o0 + retl + srl %o0, 31, %o0 +END (__finitef) +hidden_def (__finitef) +weak_alias (__finitef, finitef) diff --git a/sysdeps/sparc/sparc64/fpu/s_isinf.S b/sysdeps/sparc/sparc64/fpu/s_isinf.S new file mode 100644 index 0000000000..20b54c0e1d --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_isinf.S @@ -0,0 +1,34 @@ +/* isinf(). sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__isinf) + std %f0, [%sp + STACK_BIAS + 128] + sethi %hi(0x7ff00000), %o2 + ldx [%sp + STACK_BIAS + 128], %g1 + sllx %o2, 32, %o2 + sllx %g1, 1, %o4 + srlx %o4, 1, %o5 + srax %g1, 62, %o0 + xor %o5, %o2, %o3 + retl + movrne %o3, %g0, %o0 +END (__isinf) +hidden_def (__isinf) +weak_alias (__isinf, isinf) diff --git a/sysdeps/sparc/sparc64/fpu/s_isinff.S b/sysdeps/sparc/sparc64/fpu/s_isinff.S new file mode 100644 index 0000000000..302ff8dba5 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_isinff.S @@ -0,0 +1,33 @@ +/* isinff(). sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__isinff) + st %f1, [%sp + STACK_BIAS + 128] + sethi %hi(0x7f800000), %o2 + lduw [%sp + STACK_BIAS + 128], %g1 + sll %g1, 1, %o4 + srl %o4, 1, %o5 + sra %g1, 30, %o0 + xor %o5, %o2, %o3 + retl + movrne %o3, %g0, %o0 +END (__isinff) +hidden_def (__isinff) +weak_alias (__isinff, isinff) diff --git a/sysdeps/sparc/sparc64/fpu/s_isnan.S b/sysdeps/sparc/sparc64/fpu/s_isnan.S new file mode 100644 index 0000000000..00041caa54 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_isnan.S @@ -0,0 +1,33 @@ +/* isnan(). sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__isnan) + std %f0, [%sp + STACK_BIAS + 128] + sethi %hi(0x7ff00000), %g1 + ldx [%sp + STACK_BIAS + 128], %o0 + sllx %g1, 32, %g1 + sllx %o0, 1, %o0 + srlx %o0, 1, %o0 + sub %g1, %o0, %o0 + retl + srlx %o0, 63, %o0 +END (__isnan) +hidden_def (__isnan) +weak_alias (__isnan, isnan) diff --git a/sysdeps/sparc/sparc64/fpu/s_isnanf.S b/sysdeps/sparc/sparc64/fpu/s_isnanf.S new file mode 100644 index 0000000000..f82c8194c5 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_isnanf.S @@ -0,0 +1,32 @@ +/* isnanf(). sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__isnanf) + st %f1, [%sp + STACK_BIAS + 128] + sethi %hi(0x7f800000), %g1 + lduw [%sp + STACK_BIAS + 128], %o0 + sll %o0, 1, %o0 + srl %o0, 1, %o0 + sub %g1, %o0, %o0 + retl + srl %o0, 31, %o0 +END (__isnanf) +hidden_def (__isnanf) +weak_alias (__isnanf, isnanf) diff --git a/sysdeps/sparc/sparc64/fpu/s_llrint.S b/sysdeps/sparc/sparc64/fpu/s_llrint.S new file mode 100644 index 0000000000..7c8e941b77 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_llrint.S @@ -0,0 +1 @@ +/* llrint is implemented in s_lrint.S */ diff --git a/sysdeps/sparc/sparc64/fpu/s_llrintf.S b/sysdeps/sparc/sparc64/fpu/s_llrintf.S new file mode 100644 index 0000000000..abab3b9a2b --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_llrintf.S @@ -0,0 +1 @@ +/* llrintf is implemented in s_lrint.S */ diff --git a/sysdeps/sparc/sparc64/fpu/s_lrint.S b/sysdeps/sparc/sparc64/fpu/s_lrint.S new file mode 100644 index 0000000000..6bf56e4d06 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_lrint.S @@ -0,0 +1,63 @@ +/* lrint(), sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2012. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__lrint) + sethi %hi(TWO_FIFTYTWO), %o2 + sllx %o2, 32, %o2 + fzero ZERO + + fnegd ZERO, SIGN_BIT + stx %o2, [%sp + STACK_BIAS + 128] + fabsd %f0, %f14 + + ldd [%sp + STACK_BIAS + 128], %f16 + fcmpd %fcc3, %f14, %f16 + + fmovduge %fcc3, ZERO, %f16 + fand %f0, SIGN_BIT, SIGN_BIT + + for %f16, SIGN_BIT, %f16 + faddd %f0, %f16, %f6 + fsubd %f6, %f16, %f0 + fabsd %f0, %f0 + for %f0, SIGN_BIT, %f0 + fdtox %f0, %f4 + std %f4, [%sp + STACK_BIAS + 128] + retl + ldx [%sp + STACK_BIAS + 128], %o0 +END (__lrint) +weak_alias (__lrint, lrint) + +strong_alias (__lrint, __llrint) +weak_alias (__llrint, llrint) diff --git a/sysdeps/sparc/sparc64/fpu/s_lrintf.S b/sysdeps/sparc/sparc64/fpu/s_lrintf.S new file mode 100644 index 0000000000..2f2938b985 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_lrintf.S @@ -0,0 +1,62 @@ +/* lrintf(), sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2012. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__lrintf) + sethi %hi(TWO_TWENTYTHREE), %o2 + fzeros ZERO + + fnegs ZERO, SIGN_BIT + st %o2, [%sp + STACK_BIAS + 128] + fabss %f1, %f14 + + ld [%sp + STACK_BIAS + 128], %f16 + fcmps %fcc3, %f14, %f16 + + fmovsuge %fcc3, ZERO, %f16 + fands %f1, SIGN_BIT, SIGN_BIT + + fors %f16, SIGN_BIT, %f16 + fadds %f1, %f16, %f5 + fsubs %f5, %f16, %f0 + fabss %f0, %f0 + fors %f0, SIGN_BIT, %f0 + fstox %f0, %f4 + std %f4, [%sp + STACK_BIAS + 128] + retl + ldx [%sp + STACK_BIAS + 128], %o0 +END (__lrintf) +weak_alias (__lrintf, lrintf) + +strong_alias (__lrintf, __llrintf) +weak_alias (__llrintf, llrintf) diff --git a/sysdeps/sparc/sparc64/fpu/s_signbit.S b/sysdeps/sparc/sparc64/fpu/s_signbit.S new file mode 100644 index 0000000000..3c1ea000f1 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_signbit.S @@ -0,0 +1,34 @@ +/* signbit(). sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__signbit) + st %f0, [%sp + STACK_BIAS + 128] + ld [%sp + STACK_BIAS + 128], %o0 + retl + srl %o0, 31, %o0 +END (__signbit) +weak_alias (__signbit, signbit) + +/* On 64-bit the double version will also always work for + long-double-precision since in both cases the word with the + sign bit in it is passed always in register %f0. */ +strong_alias (__signbit, __signbitl) +hidden_def (__signbitl) +weak_alias (__signbitl, signbitl) diff --git a/sysdeps/sparc/sparc64/fpu/s_signbitf.S b/sysdeps/sparc/sparc64/fpu/s_signbitf.S new file mode 100644 index 0000000000..d2a7aa5bdd --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_signbitf.S @@ -0,0 +1,27 @@ +/* signbitf(). sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__signbitf) + st %f1, [%sp + STACK_BIAS + 128] + ld [%sp + STACK_BIAS + 128], %o0 + retl + srl %o0, 31, %o0 +END (__signbitf) +weak_alias (__signbitf, signbitf) diff --git a/sysdeps/sparc/sparc64/fpu/s_signbitl.S b/sysdeps/sparc/sparc64/fpu/s_signbitl.S new file mode 100644 index 0000000000..f5e5fb9253 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/s_signbitl.S @@ -0,0 +1 @@ +/* signbitl is implemented in s_signbit.S */ diff --git a/sysdeps/sparc/sparc64/fpu/w_sqrt.S b/sysdeps/sparc/sparc64/fpu/w_sqrt.S new file mode 100644 index 0000000000..dd6039aa75 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/w_sqrt.S @@ -0,0 +1,48 @@ +/* sqrt function. sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__sqrt) + fzero %f8 + fcmpd %fcc2, %f0, %f8 + fbl,pn %fcc2, 1f + nop +8: retl + fsqrtd %f0, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ldx [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be,pt %icc, 8b + fmovd %f0, %f2 + mov 26, %o2 + mov %o7, %g1 + call __kernel_standard + mov %g1, %o7 +END (__sqrt) + +weak_alias (__sqrt, sqrt) diff --git a/sysdeps/sparc/sparc64/fpu/w_sqrtf.S b/sysdeps/sparc/sparc64/fpu/w_sqrtf.S new file mode 100644 index 0000000000..1472e34552 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/w_sqrtf.S @@ -0,0 +1,48 @@ +/* sqrtf function. sparc64 version. + Copyright (C) 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY (__sqrtf) + fzeros %f8 + fcmps %fcc2, %f1, %f8 + fbl,pn %fcc2, 1f + nop +8: retl + fsqrts %f1, %f0 +1: +#ifdef SHARED + SETUP_PIC_REG_LEAF(o5, g1) + sethi %gdop_hix22(_LIB_VERSION), %g1 + xor %g1, %gdop_lox10(_LIB_VERSION), %g1 + ldx [%o5 + %g1], %g1, %gdop(_LIB_VERSION) +#else + sethi %hi(_LIB_VERSION), %g1 + or %g1, %lo(_LIB_VERSION), %g1 +#endif + ld [%g1], %g1 + cmp %g1, -1 + be,pt %icc, 8b + fmovs %f1, %f3 + mov 126, %o2 + mov %o7, %g1 + call __kernel_standard_f + mov %g1, %o7 +END (__sqrtf) + +weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h index 874660be13..780b20ab6a 100644 --- a/sysdeps/unix/sysv/linux/dl-osinfo.h +++ b/sysdeps/unix/sysv/linux/dl-osinfo.h @@ -84,8 +84,8 @@ _dl_setup_stack_chk_guard (void *dl_random) return ret.num; } # endif - ret.bytes[filllen - 2] = 255; - ret.bytes[filllen - 3] = '\n'; + ret.bytes[filllen] = 255; + ret.bytes[filllen - 1] = '\n'; } else #endif diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S b/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S index 7246e893a7..0b3361b0f0 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S @@ -67,15 +67,9 @@ ENTRY (____longjmp_chk) or %o0, %lo(longjmp_msg), %o0 #else SETUP_PIC_REG(l7) -#ifdef HAVE_BINUTILS_GOTDATA sethi %gdop_hix22(longjmp_msg), %o0 xor %o0, %gdop_lox10(longjmp_msg), %o0 ld [%l7 + %o0], %o0, %gdop(longjmp_msg) -#else - sethi %hi(longjmp_msg), %o0 - or %o0, %lo(longjmp_msg), %o0 - ld [%l7 + %o0], %o0 -#endif #endif call HIDDEN_JUMPTARGET(__fortify_fail) nop diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c b/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c deleted file mode 100644 index c30d8e0aaa..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1997, 2002, 2003, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <unistd.h> -#include <sys/param.h> -#include <ldsodefs.h> -#include <sysdep.h> - -/* Return the system page size. This value will either be 4k or 8k depending - on whether or not we are running on Sparc v9 machine. */ - -/* If we are not a static program, this value is collected from the system - via the AT_PAGESZ auxiliary argument. If we are a static program, we - use the getpagesize system call. */ - -int -__getpagesize () -{ - int ret = GLRO(dl_pagesize); - if (ret == 0) - { - INTERNAL_SYSCALL_DECL (err); - ret = INTERNAL_SYSCALL (getpagesize, err, 0); -#ifndef SHARED - GLRO(dl_pagesize) = ret; -#endif - } - return ret; -} -libc_hidden_def (__getpagesize) -weak_alias (__getpagesize, getpagesize) diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h index 3d6042e9ec..3424598566 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h @@ -88,8 +88,7 @@ ENTRY(name); \ mov %g1, %o7; #else # if RTLD_PRIVATE_ERRNO -# ifdef HAVE_BINUTILS_GOTDATA -# define SYSCALL_ERROR_HANDLER \ +# define SYSCALL_ERROR_HANDLER \ 0: SETUP_PIC_REG_LEAF(o2,g1) \ sethi %gdop_hix22(rtld_errno), %g1; \ xor %g1, %gdop_lox10(rtld_errno), %g1;\ @@ -97,16 +96,6 @@ ENTRY(name); \ st %o0, [%g1]; \ jmp %o7 + 8; \ mov -1, %o0; -# else -# define SYSCALL_ERROR_HANDLER \ -0: SETUP_PIC_REG_LEAF(o2,g1) \ - sethi %hi(rtld_errno), %g1; \ - or %g1, %lo(rtld_errno), %g1; \ - ld [%o2 + %g1], %g1; \ - st %o0, [%g1]; \ - jmp %o7 + 8; \ - mov -1, %o0; -# endif # elif defined _LIBC_REENTRANT # ifndef NOT_IN_libc @@ -123,8 +112,7 @@ ENTRY(name); \ jmp %o7 + 8; \ mov -1, %o0; # else -# ifdef HAVE_BINUTILS_GOTDATA -# define SYSCALL_ERROR_HANDLER \ +# define SYSCALL_ERROR_HANDLER \ 0: SETUP_PIC_REG_LEAF(o2,g1) \ sethi %gdop_hix22(errno), %g1;\ xor %g1, %gdop_lox10(errno), %g1;\ @@ -132,16 +120,6 @@ ENTRY(name); \ st %o0, [%g1]; \ jmp %o7 + 8; \ mov -1, %o0; -# else -# define SYSCALL_ERROR_HANDLER \ -0: SETUP_PIC_REG_LEAF(o2,g1) \ - sethi %hi(errno), %g1; \ - or %g1, %lo(errno), %g1; \ - ld [%o2 + %g1], %g1; \ - st %o0, [%g1]; \ - jmp %o7 + 8; \ - mov -1, %o0; -# endif # endif /* _LIBC_REENTRANT */ #endif /* PIC */ diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S index 69cf5acb38..9b4e1e74f8 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S @@ -67,15 +67,9 @@ ENTRY (____longjmp_chk) or %o0, %lo(longjmp_msg), %o0 #else SETUP_PIC_REG(l7) -#ifdef HAVE_BINUTILS_GOTDATA sethi %gdop_hix22(longjmp_msg), %o0 xor %o0, %gdop_lox10(longjmp_msg), %o0 ldx [%l7 + %o0], %o0, %gdop(longjmp_msg) -#else - sethi %hi(longjmp_msg), %o0 - or %o0, %lo(longjmp_msg), %o0 - ldx [%l7 + %o0], %o0 -#endif #endif call HIDDEN_JUMPTARGET(__fortify_fail) nop diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S b/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S index a89d8775e1..14b2967acb 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S @@ -64,15 +64,9 @@ ENTRY (__brk) sethi %hi(__curbrk), %g1 or %g1, %lo(__curbrk), %g1 #else -#ifdef HAVE_BINUTILS_GOTDATA sethi %gdop_hix22(__curbrk), %g1 xor %g1, %gdop_lox10(__curbrk), %g1 ldx [%l7 + %g1], %g1, %gdop(__curbrk) -#else - sethi %hi(__curbrk), %g1 - or %g1, %lo(__curbrk), %g1 - ldx [%l7 + %g1], %g1 -#endif #endif stx %o0, [%g1] mov %g0, %i0 @@ -89,15 +83,9 @@ ENTRY (__brk) sethi %hi(errno), %g1 or %g1, %lo(errno), %g1 #else -#ifdef HAVE_BINUTILS_GOTDATA sethi %gdop_hix22(errno), %g1 xor %g1, %gdop_lox10(errno), %g1 ldx [%l7 + %g1], %g1, %gdop(errno) -#else - sethi %hi(errno), %g1 - or %g1, %lo(errno), %g1 - ldx [%l7 + %g1], %g1 -#endif #endif st %o0, [%g1] #else diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h index 33e1a41165..1bf75973fc 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h @@ -95,8 +95,7 @@ ENTRY(name); \ mov %g1, %o7; #else # if RTLD_PRIVATE_ERRNO -# ifdef HAVE_BINUTILS_GOTDATA -# define SYSCALL_ERROR_HANDLER \ +# define SYSCALL_ERROR_HANDLER \ 0: SETUP_PIC_REG_LEAF(o2,g1) \ sethi %gdop_hix22(rtld_errno), %g1; \ xor %g1, %gdop_lox10(rtld_errno), %g1;\ @@ -104,16 +103,6 @@ ENTRY(name); \ st %o0, [%g1]; \ jmp %o7 + 8; \ mov -1, %o0; -# else -# define SYSCALL_ERROR_HANDLER \ -0: SETUP_PIC_REG_LEAF(o2,g1) \ - sethi %hi(rtld_errno), %g1; \ - or %g1, %lo(rtld_errno), %g1; \ - ldx [%o2 + %g1], %g1; \ - st %o0, [%g1]; \ - jmp %o7 + 8; \ - mov -1, %o0; -# endif # elif defined _LIBC_REENTRANT # ifndef NOT_IN_libc @@ -130,8 +119,7 @@ ENTRY(name); \ jmp %o7 + 8; \ mov -1, %o0; # else -# ifdef HAVE_BINUTILS_GOTDATA -# define SYSCALL_ERROR_HANDLER \ +# define SYSCALL_ERROR_HANDLER \ 0: SETUP_PIC_REG_LEAF(o2,g1) \ sethi %gdop_hix22(errno), %g1;\ xor %g1, %gdop_lox10(errno), %g1;\ @@ -139,16 +127,6 @@ ENTRY(name); \ st %o0, [%g1]; \ jmp %o7 + 8; \ mov -1, %o0; -# else -# define SYSCALL_ERROR_HANDLER \ -0: SETUP_PIC_REG_LEAF(o2,g1) \ - sethi %hi(errno), %g1; \ - or %g1, %lo(errno), %g1; \ - ldx [%o2 + %g1], %g1; \ - st %o0, [%g1]; \ - jmp %o7 + 8; \ - mov -1, %o0; -# endif # endif /* _LIBC_REENTRANT */ #endif /* PIC */ diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c index a13948b10f..e41fddb297 100644 --- a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c @@ -30,7 +30,7 @@ gettimeofday_ifunc (void) PREPARE_VERSION (linux26, "LINUX_2.6", 61765110); /* If the vDSO is not available we fall back on the old vsyscall. */ - return (_dl_vdso_vsym ("gettimeofday", &linux26) + return (_dl_vdso_vsym ("__vdso_gettimeofday", &linux26) ?: (void *) VSYSCALL_ADDR_vgettimeofday); } __asm (".type __gettimeofday, %gnu_indirect_function"); diff --git a/sysdeps/unix/sysv/linux/x86_64/init-first.c b/sysdeps/unix/sysv/linux/x86_64/init-first.c index 0a9948b3fe..e8b52eacb0 100644 --- a/sysdeps/unix/sysv/linux/x86_64/init-first.c +++ b/sysdeps/unix/sysv/linux/x86_64/init-first.c @@ -36,13 +36,13 @@ _libc_vdso_platform_setup (void) { PREPARE_VERSION (linux26, "LINUX_2.6", 61765110); - void *p = _dl_vdso_vsym ("clock_gettime", &linux26); + void *p = _dl_vdso_vsym ("__vdso_clock_gettime", &linux26); if (p == NULL) p = __syscall_clock_gettime; PTR_MANGLE (p); __GI___vdso_clock_gettime = p; - p = _dl_vdso_vsym ("getcpu", &linux26); + p = _dl_vdso_vsym ("__vdso_getcpu", &linux26); /* If the vDSO is not available we fall back on the old vsyscall. */ #define VSYSCALL_ADDR_vgetcpu 0xffffffffff600800 if (p == NULL) diff --git a/sysdeps/unix/sysv/linux/x86_64/time.c b/sysdeps/unix/sysv/linux/x86_64/time.c index 67afff3061..0e05ddd523 100644 --- a/sysdeps/unix/sysv/linux/x86_64/time.c +++ b/sysdeps/unix/sysv/linux/x86_64/time.c @@ -28,7 +28,7 @@ time_ifunc (void) PREPARE_VERSION (linux26, "LINUX_2.6", 61765110); /* If the vDSO is not available we fall back on the old vsyscall. */ - return _dl_vdso_vsym ("time", &linux26) ?: (void *) VSYSCALL_ADDR_vtime; + return _dl_vdso_vsym ("__vdso_time", &linux26) ?: (void *) VSYSCALL_ADDR_vtime; } __asm (".type time, %gnu_indirect_function"); diff --git a/sysdeps/x86_64/bits/atomic.h b/sysdeps/x86_64/bits/atomic.h index 4a0d40b34c..4b8d2ab095 100644 --- a/sysdeps/x86_64/bits/atomic.h +++ b/sysdeps/x86_64/bits/atomic.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2004, 2006, 2007, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -55,41 +55,10 @@ typedef uintmax_t uatomic_max_t; #endif -#if __GNUC_PREREQ (4, 1) -# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ +#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ __sync_val_compare_and_swap (mem, oldval, newval) -# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ +#define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ (! __sync_bool_compare_and_swap (mem, oldval, newval)) -#else -# define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ - ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK_PREFIX "cmpxchgb %b2, %1" \ - : "=a" (ret), "=m" (*mem) \ - : "q" (newval), "m" (*mem), "0" (oldval)); \ - ret; }) - -# define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ - ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK_PREFIX "cmpxchgw %w2, %1" \ - : "=a" (ret), "=m" (*mem) \ - : "r" (newval), "m" (*mem), "0" (oldval)); \ - ret; }) - -# define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ - ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK_PREFIX "cmpxchgl %2, %1" \ - : "=a" (ret), "=m" (*mem) \ - : "r" (newval), "m" (*mem), "0" (oldval)); \ - ret; }) - -# define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ - ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK_PREFIX "cmpxchgq %q2, %1" \ - : "=a" (ret), "=m" (*mem) \ - : "r" ((long int) (newval)), "m" (*mem), \ - "0" ((long int) (oldval))); \ - ret; }) -#endif #define __arch_c_compare_and_exchange_val_8_acq(mem, newval, oldval) \ @@ -184,13 +153,8 @@ typedef uintmax_t uatomic_max_t; "i" (offsetof (tcbhead_t, multiple_threads))); \ result; }) -#if __GNUC_PREREQ (4, 1) -# define atomic_exchange_and_add(mem, value) \ +#define atomic_exchange_and_add(mem, value) \ __sync_fetch_and_add (mem, value) -#else -# define atomic_exchange_and_add(mem, value) \ - __arch_exchange_and_add_body (LOCK_PREFIX, mem, value) -#endif #define __arch_exchange_and_add_cprefix \ "cmpl $0, %%fs:%P4\n\tje 0f\n\tlock\n0:\t" diff --git a/sysdeps/x86_64/fpu/e_expf.S b/sysdeps/x86_64/fpu/e_expf.S new file mode 100644 index 0000000000..f1ce2851b0 --- /dev/null +++ b/sysdeps/x86_64/fpu/e_expf.S @@ -0,0 +1,340 @@ +/* Optimized __ieee754_expf function. + Copyright (C) 2012 Free Software Foundation, Inc. + Contributed by Intel Corporation. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <sysdep.h> + +/* Short algorithm description: + * + * Let K = 64 (table size). + * e^x = 2^(x/log(2)) = 2^n * T[j] * (1 + P(y)) + * where + * x = m*log(2)/K + y, y in [0.0..log(2)/K] + * m = n*K + j, m,n,j - signed integer, j in [0..K-1] + * values of 2^(j/K) are tabulated as T[j]. + * + * P(y) is a minimax polynomial approximation of expf(x)-1 + * on small interval [0.0..log(2)/K]. + * + * P(y) = P3*y*y*y*y + P2*y*y*y + P1*y*y + P0*y, calculated as + * z = y*y; P(y) = (P3*z + P1)*z + (P2*z + P0)*y + * + * Special cases: + * expf(NaN) = NaN + * expf(+INF) = +INF + * expf(-INF) = 0 + * expf(x) = 1 for subnormals + * for finite argument, only expf(0)=1 is exact + * expf(x) overflows if x>88.7228317260742190 + * expf(x) underflows if x<-103.972076416015620 + */ + + .text +ENTRY(__ieee754_expf) + /* Input: single precision x in %xmm0 */ + cvtss2sd %xmm0, %xmm1 /* Convert x to double precision */ + movd %xmm0, %ecx /* Copy x */ + movsd L(DP_KLN2)(%rip), %xmm2 /* DP K/log(2) */ + movsd L(DP_P2)(%rip), %xmm3 /* DP P2 */ + movl %ecx, %eax /* x */ + mulsd %xmm1, %xmm2 /* DP x*K/log(2) */ + andl $0x7fffffff, %ecx /* |x| */ + lea L(DP_T)(%rip), %rsi /* address of table T[j] */ + cmpl $0x42ad496b, %ecx /* |x|<125*log(2) ? */ + movsd L(DP_P3)(%rip), %xmm4 /* DP P3 */ + addsd L(DP_RS)(%rip), %xmm2 /* DP x*K/log(2)+RS */ + jae L(special_paths) + + /* Here if |x|<125*log(2) */ + cmpl $0x31800000, %ecx /* |x|<2^(-28) ? */ + jb L(small_arg) + + /* Main path: here if 2^(-28)<=|x|<125*log(2) */ + cvtsd2ss %xmm2, %xmm2 /* SP x*K/log(2)+RS */ + movd %xmm2, %eax /* bits of n*K+j with trash */ + subss L(SP_RS)(%rip), %xmm2 /* SP t=round(x*K/log(2)) */ + movl %eax, %edx /* n*K+j with trash */ + cvtss2sd %xmm2, %xmm2 /* DP t */ + andl $0x3f, %eax /* bits of j */ + mulsd L(DP_NLN2K)(%rip), %xmm2/* DP -t*log(2)/K */ + andl $0xffffffc0, %edx /* bits of n */ +#ifdef __AVX__ + vaddsd %xmm1, %xmm2, %xmm0 /* DP y=x-t*log(2)/K */ + vmulsd %xmm0, %xmm0, %xmm2 /* DP z=y*y */ +#else + addsd %xmm1, %xmm2 /* DP y=x-t*log(2)/K */ + movaps %xmm2, %xmm0 /* DP y */ + mulsd %xmm2, %xmm2 /* DP z=y*y */ +#endif + mulsd %xmm2, %xmm4 /* DP P3*z */ + addl $0x1fc0, %edx /* bits of n + SP exponent bias */ + mulsd %xmm2, %xmm3 /* DP P2*z */ + shll $17, %edx /* SP 2^n */ + addsd L(DP_P1)(%rip), %xmm4 /* DP P3*z+P1 */ + addsd L(DP_P0)(%rip), %xmm3 /* DP P2*z+P0 */ + movd %edx, %xmm1 /* SP 2^n */ + mulsd %xmm2, %xmm4 /* DP (P3*z+P1)*z */ + mulsd %xmm3, %xmm0 /* DP (P2*z+P0)*y */ + addsd %xmm4, %xmm0 /* DP P(y) */ + mulsd (%rsi,%rax,8), %xmm0 /* DP P(y)*T[j] */ + addsd (%rsi,%rax,8), %xmm0 /* DP T[j]*(P(y)+1) */ + cvtsd2ss %xmm0, %xmm0 /* SP T[j]*(P(y)+1) */ + mulss %xmm1, %xmm0 /* SP result=2^n*(T[j]*(P(y)+1)) */ + ret + + .p2align 4 +L(small_arg): + /* Here if 0<=|x|<2^(-28) */ + addss L(SP_ONE)(%rip), %xmm0 /* 1.0 + x */ + /* Return 1.0 with inexact raised, except for x==0 */ + ret + + .p2align 4 +L(special_paths): + /* Here if 125*log(2)<=|x| */ + shrl $31, %eax /* Get sign bit of x, and depending on it: */ + lea L(SP_RANGE)(%rip), %rdx /* load over/underflow bound */ + cmpl (%rdx,%rax,4), %ecx /* |x|<under/overflow bound ? */ + jbe L(near_under_or_overflow) + + /* Here if |x|>under/overflow bound */ + cmpl $0x7f800000, %ecx /* |x| is finite ? */ + jae L(arg_inf_or_nan) + + /* Here if |x|>under/overflow bound, and x is finite */ + testq %rax, %rax /* sign of x nonzero ? */ + je L(res_overflow) + + /* Here if -inf<x<underflow bound (x<0) */ + movss L(SP_SMALL)(%rip), %xmm0/* load small value 2^(-100) */ + mulss %xmm0, %xmm0 /* Return underflowed result (zero or subnormal) */ + ret + + .p2align 4 +L(res_overflow): + /* Here if overflow bound<x<inf (x>0) */ + movss L(SP_LARGE)(%rip), %xmm0/* load large value 2^100 */ + mulss %xmm0, %xmm0 /* Return overflowed result (Inf or max normal) */ + ret + + .p2align 4 +L(arg_inf_or_nan): + /* Here if |x| is Inf or NAN */ + jne L(arg_nan) /* |x| is Inf ? */ + + /* Here if |x| is Inf */ + lea L(SP_INF_0)(%rip), %rdx /* depending on sign of x: */ + movss (%rdx,%rax,4), %xmm0 /* return zero or Inf */ + ret + + .p2align 4 +L(arg_nan): + /* Here if |x| is NaN */ + addss %xmm0, %xmm0 /* Return x+x (raise invalid) */ + ret + + .p2align 4 +L(near_under_or_overflow): + /* Here if 125*log(2)<=|x|<under/overflow bound */ + cvtsd2ss %xmm2, %xmm2 /* SP x*K/log(2)+RS */ + movd %xmm2, %eax /* bits of n*K+j with trash */ + subss L(SP_RS)(%rip), %xmm2 /* SP t=round(x*K/log(2)) */ + movl %eax, %edx /* n*K+j with trash */ + cvtss2sd %xmm2, %xmm2 /* DP t */ + andl $0x3f, %eax /* bits of j */ + mulsd L(DP_NLN2K)(%rip), %xmm2/* DP -t*log(2)/K */ + andl $0xffffffc0, %edx /* bits of n */ +#ifdef __AVX__ + vaddsd %xmm1, %xmm2, %xmm0 /* DP y=x-t*log(2)/K */ + vmulsd %xmm0, %xmm0, %xmm2 /* DP z=y*y */ +#else + addsd %xmm1, %xmm2 /* DP y=x-t*log(2)/K */ + movaps %xmm2, %xmm0 /* DP y */ + mulsd %xmm2, %xmm2 /* DP z=y*y */ +#endif + mulsd %xmm2, %xmm4 /* DP P3*z */ + addl $0xffc0, %edx /* bits of n + DP exponent bias */ + mulsd %xmm2, %xmm3 /* DP P2*z */ + shlq $46, %rdx /* DP 2^n */ + addsd L(DP_P1)(%rip), %xmm4 /* DP P3*z+P1 */ + addsd L(DP_P0)(%rip), %xmm3 /* DP P2*z+P0 */ + movd %rdx, %xmm1 /* DP 2^n */ + mulsd %xmm2, %xmm4 /* DP (P3*z+P1)*z */ + mulsd %xmm3, %xmm0 /* DP (P2*z+P0)*y */ + addsd %xmm4, %xmm0 /* DP P(y) */ + mulsd (%rsi,%rax,8), %xmm0 /* DP P(y)*T[j] */ + addsd (%rsi,%rax,8), %xmm0 /* DP T[j]*(P(y)+1) */ + mulsd %xmm1, %xmm0 /* DP result=2^n*(T[j]*(P(y)+1)) */ + cvtsd2ss %xmm0, %xmm0 /* convert result to single precision */ + ret +END(__ieee754_expf) + + .section .rodata, "a" + .p2align 3 +L(DP_T): /* table of double precision values 2^(j/K) for j=[0..K-1] */ + .long 0x00000000, 0x3ff00000 + .long 0x3e778061, 0x3ff02c9a + .long 0xd3158574, 0x3ff059b0 + .long 0x18759bc8, 0x3ff08745 + .long 0x6cf9890f, 0x3ff0b558 + .long 0x32d3d1a2, 0x3ff0e3ec + .long 0xd0125b51, 0x3ff11301 + .long 0xaea92de0, 0x3ff1429a + .long 0x3c7d517b, 0x3ff172b8 + .long 0xeb6fcb75, 0x3ff1a35b + .long 0x3168b9aa, 0x3ff1d487 + .long 0x88628cd6, 0x3ff2063b + .long 0x6e756238, 0x3ff2387a + .long 0x65e27cdd, 0x3ff26b45 + .long 0xf51fdee1, 0x3ff29e9d + .long 0xa6e4030b, 0x3ff2d285 + .long 0x0a31b715, 0x3ff306fe + .long 0xb26416ff, 0x3ff33c08 + .long 0x373aa9cb, 0x3ff371a7 + .long 0x34e59ff7, 0x3ff3a7db + .long 0x4c123422, 0x3ff3dea6 + .long 0x21f72e2a, 0x3ff4160a + .long 0x6061892d, 0x3ff44e08 + .long 0xb5c13cd0, 0x3ff486a2 + .long 0xd5362a27, 0x3ff4bfda + .long 0x769d2ca7, 0x3ff4f9b2 + .long 0x569d4f82, 0x3ff5342b + .long 0x36b527da, 0x3ff56f47 + .long 0xdd485429, 0x3ff5ab07 + .long 0x15ad2148, 0x3ff5e76f + .long 0xb03a5585, 0x3ff6247e + .long 0x82552225, 0x3ff66238 + .long 0x667f3bcd, 0x3ff6a09e + .long 0x3c651a2f, 0x3ff6dfb2 + .long 0xe8ec5f74, 0x3ff71f75 + .long 0x564267c9, 0x3ff75feb + .long 0x73eb0187, 0x3ff7a114 + .long 0x36cf4e62, 0x3ff7e2f3 + .long 0x994cce13, 0x3ff82589 + .long 0x9b4492ed, 0x3ff868d9 + .long 0x422aa0db, 0x3ff8ace5 + .long 0x99157736, 0x3ff8f1ae + .long 0xb0cdc5e5, 0x3ff93737 + .long 0x9fde4e50, 0x3ff97d82 + .long 0x82a3f090, 0x3ff9c491 + .long 0x7b5de565, 0x3ffa0c66 + .long 0xb23e255d, 0x3ffa5503 + .long 0x5579fdbf, 0x3ffa9e6b + .long 0x995ad3ad, 0x3ffae89f + .long 0xb84f15fb, 0x3ffb33a2 + .long 0xf2fb5e47, 0x3ffb7f76 + .long 0x904bc1d2, 0x3ffbcc1e + .long 0xdd85529c, 0x3ffc199b + .long 0x2e57d14b, 0x3ffc67f1 + .long 0xdcef9069, 0x3ffcb720 + .long 0x4a07897c, 0x3ffd072d + .long 0xdcfba487, 0x3ffd5818 + .long 0x03db3285, 0x3ffda9e6 + .long 0x337b9b5f, 0x3ffdfc97 + .long 0xe78b3ff6, 0x3ffe502e + .long 0xa2a490da, 0x3ffea4af + .long 0xee615a27, 0x3ffefa1b + .long 0x5b6e4540, 0x3fff5076 + .long 0x819e90d8, 0x3fffa7c1 + ASM_TYPE_DIRECTIVE(L(DP_T), @object) + ASM_SIZE_DIRECTIVE(L(DP_T)) + + .section .rodata.cst8,"aM",@progbits,8 + .p2align 3 +L(DP_KLN2): /* double precision K/log(2) */ + .long 0x652b82fe, 0x40571547 + ASM_TYPE_DIRECTIVE(L(DP_KLN2), @object) + ASM_SIZE_DIRECTIVE(L(DP_KLN2)) + + .p2align 3 +L(DP_NLN2K): /* double precision -log(2)/K */ + .long 0xfefa39ef, 0xbf862e42 + ASM_TYPE_DIRECTIVE(L(DP_NLN2K), @object) + ASM_SIZE_DIRECTIVE(L(DP_NLN2K)) + + .p2align 3 +L(DP_RS): /* double precision 2^23+2^22 */ + .long 0x00000000, 0x41680000 + ASM_TYPE_DIRECTIVE(L(DP_RS), @object) + ASM_SIZE_DIRECTIVE(L(DP_RS)) + + .p2align 3 +L(DP_P3): /* double precision polynomial coefficient P3 */ + .long 0xeb78fa85, 0x3fa56420 + ASM_TYPE_DIRECTIVE(L(DP_P3), @object) + ASM_SIZE_DIRECTIVE(L(DP_P3)) + + .p2align 3 +L(DP_P1): /* double precision polynomial coefficient P1 */ + .long 0x008d6118, 0x3fe00000 + ASM_TYPE_DIRECTIVE(L(DP_P1), @object) + ASM_SIZE_DIRECTIVE(L(DP_P1)) + + .p2align 3 +L(DP_P2): /* double precision polynomial coefficient P2 */ + .long 0xda752d4f, 0x3fc55550 + ASM_TYPE_DIRECTIVE(L(DP_P2), @object) + ASM_SIZE_DIRECTIVE(L(DP_P2)) + + .p2align 3 +L(DP_P0): /* double precision polynomial coefficient P0 */ + .long 0xffffe7c6, 0x3fefffff + ASM_TYPE_DIRECTIVE(L(DP_P0), @object) + ASM_SIZE_DIRECTIVE(L(DP_P0)) + + .p2align 2 +L(SP_RANGE): /* single precision overflow/underflow bounds */ + .long 0x42b17217 /* if x>this bound, then result overflows */ + .long 0x42cff1b4 /* if x<this bound, then result underflows */ + ASM_TYPE_DIRECTIVE(L(SP_RANGE), @object) + ASM_SIZE_DIRECTIVE(L(SP_RANGE)) + + .p2align 2 +L(SP_INF_0): + .long 0x7f800000 /* single precision Inf */ + .long 0 /* single precision zero */ + ASM_TYPE_DIRECTIVE(L(SP_INF_0), @object) + ASM_SIZE_DIRECTIVE(L(SP_INF_0)) + + .section .rodata.cst4,"aM",@progbits,4 + .p2align 2 +L(SP_RS): /* single precision 2^23+2^22 */ + .long 0x4b400000 + ASM_TYPE_DIRECTIVE(L(SP_RS), @object) + ASM_SIZE_DIRECTIVE(L(SP_RS)) + + .p2align 2 +L(SP_SMALL): /* single precision small value 2^(-100) */ + .long 0x0d800000 + ASM_TYPE_DIRECTIVE(L(SP_SMALL), @object) + ASM_SIZE_DIRECTIVE(L(SP_SMALL)) + + .p2align 2 +L(SP_LARGE): /* single precision large value 2^100 */ + .long 0x71800000 + ASM_TYPE_DIRECTIVE(L(SP_LARGE), @object) + ASM_SIZE_DIRECTIVE(L(SP_LARGE)) + + .p2align 2 +L(SP_ONE): /* single precision 1.0 */ + .long 0x3f800000 + ASM_TYPE_DIRECTIVE(L(SP_ONE), @object) + ASM_SIZE_DIRECTIVE(L(SP_ONE)) + +strong_alias (__ieee754_expf, __expf_finite) diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index a2a82e62bb..269dca6d03 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -327,6 +327,151 @@ ifloat: 1 ildouble: 1 ldouble: 1 +# cos_downward +Test "cos_downward (1) == 0.5403023058681397174009366074429766037323": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +Test "cos_downward (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +Test "cos_downward (4) == -0.6536436208636119146391681830977503814241": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_downward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_downward (9) == -0.9111302618846769883682947111811653112463": +ildouble: 1 +ldouble: 1 + +# cos_tonearest +Test "cos_tonearest (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_tonearest (8) == -0.1455000338086135258688413818311946826093": +ildouble: 1 +ldouble: 1 +Test "cos_tonearest (9) == -0.9111302618846769883682947111811653112463": +ildouble: 1 +ldouble: 1 + +# cos_towardzero +Test "cos_towardzero (1) == 0.5403023058681397174009366074429766037323": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (10) == -0.8390715290764524522588639478240648345199": +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (2) == -0.4161468365471423869975682295007621897660": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (3) == -0.9899924966004454572715727947312613023937": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344": +float: 1 +ifloat: 1 +Test "cos_towardzero (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_towardzero (8) == -0.1455000338086135258688413818311946826093": +float: 1 +ifloat: 1 + +# cos_upward +Test "cos_upward (10) == -0.8390715290764524522588639478240648345199": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (2) == -0.4161468365471423869975682295007621897660": +ildouble: 1 +ldouble: 1 +Test "cos_upward (3) == -0.9899924966004454572715727947312613023937": +ildouble: 1 +ldouble: 1 +Test "cos_upward (5) == 0.2836621854632262644666391715135573083344": +ildouble: 1 +ldouble: 1 +Test "cos_upward (6) == 0.9601702866503660205456522979229244054519": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cos_upward (7) == 0.7539022543433046381411975217191820122183": +float: 1 +ifloat: 1 +Test "cos_upward (9) == -0.9111302618846769883682947111811653112463": +float: 2 +ifloat: 2 + +# cosh_downward +Test "cosh_downward (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "cosh_downward (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_downward (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cosh_tonearest +Test "cosh_tonearest (22) == 1792456423.065795780980053377632656584997": +ildouble: 1 +ldouble: 1 + +# cosh_towardzero +Test "cosh_towardzero (22) == 1792456423.065795780980053377632656584997": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "cosh_towardzero (23) == 4872401723.124451300068625740569997090344": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "cosh_towardzero (24) == 13244561064.92173614708845674912733665919": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cosh_upward +Test "cosh_upward (23) == 4872401723.124451300068625740569997090344": +ildouble: 1 +ldouble: 1 + # cpow Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i": float: 1 @@ -420,8 +565,8 @@ ifloat: 1 Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": double: 1 idouble: 1 -ildouble: 439 -ldouble: 439 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i": float: 1 ifloat: 1 @@ -444,11 +589,11 @@ double: 1 float: 2 idouble: 1 ifloat: 2 -ildouble: 5 -ldouble: 5 +ildouble: 3 +ldouble: 3 Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i": -ildouble: 25 -ldouble: 25 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": float: 1 ifloat: 1 @@ -467,6 +612,16 @@ double: 1 idouble: 1 # erfc +Test "erfc (0x1.f7303cp+1) == 2.705500297238986897105236321218861842255e-8": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "erfc (0x1.ffa002p+2) == 1.233585992097580296336099501489175967033e-29": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "erfc (1.25) == 0.0770998717435417698634765188027188596": ildouble: 1 ldouble: 1 @@ -502,6 +657,41 @@ ifloat: 2 ildouble: 8 ldouble: 8 +# exp_downward +Test "exp_downward (1) == e": +ildouble: 1 +ldouble: 1 +Test "exp_downward (2) == e^2": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "exp_downward (3) == e^3": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_towardzero +Test "exp_towardzero (1) == e": +ildouble: 1 +ldouble: 1 +Test "exp_towardzero (2) == e^2": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "exp_towardzero (3) == e^3": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# exp_upward +Test "exp_upward (1) == e": +float: 1 +ifloat: 1 + # expm1 Test "expm1 (0.75) == 1.11700001661267466854536981983709561": double: 1 @@ -511,6 +701,9 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "expm1 (11356.25) == 9.05128237311923300051376115753226014206e+4931": +ildouble: 1 +ldouble: 1 # gamma Test "gamma (-0.5) == log(2*sqrt(pi))": @@ -783,6 +976,137 @@ Test "log1p (-0.25) == -0.287682072451780927439219005993827432": float: 1 ifloat: 1 +# pow_downward +Test "pow_downward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +ildouble: 1 +ldouble: 1 +Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# pow_towardzero +Test "pow_towardzero (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +ildouble: 1 +ldouble: 1 +Test "pow_towardzero (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# pow_upward +Test "pow_upward (1.0625, 1.125) == 1.070582293028761362162622578677070098674": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "pow_upward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": +ildouble: 1 +ldouble: 1 + +# sin_downward +Test "sin_downward (1) == 0.8414709848078965066525023216302989996226": +ildouble: 1 +ldouble: 1 +Test "sin_downward (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (3) == 0.1411200080598672221007448028081102798469": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (4) == -0.7568024953079282513726390945118290941359": +ildouble: 1 +ldouble: 1 +Test "sin_downward (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_downward (6) == -0.2794154981989258728115554466118947596280": +float: 1 +ifloat: 1 +Test "sin_downward (7) == 0.6569865987187890903969990915936351779369": +ildouble: 1 +ldouble: 1 +Test "sin_downward (8) == 0.9893582466233817778081235982452886721164": +ildouble: 1 +ldouble: 1 +Test "sin_downward (9) == 0.4121184852417565697562725663524351793439": +ildouble: 1 +ldouble: 1 + +# sin_tonearest +Test "sin_tonearest (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_tonearest (10) == -0.5440211108893698134047476618513772816836": +ildouble: 1 +ldouble: 1 +Test "sin_tonearest (4) == -0.7568024953079282513726390945118290941359": +ildouble: 1 +ldouble: 1 +Test "sin_tonearest (9) == 0.4121184852417565697562725663524351793439": +ildouble: 1 +ldouble: 1 + +# sin_towardzero +Test "sin_towardzero (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (10) == -0.5440211108893698134047476618513772816836": +float: 1 +ifloat: 1 +Test "sin_towardzero (3) == 0.1411200080598672221007448028081102798469": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_towardzero (5) == -0.9589242746631384688931544061559939733525": +float: 1 +ifloat: 1 +Test "sin_towardzero (6) == -0.2794154981989258728115554466118947596280": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (7) == 0.6569865987187890903969990915936351779369": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (8) == 0.9893582466233817778081235982452886721164": +ildouble: 1 +ldouble: 1 +Test "sin_towardzero (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# sin_upward +Test "sin_upward (1) == 0.8414709848078965066525023216302989996226": +float: 1 +ifloat: 1 +Test "sin_upward (2) == 0.9092974268256816953960198659117448427023": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "sin_upward (4) == -0.7568024953079282513726390945118290941359": +float: 1 +ifloat: 1 +Test "sin_upward (6) == -0.2794154981989258728115554466118947596280": +ildouble: 1 +ldouble: 1 +Test "sin_upward (9) == 0.4121184852417565697562725663524351793439": +float: 1 +ifloat: 1 + # sincos Test "sincos (0.80190127184058835, &sin_res, &cos_res) puts 0.69534156199418473 in cos_res": double: 1 @@ -815,11 +1139,169 @@ Test "sinh (0x8p-32) == 1.86264514923095703232705808926175479e-9": ildouble: 1 ldouble: 1 +# sinh_downward +Test "sinh_downward (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 +Test "sinh_downward (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_downward (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +# sinh_tonearest +Test "sinh_tonearest (22) == 1792456423.065795780701106568345764104225": +ildouble: 3 +ldouble: 3 +Test "sinh_tonearest (23) == 4872401723.124451299966006944252978187305": +ildouble: 1 +ldouble: 1 +Test "sinh_tonearest (24) == 13244561064.92173614705070540368454568168": +ildouble: 6 +ldouble: 6 + +# sinh_towardzero +Test "sinh_towardzero (22) == 1792456423.065795780701106568345764104225": +float: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 +Test "sinh_towardzero (23) == 4872401723.124451299966006944252978187305": +float: 1 +ifloat: 1 +Test "sinh_towardzero (24) == 13244561064.92173614705070540368454568168": +float: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +# sinh_upward +Test "sinh_upward (22) == 1792456423.065795780701106568345764104225": +ildouble: 16 +ldouble: 16 +Test "sinh_upward (23) == 4872401723.124451299966006944252978187305": +ildouble: 27 +ldouble: 27 +Test "sinh_upward (24) == 13244561064.92173614705070540368454568168": +ildouble: 7 +ldouble: 7 + # tan Test "tan (pi/4) == 1": double: 1 idouble: 1 +# tan_downward +Test "tan_downward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +Test "tan_downward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_downward (2) == -2.1850398632615189916433061023136825434320": +float: 1 +ifloat: 1 +Test "tan_downward (4) == 1.1578212823495775831373424182673239231198": +ildouble: 1 +ldouble: 1 +Test "tan_downward (5) == -3.3805150062465856369827058794473439087096": +ildouble: 1 +ldouble: 1 +Test "tan_downward (6) == -0.2910061913847491570536995888681755428312": +float: 1 +ifloat: 1 +Test "tan_downward (8) == -6.7997114552203786999252627596086333648814": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_downward (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 + +# tan_tonearest +Test "tan_tonearest (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_tonearest (8) == -6.7997114552203786999252627596086333648814": +ildouble: 1 +ldouble: 1 +Test "tan_tonearest (9) == -0.4523156594418098405903708757987855343087": +ildouble: 1 +ldouble: 1 + +# tan_towardzero +Test "tan_towardzero (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +Test "tan_towardzero (2) == -2.1850398632615189916433061023136825434320": +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (4) == 1.1578212823495775831373424182673239231198": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (5) == -3.3805150062465856369827058794473439087096": +float: 1 +ifloat: 1 +Test "tan_towardzero (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_towardzero (8) == -6.7997114552203786999252627596086333648814": +ildouble: 2 +ldouble: 2 +Test "tan_towardzero (9) == -0.4523156594418098405903708757987855343087": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# tan_upward +Test "tan_upward (1) == 1.5574077246549022305069748074583601730873": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (10) == 0.6483608274590866712591249330098086768169": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (2) == -2.1850398632615189916433061023136825434320": +ildouble: 1 +ldouble: 1 +Test "tan_upward (3) == -0.1425465430742778052956354105339134932261": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tan_upward (5) == -3.3805150062465856369827058794473439087096": +float: 1 +ifloat: 1 +Test "tan_upward (6) == -0.2910061913847491570536995888681755428312": +ildouble: 1 +ldouble: 1 +Test "tan_upward (7) == 0.8714479827243187364564508896003135663222": +ildouble: 1 +ldouble: 1 +Test "tan_upward (8) == -6.7997114552203786999252627596086333648814": +ildouble: 2 +ldouble: 2 +Test "tan_upward (9) == -0.4523156594418098405903708757987855343087": +ildouble: 1 +ldouble: 1 + # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": double: 1 @@ -1166,6 +1648,50 @@ ifloat: 1 ildouble: 1 ldouble: 1 +Function: "cos_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos_tonearest": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos_upward": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "cosh_downward": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "cosh_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "cosh_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "cosh_upward": +ildouble: 1 +ldouble: 1 + Function: Real part of "cpow": double: 2 float: 5 @@ -1215,8 +1741,8 @@ ifloat: 1 Function: Real part of "ctan": double: 1 idouble: 1 -ildouble: 439 -ldouble: 439 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ctan": double: 1 @@ -1231,16 +1757,16 @@ double: 1 float: 2 idouble: 1 ifloat: 2 -ildouble: 5 -ldouble: 5 +ildouble: 3 +ldouble: 3 Function: Imaginary part of "ctanh": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 25 -ldouble: 25 +ildouble: 1 +ldouble: 1 Function: "erf": double: 1 @@ -1248,7 +1774,9 @@ idouble: 1 Function: "erfc": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1260,11 +1788,29 @@ ifloat: 2 ildouble: 8 ldouble: 8 +Function: "exp_downward": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "exp_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "exp_upward": +float: 1 +ifloat: 1 + Function: "expm1": double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "gamma": ildouble: 1 @@ -1318,6 +1864,48 @@ Function: "log1p": float: 1 ifloat: 1 +Function: "pow_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_upward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_tonearest": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_towardzero": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sin_upward": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + Function: "sincos": double: 1 float: 1 @@ -1330,10 +1918,52 @@ Function: "sinh": ildouble: 1 ldouble: 1 +Function: "sinh_downward": +float: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: "sinh_tonearest": +ildouble: 6 +ldouble: 6 + +Function: "sinh_towardzero": +float: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: "sinh_upward": +ildouble: 27 +ldouble: 27 + Function: "tan": double: 1 idouble: 1 +Function: "tan_downward": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "tan_tonearest": +ildouble: 1 +ldouble: 1 + +Function: "tan_towardzero": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "tan_upward": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + Function: "tgamma": double: 1 float: 1 |