[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r14127 - in /fsf/trunk/libc: ./ stdlib/ sysdeps/sparc/sparc32/ sysdeps/sparc/sparc64/ sysdeps/sparc/sparc64/multiarch/



Author: eglibc
Date: Wed Jun  8 00:03:19 2011
New Revision: 14127

Log:
Import glibc-mainline for 2011-06-08

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/stdlib/longlong.h
    fsf/trunk/libc/sysdeps/sparc/sparc32/dl-irel.h
    fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h
    fsf/trunk/libc/sysdeps/sparc/sparc64/dl-irel.h
    fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h
    fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Jun  8 00:03:19 2011
@@ -1,3 +1,21 @@
+2011-06-07  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* sysdeps/sparc/sparc32/dl-irel.h (elf_irela): Pass dl_hwcap to
+	ifuncs.
+	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela,
+	elf_machine_lazy_rel): Likewise.
+	* sysdeps/sparc/sparc64/dl-irel.h (elf_irela): Likewise.
+	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela,
+	elf_machine_lazy_rel): Likewise.
+	* sysdeps/sparc/sparc64/multiarch/memcpy.S (memcpy): Fetch
+	dl_hwcap via passed in argument.
+	* sysdeps/sparc/sparc64/multiarch/memset.S (memset, bzero):
+	Likewise.
+
+2011-06-06  Andreas Krebbel  <Andreas.Krebbel@xxxxxxxxxx>
+
+	* stdlib/longlong.h: Update from GCC.  Fix smul_ppmm for S/390.
+
 2011-06-06  Roland McGrath  <roland@xxxxxxxxxxxxx>
 
 	[BZ #12849]

Modified: fsf/trunk/libc/stdlib/longlong.h
==============================================================================
--- fsf/trunk/libc/stdlib/longlong.h (original)
+++ fsf/trunk/libc/stdlib/longlong.h Wed Jun  8 00:03:19 2011
@@ -349,7 +349,7 @@
     __asm__ ("mr\t%%r0,%3"                                              \
              : "=r" (r0), "=r" (r1)                                     \
              : "r"  (r1),  "r" (m1));                                   \
-    (xh) = r1; (xl) = r0;                                               \
+    (xh) = r0; (xl) = r1;                                               \
   } while (0)
 #define sdiv_qrnnd(q, r, n1, n0, d) \
   do {									\

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/dl-irel.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/dl-irel.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/dl-irel.h Wed Jun  8 00:03:19 2011
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <dl-plt.h>
+#include <ldsodefs.h>
 
 #define ELF_MACHINE_IRELA	1
 
@@ -36,13 +37,13 @@
   if (__builtin_expect (r_type == R_SPARC_IRELATIVE, 1))
     {
       Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
-      Elf32_Addr value = ((Elf32_Addr (*) (void)) reloc->r_addend) ();
+      Elf32_Addr value = ((Elf32_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
       *reloc_addr = value;
     }
   else if (__builtin_expect (r_type == R_SPARC_JMP_IREL, 1))
     {
       Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
-      Elf32_Addr value = ((Elf32_Addr (*) (void)) reloc->r_addend) ();
+      Elf32_Addr value = ((Elf32_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
 
       sparc_fixup_plt (reloc, reloc_addr, value, 0, 1);
     }

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h Wed Jun  8 00:03:19 2011
@@ -399,7 +399,7 @@
       && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
       && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
     {
-      value = ((Elf32_Addr (*) (void)) value) ();
+      value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
     }
 
   switch (r_type)
@@ -430,11 +430,11 @@
       *reloc_addr = value;
       break;
     case R_SPARC_IRELATIVE:
-      value = ((Elf32_Addr (*) (void)) value) ();
+      value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
       *reloc_addr = value;
       break;
     case R_SPARC_JMP_IREL:
-      value = ((Elf32_Addr (*) (void)) value) ();
+      value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
       /* Fall thru */
     case R_SPARC_JMP_SLOT:
       {
@@ -562,7 +562,7 @@
   else if (r_type == R_SPARC_JMP_IREL)
     {
       Elf32_Addr value = map->l_addr + reloc->r_addend;
-      value = ((Elf32_Addr (*) (void)) value) ();
+      value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
       sparc_fixup_plt (reloc, reloc_addr, value, 1, 1);
     }
   else if (r_type == R_SPARC_NONE)

Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/dl-irel.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/dl-irel.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/dl-irel.h Wed Jun  8 00:03:19 2011
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <dl-plt.h>
+#include <ldsodefs.h>
 
 #define ELF_MACHINE_IRELA	1
 
@@ -36,13 +37,13 @@
   if (__builtin_expect (r_type == R_SPARC_IRELATIVE, 1))
     {
       Elf64_Addr *const reloc_addr = (void *) reloc->r_offset;
-      Elf64_Addr value = ((Elf64_Addr (*) (void)) reloc->r_addend) ();
+      Elf64_Addr value = ((Elf64_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
       *reloc_addr = value;
     }
   else if (__builtin_expect (r_type == R_SPARC_JMP_IREL, 1))
     {
       Elf64_Addr *const reloc_addr = (void *) reloc->r_offset;
-      Elf64_Addr value = ((Elf64_Addr (*) (void)) reloc->r_addend) ();
+      Elf64_Addr value = ((Elf64_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
       struct link_map map = { .l_addr = 0 };
 
       /* 'high' is always zero, for large PLT entries the linker

Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h Wed Jun  8 00:03:19 2011
@@ -430,7 +430,7 @@
   if (sym != NULL
       && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
       && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
-    value = ((Elf64_Addr (*) (void)) value) ();
+    value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
 
   switch (r_type)
     {
@@ -460,11 +460,11 @@
       *reloc_addr = value;
       break;
     case R_SPARC_IRELATIVE:
-      value = ((Elf64_Addr (*) (void)) value) ();
+      value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
       *reloc_addr = value;
       break;
     case R_SPARC_JMP_IREL:
-      value = ((Elf64_Addr (*) (void)) value) ();
+      value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
       /* Fall thru */
     case R_SPARC_JMP_SLOT:
 #ifdef RESOLVE_CONFLICT_FIND_MAP
@@ -658,7 +658,7 @@
 	   || r_type == R_SPARC_IRELATIVE)
     {
       Elf64_Addr value = map->l_addr + reloc->r_addend;
-      value = ((Elf64_Addr (*) (void)) value) ();
+      value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
       if (r_type == R_SPARC_JMP_IREL)
 	{
 	  /* 'high' is always zero, for large PLT entries the linker

Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S Wed Jun  8 00:03:19 2011
@@ -32,26 +32,10 @@
 	 or	%o3, %lo(_GLOBAL_OFFSET_TABLE_+4), %o3
 1:	add	%o7, %o3, %o3
 	mov	%o5, %o7
-	sethi	%hi(_rtld_global_ro), %o2
-	or	%o2, %lo(_rtld_global_ro), %o2
-#  ifdef __arch64__
-	ldx	[%o3 + %o2], %o2
-	ldx	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET], %o2
-#  else
-	ld	[%o3 + %o2], %o2
-	ld	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET + 4], %o2
-#  endif
-# else
-	set	_dl_hwcap, %o3
-#  ifdef __arch64__
-	ldx	[%o3], %o2
-#  else
-	ld	[%o3 + 4], %o2
-#  endif
 # endif
-	andcc	%o2, 0x80, %g0	! HWCAP_SPARC_N2
+	andcc	%o0, 0x80, %g0	! HWCAP_SPARC_N2
 	be	1f
-	 andcc	%o2, 0x40, %g0	! HWCAP_SPARC_BLKINIT
+	 andcc	%o0, 0x40, %g0	! HWCAP_SPARC_BLKINIT
 # ifdef SHARED
 	sethi	%gdop_hix22(__memcpy_niagara2), %o1
 	xor	%o1, %gdop_lox10(__memcpy_niagara2), %o1
@@ -61,7 +45,7 @@
 	ba	10f
 	 nop
 1:	be	1f
-	 andcc	%o2, 0x20, %g0	! HWCAP_SPARC_ULTRA3
+	 andcc	%o0, 0x20, %g0	! HWCAP_SPARC_ULTRA3
 # ifdef SHARED
 	sethi	%gdop_hix22(__memcpy_niagara1), %o1
 	xor	%o1, %gdop_lox10(__memcpy_niagara1), %o1

Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S Wed Jun  8 00:03:19 2011
@@ -32,24 +32,8 @@
 	 or	%o3, %lo(_GLOBAL_OFFSET_TABLE_+4), %o3
 1:	add	%o7, %o3, %o3
 	mov	%o5, %o7
-	sethi	%hi(_rtld_global_ro), %o2
-	or	%o2, %lo(_rtld_global_ro), %o2
-#  ifdef __arch64__
-	ldx	[%o3 + %o2], %o2
-	ldx	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET], %o2
-#  else
-	ld	[%o3 + %o2], %o2
-	ld	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET + 4], %o2
-#  endif
-# else
-	set	_dl_hwcap, %o3
-#  ifdef __arch64__
-	ldx	[%o3], %o2
-#  else
-	ld	[%o3 + 4], %o2
-#  endif
 # endif
-	andcc	%o2, 0x40, %g0	! HWCAP_SPARC_BLKINIT
+	andcc	%o0, 0x40, %g0	! HWCAP_SPARC_BLKINIT
 	be	9f
 	 nop
 # ifdef SHARED
@@ -84,24 +68,8 @@
 	 or	%o3, %lo(_GLOBAL_OFFSET_TABLE_+4), %o3
 1:	add	%o7, %o3, %o3
 	mov	%o5, %o7
-	sethi	%hi(_rtld_global_ro), %o2
-	or	%o2, %lo(_rtld_global_ro), %o2
-#  ifdef __arch64__
-	ldx	[%o3 + %o2], %o2
-	ldx	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET], %o2
-#  else
-	ld	[%o3 + %o2], %o2
-	ld	[%o2 + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET + 4], %o2
-#  endif
-# else
-	set	_dl_hwcap, %o3
-#  ifdef __arch64__
-	ldx	[%o3], %o2
-#  else
-	ld	[%o3 + 4], %o2
-#  endif
 # endif
-	andcc	%o2, 0x40, %g0	! HWCAP_SPARC_BLKINIT
+	andcc	%o0, 0x40, %g0	! HWCAP_SPARC_BLKINIT
 	be	9f
 	 nop
 # ifdef SHARED