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

[Commits] r17532 - in /fsf/trunk/libc: ./ elf/ sysdeps/powerpc/fpu/ sysdeps/sparc/sparc32/ sysdeps/sparc/sparc64/



Author: eglibc
Date: Sun Mar 11 00:01:40 2012
New Revision: 17532

Log:
Import glibc-mainline for 2012-03-11

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/elf/sotruss-lib.c
    fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
    fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h
    fsf/trunk/libc/sysdeps/sparc/sparc32/dl-trampoline.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/dl-trampoline.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Mar 11 00:01:40 2012
@@ -1,3 +1,23 @@
+2012-03-10  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
+
+	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
+
+2012-03-09  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Protect local
+	variables with appropriate CPP guards.
+	* sysdeps/sparc/sparc32/dl-trampoline.S: Propagate the stack_ptr from the
+	frame pointer, not the stack pointer.  Correct layout comments.  Fix test
+	on resulting framesize and the management of the outregs buffer for pltexit.
+	Preserve floating point return values across _dl_call_pltexit call.
+	* sysdeps/sparc/sparc64/dl-trampoline.S: Fix test on resulting
+	framesize and the management of the outregs buffer for pltexit.
+	Preserve floating point return values across _dl_call_pltexit
+	call.
+	* elf/sotruss-lib.c (la_sparc32_gnu_pltenter, la_sparc64_gnu_pltenter,
+	la_sparc32_gnu_pltexit, la_sparc64_gnu_pltexit): New functions.
+	(print_exit): Fix format string for return register value.
+
 2012-03-10  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sunrpc/Makefile (others): Add rpcgen.

Modified: fsf/trunk/libc/elf/sotruss-lib.c
==============================================================================
--- fsf/trunk/libc/elf/sotruss-lib.c (original)
+++ fsf/trunk/libc/elf/sotruss-lib.c Sun Mar 11 00:01:40 2012
@@ -1,5 +1,5 @@
 /* Trace calls through PLTs and show caller, callee, and parameters.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   Copyright (C) 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxx>, 2011.
 
@@ -288,6 +288,40 @@
 
   return sym->st_value;
 }
+#elif defined __sparc__ && !defined __arch64__
+Elf32_Addr
+la_sparc32_gnu_pltenter (Elf32_Sym *sym __attribute__ ((unused)),
+			 unsigned int ndx __attribute__ ((unused)),
+			 uintptr_t *refcook, uintptr_t *defcook,
+			 La_sparc32_regs *regs, unsigned int *flags,
+			 const char *symname, long int *framesizep)
+{
+  print_enter (refcook, defcook, symname,
+	       regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2],
+	       *flags);
+
+  /* No need to copy anything, we will not need the parameters in any case.  */
+  *framesizep = 0;
+
+  return sym->st_value;
+}
+#elif defined __sparc__ && defined __arch64__
+Elf64_Addr
+la_sparc64_gnu_pltenter (Elf64_Sym *sym __attribute__ ((unused)),
+			 unsigned int ndx __attribute__ ((unused)),
+			 uintptr_t *refcook, uintptr_t *defcook,
+			 La_sparc64_regs *regs, unsigned int *flags,
+			 const char *symname, long int *framesizep)
+{
+  print_enter (refcook, defcook, symname,
+	       regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2],
+	       *flags);
+
+  /* No need to copy anything, we will not need the parameters in any case.  */
+  *framesizep = 0;
+
+  return sym->st_value;
+}
 #elif !defined HAVE_ARCH_PLTENTER
 # warning "pltenter for architecture not supported"
 #endif
@@ -302,7 +336,7 @@
   if (print_pid)
     snprintf (buf, sizeof (buf), "%5ld: ", (long int) getpid ());
 
-  fprintf (out_file, "%s%15s -> %-15s:%s%s - 0x%lu\n",
+  fprintf (out_file, "%s%15s -> %-15s:%s%s - 0x%lx\n",
 	   buf, (char *) *refcook, (char *) *defcook, " ", symname, reg);
 }
 
@@ -327,6 +361,26 @@
 
   return 0;
 }
+#elif defined __sparc__ && !defined __arch64__
+unsigned int
+la_sparc32_gnu_pltexit (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
+			uintptr_t *defcook, const struct La_sparc32_regs *inregs,
+			struct La_sparc32_retval *outregs, const char *symname)
+{
+  print_exit (refcook, defcook, symname, outregs->lrv_reg[0]);
+
+  return 0;
+}
+#elif defined __sparc__ && defined __arch64__
+unsigned int
+la_sparc64_gnu_pltexit (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
+			uintptr_t *defcook, const struct La_sparc64_regs *inregs,
+			struct La_sparc64_retval *outregs, const char *symname)
+{
+  print_exit (refcook, defcook, symname, outregs->lrv_reg[0]);
+
+  return 0;
+}
 #elif !defined HAVE_ARCH_PLTEXIT
 # warning "pltexit for architecture not supported"
 #endif

Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps Sun Mar 11 00:01:40 2012
@@ -53,7 +53,151 @@
 float: 1
 ifloat: 1
 
+# cacos
+Test "Imaginary part of: cacos (+0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: cacos (+0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cacos (+0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cacos (+0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacos (-0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: cacos (-0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cacos (-0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Real part of: cacos (-0.5 + +0 i) == 2.094395102393195492308428922186335256131 - 0 i":
+double: 1
+idouble: 1
+Test "Real part of: cacos (-0.5 - 0 i) == 2.094395102393195492308428922186335256131 + +0 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i":
+double: 1
+idouble: 1
+Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
 # cacosh
+Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: cacosh (+0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i":
+double: 1
+idouble: 1
+Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: cacosh (+0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i":
+double: 1
+idouble: 1
+Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: cacosh (-0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i":
+double: 1
+idouble: 1
+Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: cacosh (-0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacosh (-0.5 + +0 i) == +0 + 2.094395102393195492308428922186335256131 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.094395102393195492308428922186335256131 i":
+double: 1
+idouble: 1
+Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i":
+float: 1
+ifloat: 1
 Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
 double: 1
 float: 7
@@ -64,18 +208,200 @@
 float: 3
 idouble: 1
 ifloat: 3
+Test "Imaginary part of: cacosh (0.5 + +0 i) == +0 + 1.047197551196597746154214461093167628066 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cacosh (0.5 - 0 i) == +0 - 1.047197551196597746154214461093167628066 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i":
+float: 1
+ifloat: 1
 
 # casin
+Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: casin (+0 + 1.0 i) == +0 + 0.8813735870195430252326093249797923090282 i":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: casin (+0 + 1.5 i) == +0 + 1.194763217287109304111930828519090523536 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: casin (+0 - 1.5 i) == +0 - 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: casin (-0 + 0.5 i) == -0 + 0.4812118250596034474977589134243684231352 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: casin (-0 + 1.0 i) == -0 + 0.8813735870195430252326093249797923090282 i":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: casin (-0 + 1.5 i) == -0 + 1.194763217287109304111930828519090523536 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Real part of: casin (-0.5 + +0 i) == -0.5235987755982988730771072305465838140329 + +0 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: casin (-0.5 - 0 i) == -0.5235987755982988730771072305465838140329 - 0 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
 Test "Real part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: casin (0.5 + +0 i) == 0.5235987755982988730771072305465838140329 + +0 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: casin (0.5 - 0 i) == 0.5235987755982988730771072305465838140329 - 0 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
 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 (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
 
 # casinh
+Test "Imaginary part of: casinh (+0 + 0.5 i) == +0 + 0.5235987755982988730771072305465838140329 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: casinh (+0 - 0.5 i) == +0 - 0.5235987755982988730771072305465838140329 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: casinh (-0 + 0.5 i) == -0 + 0.5235987755982988730771072305465838140329 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: casinh (-0 + 1.5 i) == -0.9624236501192068949955178268487368462704 + pi/2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: casinh (-0 - 0.5 i) == -0 - 0.5235987755982988730771072305465838140329 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: casinh (-0 - 1.5 i) == -0.9624236501192068949955178268487368462704 - pi/2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
 double: 5
 float: 1
@@ -90,6 +416,12 @@
 ifloat: 6
 ildouble: 1
 ldouble: 1
+Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i":
+float: 1
+ifloat: 1
+Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i":
+float: 1
+ifloat: 1
 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
 float: 1
 ifloat: 1
@@ -98,6 +430,22 @@
 float: 1
 idouble: 1
 ifloat: 1
+Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i":
+double: 1
+idouble: 1
+Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i":
+double: 1
+idouble: 1
 
 # catan
 Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
@@ -1500,12 +1848,18 @@
 ldouble: 1
 
 Function: Real part of "cacos":
+double: 1
+idouble: 1
 ildouble: 1
 ldouble: 1
 
 Function: Imaginary part of "cacos":
-ildouble: 1
-ldouble: 1
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 2
+ldouble: 2
 
 Function: Real part of "cacosh":
 double: 1
@@ -1520,6 +1874,8 @@
 float: 3
 idouble: 1
 ifloat: 3
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "casin":
 double: 1
@@ -1530,8 +1886,12 @@
 ldouble: 1
 
 Function: Imaginary part of "casin":
-ildouble: 1
-ldouble: 1
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 2
+ldouble: 2
 
 Function: Real part of "casinh":
 double: 5

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 Sun Mar 11 00:01:40 2012
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  SPARC version.
-   Copyright (C) 1996-2003, 2004, 2005, 2006, 2007, 2010, 2011
+   Copyright (C) 1996-2003, 2004, 2005, 2006, 2007, 2010, 2011, 2012
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -341,10 +341,14 @@
 		  void *const reloc_addr_arg, int skip_ifunc)
 {
   Elf32_Addr *const reloc_addr = reloc_addr_arg;
+#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP
   const Elf32_Sym *const refsym = sym;
+#endif
   Elf32_Addr value;
   const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+#if !defined RESOLVE_CONFLICT_FIND_MAP
   struct link_map *sym_map = NULL;
+#endif
 
 #if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
   /* This is defined in rtld.c, but nowhere in the static libc.a; make the

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/dl-trampoline.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/dl-trampoline.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/dl-trampoline.S Sun Mar 11 00:01:40 2012
@@ -1,5 +1,5 @@
 /* PLT trampolines.  Sparc 32-bit version.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 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
@@ -48,17 +48,20 @@
 	.size	_dl_runtime_resolve, .-_dl_runtime_resolve
 
 	/* For the profiling cases we pass in our stack frame
-	 * as the base of the La_sparc64_regs, so it looks
+	 * as the base of the La_sparc32_regs, so it looks
 	 * like:
-	 *	%l0			%sp
+	 *	%l0			%sp + (0 * 8)
+	 *	%l1			%sp + (0 * 8) + 4
 	 *	...
-	 *	%l7			%sp + (7 * 8)
-	 *	%i0			%sp + (8 * 8)
+	 *	%l6			%sp + (3 * 8)
+	 *	%l7			%sp + (3 * 8) + 4
+	 *	%i0			%sp + (4 * 8)
+	 *	%i1			%sp + (4 * 8) + 4
 	 *	...
-	 *	%i7			%sp + (15 * 8)
-	 *	%f0			%sp + (16 * 8)
-	 *	%f16			%sp + (31 * 8)
-	 *	framesize		%sp + (32 * 8)
+	 *	%i6			%sp + (7 * 8)
+	 *	%i7			%sp + (7 * 8) + 4
+	 *	struct_ret_ptr		%sp + (8 * 8)
+	 *	framesize		%sp + (9 * 8)
 	 */
 
 	.globl	_dl_profile_save_regs
@@ -74,7 +77,7 @@
 	std	%i2, [%sp + ( 5 * 8)]
 	std	%i4, [%sp + ( 6 * 8)]
 	std	%i6, [%sp + ( 7 * 8)]
-	ld	[%sp + (8 * 8)], %l4
+	ld	[%fp + (8 * 8)], %l4
 	retl
 	 st	%l4, [%sp + (8 * 8)]
 
@@ -91,8 +94,11 @@
 _dl_profile_invoke:
 	cfi_startproc
 
-	sub	%sp, %l0, %sp
-1:
+	add	%l0, 7, %l0
+	andn	%l0, 7, %l0
+	add	%l0, 2 * 8, %g1
+
+	sub	%sp, %g1, %sp
 	srl	%l0, 3, %l7
 	mov	%o0, %l1
 	mov	%i0, %o0
@@ -101,8 +107,10 @@
 	mov	%i3, %o3
 	mov	%i4, %o4
 	mov	%i5, %o5
+	cmp	%l0, 0
 	mov	%fp, %l2
-	mov	%sp, %l3
+	be	2f
+	 add	%sp, (11 * 8), %l3
 1:	ldd	[%l2], %g2
 	add	%l2, 0x8, %l2
 	subcc	%l7, 1, %l7
@@ -110,7 +118,7 @@
 	bne	1b
 	 add	%l3, 0x8, %l3
 
-	jmpl	%l1, %o7
+2:	jmpl	%l1, %o7
 	 nop
 
 	std	%o0, [%sp + ( 9 * 8)]
@@ -118,11 +126,12 @@
 
 	mov	%l5, %o0
 	mov	%l6, %o1
-	add	%sp, %l0, %o2
+	add	%sp, (11 * 8), %o2
 	call	_dl_call_pltexit
-	 add	%sp, (16 * 8), %o3
+	 add	%sp, ( 9 * 8), %o3
 
-	ldd	[%sp + (9 * 8)], %i0
+	ldd	[%sp + ( 9 * 8)], %i0
+	ldd	[%sp + (10 * 8)], %f0
 
 	jmpl	%i7 + 8, %g0
 	 restore
@@ -142,11 +151,7 @@
 _dl_runtime_profile:
 	cfi_startproc
 
-	cmp	%fp, 0
-	be,a	1f
-	 mov	104, %g3
-	sub	%fp, %sp, %g3
-1:	save	%sp, -104, %sp
+	save	%sp, -104, %sp
 	cfi_def_cfa_register(%fp)
 	cfi_window_save
 	cfi_register(%o7, %i7)
@@ -156,20 +161,19 @@
 	mov	%i7, %o2
 	sub	%o1, 4*12, %o1
 
-	mov	%g3, %l0
 	mov	%o0, %l5
 	mov	%o1, %l6
 
-	call _dl_profile_save_regs
+	call	_dl_profile_save_regs
 	 nop
 
 	mov	%sp, %o3
 	call	_dl_profile_fixup
 	 add	%sp, (9 * 8), %o4
 
-	ld	[%sp + (9 * 8)], %o1
-	cmp	%o1, 0
-	bgeu	1f
+	ld	[%sp + (9 * 8)], %l0
+	cmp	%l0, 0
+	bl	1f
 	 nop
 	
 	call	_dl_profile_invoke

Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/dl-trampoline.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/dl-trampoline.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/dl-trampoline.S Sun Mar 11 00:01:40 2012
@@ -1,5 +1,5 @@
 /* PLT trampolines.  Sparc 64-bit version.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 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
@@ -158,8 +158,11 @@
 _dl_profile_invoke:
 	cfi_startproc
 
-	sub	%sp, %l0, %sp
-1:
+	add	%l0, 7, %l0
+	andn	%l0, 7, %l0
+	add	%l0, (8 * 8), %g1
+
+	sub	%sp, %g1, %sp
 	srlx	%l0, 3, %l7
 	mov	%o0, %l1
 	mov	%i0, %o0
@@ -169,7 +172,8 @@
 	mov	%i4, %o4
 	mov	%i5, %o5
 	add	%fp, STACK_BIAS, %l2
-	add	%sp, STACK_BIAS, %l3
+	brz	%l0, 2f
+	 add	%sp, STACK_BIAS, %l3
 1:	ldx	[%l2], %l4
 	add	%l2, 0x8, %l2
 	subcc	%l7, 1, %l7
@@ -177,7 +181,7 @@
 	bne,pt	%xcc, 1b
 	 add	%l3, 0x8, %l3
 
-	jmpl	%l1, %o7
+2:	jmpl	%l1, %o7
 	 nop
 
 	stx	%o0, [%sp + STACK_BIAS + (16 * 8)]
@@ -191,15 +195,18 @@
 
 	mov	%l5, %o0
 	mov	%l6, %o1
-	add	%sp, %l0, %o2
-	add	%sp, STACK_BIAS + (16 * 8), %o3
+	add	%sp, STACK_BIAS + (24 * 8), %o2
 	call	_dl_call_pltexit
-	 add	%o2, STACK_BIAS, %o2
+	 add	%sp, STACK_BIAS + (16 * 8), %o3
 
 	ldx	[%sp + STACK_BIAS + (16 * 8)], %i0
 	ldx	[%sp + STACK_BIAS + (17 * 8)], %i1
 	ldx	[%sp + STACK_BIAS + (18 * 8)], %i2
 	ldx	[%sp + STACK_BIAS + (19 * 8)], %i3
+	ldd	[%sp + STACK_BIAS + (20 * 8)], %f0
+	ldd	[%sp + STACK_BIAS + (21 * 8)], %f2
+	ldd	[%sp + STACK_BIAS + (22 * 8)], %f4
+	ldd	[%sp + STACK_BIAS + (23 * 8)], %f8
 
 	jmpl	%i7 + 8, %g0
 	 restore
@@ -219,10 +226,7 @@
 _dl_runtime_profile_0:
 	cfi_startproc
 
-	brz,a,pn %fp, 1f
-	 mov	192, %g5
-	sub	%fp, %sp, %g5
-1:	save	%sp, -336, %sp
+	save	%sp, -336, %sp
 	cfi_def_cfa_register(%fp)
 	cfi_window_save
 	cfi_register(%o7, %i7)
@@ -250,7 +254,6 @@
 	mov	%i7, %o2
 	sllx    %l0, 3, %o1
 
-	mov	%g5, %l0
 	mov	%o0, %l5
 	mov	%o1, %l6
 
@@ -261,8 +264,8 @@
 	call	_dl_profile_fixup
 	 add	%sp, (STACK_BIAS + (32 * 8)), %o4
 
-	ldx	[%sp + STACK_BIAS + (32 * 8)], %o1
-	brgez,pt %o1, 1f
+	ldx	[%sp + STACK_BIAS + (32 * 8)], %l0
+	brlz,pt %l0, 1f
 	 nop
 
 	call	_dl_profile_invoke
@@ -285,10 +288,7 @@
 _dl_runtime_profile_1:
 	cfi_startproc
 
-	brz,a,pn %fp, 1f
-	 mov	192, %g5
-	sub	%fp, %sp, %g5
-1:	save	%sp, -336, %sp
+	save	%sp, -336, %sp
 	cfi_def_cfa_register(%fp)
 	cfi_window_save
 	cfi_register(%o7, %i7)
@@ -300,7 +300,6 @@
 	mov	%i7, %o2
 	add	%o1, %o3, %o1
 
-	mov	%g5, %l0
 	mov	%o0, %l5
 	mov	%o1, %l6
 
@@ -311,8 +310,8 @@
 	call	_dl_profile_fixup
 	 add	%sp, (STACK_BIAS + (32 * 8)), %o4
 
-	ldx	[%sp + STACK_BIAS + (32 * 8)], %o1
-	brgez,pt %o1, 1f
+	ldx	[%sp + STACK_BIAS + (32 * 8)], %l0
+	brlz,pt %l0, 1f
 	 nop
 
 	call	_dl_profile_invoke

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits