[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r17429 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/unix/sysv/linux/sparc/ stdio-common/ sysdeps/ieee754/ldbl-96/ sysdeps/spa...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r17429 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/unix/sysv/linux/sparc/ stdio-common/ sysdeps/ieee754/ldbl-96/ sysdeps/spa...
- From: eglibc@xxxxxxxxxx
- Date: Wed, 07 Mar 2012 00:02:59 -0000
Author: eglibc
Date: Wed Mar 7 00:02:55 2012
New Revision: 17429
Log:
Import glibc-mainline for 2012-03-07
Added:
fsf/trunk/libc/stdio-common/tst-long-dbl-fphex.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c
fsf/trunk/libc/stdio-common/Makefile
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/printf_fphex.c
fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sysdep.h
fsf/trunk/libc/sysdeps/x86_64/fpu/printf_fphex.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Mar 7 00:02:55 2012
@@ -1,3 +1,27 @@
+2012-03-06 Marek Polacek <polacek@xxxxxxxxxx>
+
+ [BZ #13726]
+ * sysdeps/ieee754/ldbl-96/printf_fphex.c: Adjust position of wnumstr.
+ * sysdeps/x86_64/fpu/printf_fphex.c: Likewise.
+ * stdio-common/Makefile (tests): Add tst-long-dbl-fphex.
+ * stdio-common/tst-long-dbl-fphex.c: New file.
+
+2012-03-06 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+ (set_obp_int): New function.
+ (get_obp_int): New function.
+ (__get_clockfreq_via_dev_openprom): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sysdep.h (INTERNAL_SYSCALL_ERROR_P):
+ Avoid unused variable warnings on 'val' and use builtin_expect.
+ (INLINE_SYSCALL): Don't wrap INTERNAL_SYSCALL_ERROR_P with
+ builtin_expect.
+ (INLINE_CLONE_SYSCALL): Likewise.
+
+2012-03-05 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/fpu/libm-test-ulps: Update.
+
2012-03-05 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
* sysdeps/powerpc/fpu/libm-test-ulps: Update.
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Wed Mar 7 00:02:55 2012
@@ -13,8 +13,8 @@
5077, 5461, 5805, 5993, 6884, 6907, 9739, 9902, 10110, 10135, 10140,
10210, 11174, 11322, 11365, 11494, 12047, 13058, 13525, 13526, 13527,
13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551, 13552, 13553,
- 13555, 13559, 13583, 13618, 13637, 13656, 13695, 13704, 13706, 13738,
- 13786
+ 13555, 13559, 13583, 13618, 13637, 13656, 13695, 13704, 13706, 13726,
+ 13738, 13786, 13792
* ISO C11 support:
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Wed Mar 7 00:02:55 2012
@@ -1,7 +1,13 @@
+2012-03-06 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
+ atomic_increment and remove unused local variable.
+ (__old_sem_post): Likewise.
+
2012-02-27 David S. Miller <davem@xxxxxxxxxxxxx>
- * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to non-existing
- __pthread_attr.
+ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
+ non-existing __pthread_attr.
* sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
* sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c Wed Mar 7 00:02:55 2012
@@ -30,7 +30,7 @@
{
struct sparc_new_sem *isem = (struct sparc_new_sem *) sem;
- int nr = atomic_increment_val (&isem->value);
+ atomic_increment (&isem->value);
atomic_full_barrier ();
if (isem->nwaiters > 0)
{
@@ -53,10 +53,11 @@
__old_sem_post (sem_t *sem)
{
struct sparc_old_sem *isem = (struct sparc_old_sem *) sem;
+ int err;
- int nr = atomic_increment_val (&isem->value);
- int err = lll_futex_wake (&isem->value, 1,
- isem->private ^ FUTEX_PRIVATE_FLAG);
+ atomic_increment (&isem->value);
+ err = lll_futex_wake (&isem->value, 1,
+ isem->private ^ FUTEX_PRIVATE_FLAG);
if (__builtin_expect (err, 0) < 0)
{
__set_errno (-err);
Modified: fsf/trunk/libc/stdio-common/Makefile
==============================================================================
--- fsf/trunk/libc/stdio-common/Makefile (original)
+++ fsf/trunk/libc/stdio-common/Makefile Wed Mar 7 00:02:55 2012
@@ -60,7 +60,7 @@
tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
- bug-vfprintf-nargs
+ bug-vfprintf-nargs tst-long-dbl-fphex
test-srcs = tst-unbputc tst-printf
Added: fsf/trunk/libc/stdio-common/tst-long-dbl-fphex.c
==============================================================================
--- fsf/trunk/libc/stdio-common/tst-long-dbl-fphex.c (added)
+++ fsf/trunk/libc/stdio-common/tst-long-dbl-fphex.c Wed Mar 7 00:02:55 2012
@@ -1,0 +1,38 @@
+/* This file is part of the GNU C Library.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ Contributed by Marek Polacek <polacek@xxxxxxxxxx>, 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 <wchar.h>
+
+/* Prototype for our test function. */
+static int do_test (void);
+
+static int
+do_test (void)
+{
+ const long double x = 24.5;
+ wchar_t a[16 * sizeof (wchar_t)];
+ swprintf (a, 16 * sizeof (wchar_t), L"%La\n", x);
+ wchar_t A[16 * sizeof (wchar_t)];
+ swprintf (A, 16 * sizeof (wchar_t), L"%LA\n", x);
+
+ return (wmemcmp (a, L"0xc.4p+1", 8) != 0
+ || wmemcmp (A, L"0XC.4P+1", 8) != 0);
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/printf_fphex.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/printf_fphex.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/printf_fphex.c Wed Mar 7 00:02:55 2012
@@ -1,5 +1,5 @@
/* Print floating point number in hexadecimal notation according to ISO C99.
- Copyright (C) 1997, 1998, 1999, 2000, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997-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
@@ -58,6 +58,7 @@
\
/* We use a full nibble for the leading digit. */ \
leading = *numstr++; \
+ wnumstr++; \
\
/* We have 3 bits from the mantissa in the leading nibble. \
Therefore we are here using `IEEE854_LONG_DOUBLE_BIAS + 3'. */ \
Modified: fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps Wed Mar 7 00:02:55 2012
@@ -414,6 +414,28 @@
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":
@@ -918,6 +940,21 @@
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
@@ -1051,6 +1088,28 @@
ildouble: 1
ldouble: 1
Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
+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
@@ -1523,6 +1582,14 @@
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
@@ -1704,6 +1771,18 @@
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
@@ -1735,6 +1814,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
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c Wed Mar 7 00:02:55 2012
@@ -154,6 +154,22 @@
return result;
}
+static void set_obp_int (struct openpromio *op, int val)
+{
+ char *cp = op->oprom_array;
+ int *ip = (int *) cp;
+
+ *ip = val;
+}
+
+static int get_obp_int (struct openpromio *op)
+{
+ char *cp = op->oprom_array;
+ int *ip = (int *) cp;
+
+ return *ip;
+}
+
static hp_timing_t
__get_clockfreq_via_dev_openprom (void)
{
@@ -171,11 +187,11 @@
obp_cmd->oprom_size =
sizeof (obp_buf) - sizeof (unsigned int);
- *(int *) obp_cmd->oprom_array = 0;
+ set_obp_int (obp_cmd, 0);
ret = ioctl (obp_dev_fd, OPROMCHILD, (char *) obp_cmd);
if (ret == 0)
{
- int cur_node = *(int *) obp_cmd->oprom_array;
+ int cur_node = get_obp_int (obp_cmd);
while (cur_node != 0 && cur_node != -1)
{
@@ -190,15 +206,14 @@
strcpy (obp_cmd->oprom_array, "clock-frequency");
ret = ioctl (obp_dev_fd, OPROMGETPROP, (char *) obp_cmd);
if (ret == 0)
- result =
- (hp_timing_t) *(unsigned int *) obp_cmd->oprom_array;
+ result = (hp_timing_t) get_obp_int (obp_cmd);
}
obp_cmd->oprom_size = sizeof (obp_buf) - sizeof (unsigned int);
- *(int *) obp_cmd->oprom_array = cur_node;
+ set_obp_int (obp_cmd, cur_node);
ret = ioctl (obp_dev_fd, OPROMNEXT, (char *) obp_cmd);
if (ret < 0)
break;
- cur_node = *(int *)obp_cmd->oprom_array;
+ cur_node = get_obp_int (obp_cmd);
}
}
}
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sysdep.h Wed Mar 7 00:02:55 2012
@@ -23,7 +23,7 @@
#define INLINE_SYSCALL(name, nr, args...) \
({ INTERNAL_SYSCALL_DECL(err); \
unsigned int resultvar = INTERNAL_SYSCALL(name, err, nr, args); \
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (resultvar, err), 0)) \
+ if (INTERNAL_SYSCALL_ERROR_P (resultvar, err)) \
{ \
__set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, err)); \
resultvar = 0xffffffff; \
@@ -44,7 +44,8 @@
inline_syscall##nr(__SYSCALL_STRING, err, name, args)
#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err) ((err) != 0)
+#define INTERNAL_SYSCALL_ERROR_P(val, err) \
+ ((void) (val), __builtin_expect((err) != 0, 0))
#undef INTERNAL_SYSCALL_ERRNO
#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
@@ -152,7 +153,7 @@
"0" (__g1), "1" (__o0), "2" (__o1), \
"r" (__o2), "r" (__o3), "r" (__o4) : \
__SYSCALL_CLOBBERS); \
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (__o0, __g1), 0)) \
+ if (INTERNAL_SYSCALL_ERROR_P (__o0, __g1)) \
{ \
__set_errno (INTERNAL_SYSCALL_ERRNO (__o0, __g1)); \
__o0 = -1L; \
Modified: fsf/trunk/libc/sysdeps/x86_64/fpu/printf_fphex.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/fpu/printf_fphex.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/fpu/printf_fphex.c Wed Mar 7 00:02:55 2012
@@ -1,5 +1,5 @@
/* Print floating point number in hexadecimal notation according to ISO C99.
- Copyright (C) 1997,1998,1999,2000,2001,2005 Free Software Foundation, Inc.
+ Copyright (C) 1997-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
@@ -57,6 +57,7 @@
\
/* We use a full nibble for the leading digit. */ \
leading = *numstr++; \
+ wnumstr++; \
\
/* We have 3 bits from the mantissa in the leading nibble. \
Therefore we are here using `IEEE854_LONG_DOUBLE_BIAS + 3'. */ \
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits