[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r15325 - in /fsf/trunk/libc: ChangeLog elf/rtld.c sysdeps/x86_64/fpu/bits/mathinline.h sysdeps/x86_64/fpu/s_copysign.S
- To: commits@xxxxxxxxxx
- Subject: [commits] r15325 - in /fsf/trunk/libc: ChangeLog elf/rtld.c sysdeps/x86_64/fpu/bits/mathinline.h sysdeps/x86_64/fpu/s_copysign.S
- From: eglibc@xxxxxxxxxx
- Date: Thu, 15 Sep 2011 07:02:57 -0000
Author: eglibc
Date: Thu Sep 15 00:02:55 2011
New Revision: 15325
Log:
Import glibc-mainline for 2011-09-15
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/elf/rtld.c
fsf/trunk/libc/sysdeps/x86_64/fpu/bits/mathinline.h
fsf/trunk/libc/sysdeps/x86_64/fpu/s_copysign.S
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Sep 15 00:02:55 2011
@@ -1,3 +1,17 @@
+2011-09-14 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/x86_64/fpu/s_copysign.S [ELF]: Use correct section.
+
+ * sysdeps/x86_64/fpu/bits/mathinline.h (__MATH_INLINE): Use
+ __extern_always_inline.
+ Define lrint{f,} and llrint{f,} for 64-bit and in some situations for
+ 32-bit.
+
+2011-09-14 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * elf/rtld.c (dl_main): Also relocate in dependency order when
+ doing symbol dependency testing.
+
2011-09-13 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela):
Modified: fsf/trunk/libc/elf/rtld.c
==============================================================================
--- fsf/trunk/libc/elf/rtld.c (original)
+++ fsf/trunk/libc/elf/rtld.c Thu Sep 15 00:02:55 2011
@@ -2027,24 +2027,21 @@
{
/* We have to do symbol dependency testing. */
struct relocate_args args;
- struct link_map *l;
+ unsigned int i;
args.reloc_mode = GLRO(dl_lazy) ? RTLD_LAZY : 0;
- l = main_map;
- while (l->l_next != NULL)
- l = l->l_next;
- do
+ i = main_map->l_searchlist.r_nlist;
+ while (i-- > 0)
{
+ struct link_map *l = main_map->l_initfini[i];
if (l != &GL(dl_rtld_map) && ! l->l_faked)
{
args.l = l;
_dl_receive_error (print_unresolved, relocate_doit,
&args);
}
- l = l->l_prev;
}
- while (l != NULL);
if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
&& rtld_multiple_ref)
Modified: fsf/trunk/libc/sysdeps/x86_64/fpu/bits/mathinline.h
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/fpu/bits/mathinline.h (original)
+++ fsf/trunk/libc/sysdeps/x86_64/fpu/bits/mathinline.h Thu Sep 15 00:02:55 2011
@@ -1,7 +1,6 @@
/* Inline math functions for x86-64.
- Copyright (C) 2002, 2003, 2004, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2007, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@xxxxxxx>, 2002.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -24,10 +23,10 @@
#include <bits/wordsize.h>
-#ifndef __extern_inline
+#ifndef __extern_always_inline
# define __MATH_INLINE __inline
#else
-# define __MATH_INLINE __extern_inline
+# define __MATH_INLINE __extern_always_inline
#endif
@@ -37,26 +36,26 @@
__MATH_INLINE int
__NTH (__signbitf (float __x))
{
-#if __WORDSIZE == 32
+# if __WORDSIZE == 32
__extension__ union { float __f; int __i; } __u = { __f: __x };
return __u.__i < 0;
-#else
+# else
int __m;
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
return __m & 0x8;
-#endif
+# endif
}
__MATH_INLINE int
__NTH (__signbit (double __x))
{
-#if __WORDSIZE == 32
+# if __WORDSIZE == 32
__extension__ union { double __d; int __i[2]; } __u = { __d: __x };
return __u.__i[1] < 0;
-#else
+# else
int __m;
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
return __m & 0x80;
-#endif
+# endif
}
__MATH_INLINE int
__NTH (__signbitl (long double __x))
@@ -64,4 +63,41 @@
__extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
return (__u.__i[2] & 0x8000) != 0;
}
+
+/* Round to nearest integer. */
+# if __WORDSIZE == 64 || defined __SSE_MATH__
+__MATH_INLINE long int
+__NTH (lrintf (float __x))
+{
+ long int __res;
+ asm ("cvtss2si %1, %0" : "=r" (__res) : "xm" (__x));
+ return __res;
+}
+# endif
+# if __WORDSIZE == 64 || defined __SSE2_MATH__
+__MATH_INLINE long int
+__NTH (lrint (double __x))
+{
+ long int __res;
+ asm ("cvtsd2si %1, %0" : "=r" (__res) : "xm" (__x));
+ return __res;
+}
+# endif
+# if __WORDSIZE == 64
+__MATH_INLINE long long int
+__NTH (llrintf (float __x))
+{
+ long long int __res;
+ asm ("cvtss2si %1, %0" : "=r" (__res) : "xm" (__x));
+ return __res;
+}
+__MATH_INLINE long long int
+__NTH (llrint (double __x))
+{
+ long long int __res;
+ asm ("cvtsd2si %1, %0" : "=r" (__res) : "xm" (__x));
+ return __res;
+}
+# endif
+
#endif
Modified: fsf/trunk/libc/sysdeps/x86_64/fpu/s_copysign.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/fpu/s_copysign.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/fpu/s_copysign.S Thu Sep 15 00:02:55 2011
@@ -1,5 +1,5 @@
/* copy sign, double version.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@xxxxxxx>, 2002.
@@ -21,7 +21,7 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst16,"aM",@progbits,16
#else
.text
#endif