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

[commits] r976 - in /fsf/trunk/libc: ./ elf/ nss/ stdlib/ sysdeps/powerpc/ sysdeps/unix/sysv/linux/powerpc/powerpc32/



Author: eglibc
Date: Wed Dec 20 00:01:43 2006
New Revision: 976

Log:
Import glibc-mainline for 2006-12-20

Added:
    fsf/trunk/libc/stdlib/tst-makecontext.c
    fsf/trunk/libc/stdlib/tst-rand48-2.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/elf/dl-support.c
    fsf/trunk/libc/nss/getXXbyYY_r.c
    fsf/trunk/libc/stdlib/Makefile
    fsf/trunk/libc/stdlib/jrand48_r.c
    fsf/trunk/libc/stdlib/tst-rand48.c
    fsf/trunk/libc/sysdeps/powerpc/dl-procinfo.c
    fsf/trunk/libc/sysdeps/powerpc/dl-procinfo.h
    fsf/trunk/libc/sysdeps/powerpc/sysdep.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Dec 20 00:01:43 2006
@@ -1,3 +1,50 @@
+2006-12-19  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	* nss/getXXbyYY_r.c: Include atomic.h.
+	(INTERNAL (REENTRANT_NAME)): Write startp after start_fct,
+	add atomic_write_barrier () in between.
+
+	* stdlib/Makefile (tests): Add tst-makecontext.
+	* stdlib/tst-makecontext.c: New test.
+
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
+	(__makecontext): Don't realign uc_mcontext.uc_regs.
+
+2006-11-28  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	* elf/dl-support.c: Include dl-procinfo.h.
+	* sysdeps/powerpc/dl-procinfo.h (PPC_PLATFORM_POWER4,
+	PPC_PLATFORM_PPC970, PPC_PLATFORM_POWER5, PPC_PLATFORM_POWER5_PLUS,
+	PPC_PLATFORM_POWER6, PPC_PLATFORM_CELL_BE, PPC_PLATFORM_POWER6X):
+	Define.
+	(_dl_string_platform): Use PPC_PLATFORM_* macros instead of
+	hardcoded constants.
+	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platform): Use
+	PPC_PLATFORM_* macros for array designators.
+
+2006-11-11  Steven Munroe  <sjmunroe@xxxxxxxxxx>
+
+	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 3 new cap
+	names to the beginning.
+	(_dl_powerpc_platforms): Add "power6x".
+	* sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease.
+	(HWCAP_IMPORTANT): Add PPC_FEATURE_HAS_DFP.
+	(_DL_PLATFORMS_COUNT): Increase.
+	(_dl_string_platform): Handle power6x case.
+	* sysdeps/powerpc/sysdep.h (PPC_FEATURE_PA6T, PPC_FEATURE_HAS_DFP,
+	PPC_FEATURE_POWER6_EXT): Define.
+	(PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS): Correct Comment.
+
+2006-12-18  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	[BZ #3747]
+	* stdlib/jrand48_r.c (__jrand48_r): Make sure result is in the
+	[-231 .. 231) range.
+	* stdlib/tst-rand48.c (main): Fix expected values for 64-bit
+	targets.
+	* stdlib/tst-rand48-2.c: New test.
+	* stdlib/Makefile (tests): Add tst-rand48-2.
+
 2006-12-14  Jakub Jelinek  <jakub@xxxxxxxxxx>
 
 	* misc/tst-pselect.c (do_test): Fix sigblock argument.

Modified: fsf/trunk/libc/elf/dl-support.c
==============================================================================
--- fsf/trunk/libc/elf/dl-support.c (original)
+++ fsf/trunk/libc/elf/dl-support.c Wed Dec 20 00:01:43 2006
@@ -29,6 +29,7 @@
 #include <bits/libc-lock.h>
 #include <dl-cache.h>
 #include <dl-librecon.h>
+#include <dl-procinfo.h>
 #include <unsecvars.h>
 #include <hp-timing.h>
 

Modified: fsf/trunk/libc/nss/getXXbyYY_r.c
==============================================================================
--- fsf/trunk/libc/nss/getXXbyYY_r.c (original)
+++ fsf/trunk/libc/nss/getXXbyYY_r.c Wed Dec 20 00:01:43 2006
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2002, 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1996.
 
@@ -18,6 +18,7 @@
    02111-1307 USA.  */
 
 #include <assert.h>
+#include <atomic.h>
 #include <errno.h>
 #include <stdbool.h>
 #include "nsswitch.h"
@@ -173,9 +174,6 @@
 	startp = (service_user *) -1l;
       else
 	{
-	  startp = nip;
-	  start_fct = fct.l;
-
 #ifdef NEED__RES
 	  /* The resolver code will really be used so we have to
 	     initialize it.  */
@@ -190,6 +188,11 @@
 	  if (!_res_hconf.initialized)
 	    _res_hconf_init ();
 #endif /* need _res_hconf */
+
+	  start_fct = fct.l;
+	  /* Make sure start_fct is written before startp.  */
+	  atomic_write_barrier ();
+	  startp = nip;
 	}
     }
   else

Modified: fsf/trunk/libc/stdlib/Makefile
==============================================================================
--- fsf/trunk/libc/stdlib/Makefile (original)
+++ fsf/trunk/libc/stdlib/Makefile Wed Dec 20 00:01:43 2006
@@ -67,7 +67,8 @@
 		   tst-xpg-basename tst-random tst-random2 tst-bsearch	    \
 		   tst-limits tst-rand48 bug-strtod tst-setcontext	    \
 		   test-a64l tst-qsort tst-system testmb2 bug-strtod2	    \
-		   tst-atof1 tst-atof2 tst-strtod2 tst-strtod3
+		   tst-atof1 tst-atof2 tst-strtod2 tst-strtod3 tst-rand48-2 \
+		   tst-makecontext
 
 include ../Makeconfig
 

Modified: fsf/trunk/libc/stdlib/jrand48_r.c
==============================================================================
--- fsf/trunk/libc/stdlib/jrand48_r.c (original)
+++ fsf/trunk/libc/stdlib/jrand48_r.c Wed Dec 20 00:01:43 2006
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 2001, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxxxxxx>, August 1995.
 
@@ -30,7 +30,7 @@
     return -1;
 
   /* Store the result.  */
-  *result = ((xsubi[2] << 16) | xsubi[1]) & 0xffffffffl;
+  *result = (int32_t) ((xsubi[2] << 16) | xsubi[1]);
 
   return 0;
 }

Added: fsf/trunk/libc/stdlib/tst-makecontext.c
==============================================================================
--- fsf/trunk/libc/stdlib/tst-makecontext.c (added)
+++ fsf/trunk/libc/stdlib/tst-makecontext.c Wed Dec 20 00:01:43 2006
@@ -1,0 +1,57 @@
+/* Copyright (C) 2006 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ucontext.h>
+
+ucontext_t ucp;
+char st1[8192];
+__thread int thr;
+
+void
+cf (int i)
+{
+  if (i != 78 || thr != 94)
+    {
+      printf ("i %d thr %d\n", i, thr);
+      exit (1);
+    }
+  exit (0);
+}
+
+int
+main (void)
+{
+  if (getcontext (&ucp) != 0)
+    {
+      puts ("getcontext failed");
+      return 1;
+    }
+  thr = 94;
+  ucp.uc_link = NULL;
+  ucp.uc_stack.ss_sp = st1;
+  ucp.uc_stack.ss_size = sizeof st1;
+  makecontext (&ucp, (void (*) ()) cf, 1, 78);
+  if (setcontext (&ucp) != 0)
+    {
+      puts ("setcontext failed");
+      return 1;
+    }
+  return 2;
+}

Added: fsf/trunk/libc/stdlib/tst-rand48-2.c
==============================================================================
--- fsf/trunk/libc/stdlib/tst-rand48-2.c (added)
+++ fsf/trunk/libc/stdlib/tst-rand48-2.c Wed Dec 20 00:01:43 2006
@@ -1,0 +1,113 @@
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+
+int
+main (void)
+{
+  time_t t = time (NULL);
+  int i, ret = 0;
+  double d;
+  long int l;
+  struct drand48_data data;
+  unsigned short int buf[3];
+
+  srand48 ((long int) t);
+  for (i = 0; i < 50; i++)
+    if ((d = drand48 ()) < 0.0 || d >= 1.0)
+      {
+        printf ("drand48 %d %g\n", i, d);
+        ret = 1;
+      }
+
+  srand48_r ((long int) t, &data);
+  for (i = 0; i < 50; i++)
+    if (drand48_r (&data, &d) != 0 || d < 0.0 || d >= 1.0)
+      {
+        printf ("drand48_r %d %g\n", i, d);
+        ret = 1;
+      }
+
+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
+  for (i = 0; i < 50; i++)
+    if ((d = erand48 (buf)) < 0.0 || d >= 1.0)
+      {
+        printf ("erand48 %d %g\n", i, d);
+        ret = 1;
+      }
+
+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
+  for (i = 0; i < 50; i++)
+    if (erand48_r (buf, &data, &d) != 0 || d < 0.0 || d >= 1.0)
+      {
+        printf ("erand48_r %d %g\n", i, d);
+        ret = 1;
+      }
+
+  srand48 ((long int) t);
+  for (i = 0; i < 50; i++)
+    if ((l = lrand48 ()) < 0 || l > INT32_MAX)
+      {
+        printf ("lrand48 %d %ld\n", i, l);
+        ret = 1;
+      }
+
+  srand48_r ((long int) t, &data);
+  for (i = 0; i < 50; i++)
+    if (lrand48_r (&data, &l) != 0 || l < 0 || l > INT32_MAX)
+      {
+        printf ("lrand48_r %d %ld\n", i, l);
+        ret = 1;
+      }
+
+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
+  for (i = 0; i < 50; i++)
+    if ((l = nrand48 (buf)) < 0 || l > INT32_MAX)
+      {
+        printf ("nrand48 %d %ld\n", i, l);
+        ret = 1;
+      }
+
+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
+  for (i = 0; i < 50; i++)
+    if (nrand48_r (buf, &data, &l) != 0 || l < 0 || l > INT32_MAX)
+      {
+        printf ("nrand48_r %d %ld\n", i, l);
+        ret = 1;
+      }
+
+  srand48 ((long int) t);
+  for (i = 0; i < 50; i++)
+    if ((l = mrand48 ()) < INT32_MIN || l > INT32_MAX)
+      {
+        printf ("mrand48 %d %ld\n", i, l);
+        ret = 1;
+      }
+
+  srand48_r ((long int) t, &data);
+  for (i = 0; i < 50; i++)
+    if (mrand48_r (&data, &l) != 0 || l < INT32_MIN || l > INT32_MAX)
+      {
+        printf ("mrand48_r %d %ld\n", i, l);
+        ret = 1;
+      }
+
+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
+  for (i = 0; i < 50; i++)
+    if ((l = jrand48 (buf)) < INT32_MIN || l > INT32_MAX)
+      {
+        printf ("jrand48 %d %ld\n", i, l);
+        ret = 1;
+      }
+
+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
+  for (i = 0; i < 50; i++)
+    if (jrand48_r (buf, &data, &l) != 0 || l < INT32_MIN || l > INT32_MAX)
+      {
+        printf ("jrand48_r %d %ld\n", i, l);
+        ret = 1;
+      }
+
+  return ret;
+}

Modified: fsf/trunk/libc/stdlib/tst-rand48.c
==============================================================================
--- fsf/trunk/libc/stdlib/tst-rand48.c (original)
+++ fsf/trunk/libc/stdlib/tst-rand48.c Wed Dec 20 00:01:43 2006
@@ -44,10 +44,10 @@
     }
 
   l = mrand48 ();
-  if (l != 0xa28c1003l)
-    {
-      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
-	      __LINE__ - 4, 0xa28c1003l, l);
+  if (l != -0x5d73effdl)
+    {
+      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
+	      __LINE__ - 4, -0x5d73effdl, l);
       result = 1;
     }
 
@@ -60,10 +60,10 @@
     }
 
   l = mrand48 ();
-  if (l != 0x9e88f474l)
-    {
-      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
-	      __LINE__ - 4, 0x9e88f474l, l);
+  if (l != -0x61770b8cl)
+    {
+      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
+	      __LINE__ - 4, -0x61770b8cl, l);
       result = 1;
     }
 
@@ -92,10 +92,10 @@
     }
 
   l = mrand48 ();
-  if (l != 0xeb7a1fa3l)
-    {
-      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
-	      __LINE__ - 4, 0xeb7a1fa3l, l);
+  if (l != -0x1485e05dl)
+    {
+      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
+	      __LINE__ - 4, -0x1485e05dl, l);
       result = 1;
     }
 
@@ -171,10 +171,10 @@
     }
 
   l = mrand48 ();
-  if (l != 0xa28c1003l)
-    {
-      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
-	      __LINE__ - 4, 0xa28c1003l, l);
+  if (l != -0x5d73effdl)
+    {
+      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
+	      __LINE__ - 4, -0x5d73effdl, l);
       result = 1;
     }
 
@@ -187,10 +187,10 @@
     }
 
   l = mrand48 ();
-  if (l != 0x9e88f474l)
-    {
-      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
-	      __LINE__ - 4, 0x9e88f474l, l);
+  if (l != -0x61770b8cl)
+    {
+      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
+	      __LINE__ - 4, -0x61770b8cl, l);
       result = 1;
     }
 
@@ -231,10 +231,10 @@
     }
 
   l = mrand48 ();
-  if (l != 0xeb7a1fa3l)
-    {
-      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
-	      __LINE__ - 4, 0xeb7a1fa3l, l);
+  if (l != -0x1485e05dl)
+    {
+      printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
+	      __LINE__ - 4, -0x1485e05dl, l);
       result = 1;
     }
 
@@ -287,10 +287,10 @@
     }
 
   l = jrand48 (xs);
-  if (l != 0xf568c7a0l)
+  if (l != -0xa973860l)
     {
       printf ("jrand48() in line %d failed: expected %lx, seen %lx\n",
-	      __LINE__ - 4, 0xf568c7a0l, l);
+	      __LINE__ - 4, -0xa973860l, l);
       result = 1;
     }
 

Modified: fsf/trunk/libc/sysdeps/powerpc/dl-procinfo.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/dl-procinfo.c (original)
+++ fsf/trunk/libc/sysdeps/powerpc/dl-procinfo.c Wed Dec 20 00:01:43 2006
@@ -46,10 +46,11 @@
 #if !defined PROCINFO_DECL && defined SHARED
   ._dl_powerpc_cap_flags
 #else
-PROCINFO_CLASS const char _dl_powerpc_cap_flags[20][10]
+PROCINFO_CLASS const char _dl_powerpc_cap_flags[23][10]
 #endif
 #ifndef PROCINFO_DECL
 = {
+    "power6x", "dfp", "pa6t",
     "arch_2_05", "ic_snoop", "smt", "booke",
     "cellbe", "power5+", "power5", "power4",
     "notb", "efpdouble", "efpsingle", "spe",
@@ -66,11 +67,17 @@
 #if !defined PROCINFO_DECL && defined SHARED
   ._dl_powerpc_platforms
 #else
-PROCINFO_CLASS const char _dl_powerpc_platforms[6][12]
+PROCINFO_CLASS const char _dl_powerpc_platforms[7][12]
 #endif
 #ifndef PROCINFO_DECL
 = {
-    "power4", "ppc970", "power5", "power5+", "power6", "ppc-cell-be"
+    [PPC_PLATFORM_POWER4] = "power4",
+    [PPC_PLATFORM_PPC970] = "ppc970",
+    [PPC_PLATFORM_POWER5] = "power5",
+    [PPC_PLATFORM_POWER5_PLUS] = "power5+",
+    [PPC_PLATFORM_POWER6] = "power6",
+    [PPC_PLATFORM_CELL_BE] = "ppc-cell-be",
+    [PPC_PLATFORM_POWER6X] = "power6x"
   }
 #endif
 #if !defined SHARED || defined PROCINFO_DECL

Modified: fsf/trunk/libc/sysdeps/powerpc/dl-procinfo.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/dl-procinfo.h (original)
+++ fsf/trunk/libc/sysdeps/powerpc/dl-procinfo.h Wed Dec 20 00:01:43 2006
@@ -24,18 +24,28 @@
 #include <sysdep.h>		/* This defines the PPC_FEATURE_* macros.  */
 
 /* There are 20 bits used, but they are bits 12..31.  */
-#define _DL_HWCAP_FIRST		12
+#define _DL_HWCAP_FIRST		9
 #define _DL_HWCAP_COUNT		32
 
 /* These bits influence library search.  */
-#define HWCAP_IMPORTANT		(PPC_FEATURE_HAS_ALTIVEC)
+#define HWCAP_IMPORTANT		(PPC_FEATURE_HAS_ALTIVEC \
+				+ PPC_FEATURE_HAS_DFP)
 
-#define _DL_PLATFORMS_COUNT	6
+#define _DL_PLATFORMS_COUNT	7
 
 #define _DL_FIRST_PLATFORM      32
 /* Mask to filter out platforms.  */
 #define _DL_HWCAP_PLATFORM      (((1ULL << _DL_PLATFORMS_COUNT) - 1) \
                                  << _DL_FIRST_PLATFORM)
+
+/* Platform bits (relative to _DL_FIRST_PLATFORM).  */
+#define PPC_PLATFORM_POWER4		0
+#define PPC_PLATFORM_PPC970		1
+#define PPC_PLATFORM_POWER5		2
+#define PPC_PLATFORM_POWER5_PLUS	3
+#define PPC_PLATFORM_POWER6		4
+#define PPC_PLATFORM_CELL_BE		5
+#define PPC_PLATFORM_POWER6X		6
 
 static inline const char *
 __attribute__ ((unused))
@@ -68,22 +78,30 @@
   if (str == NULL)
     return -1;
 
-  if (strncmp (str, GLRO(dl_powerpc_platforms)[0], 5) == 0)
+  if (strncmp (str, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_POWER4], 5) == 0)
     {
       int ret;
       str += 5;
       switch (*str)
 	{
 	case '4':
-	  ret = _DL_FIRST_PLATFORM + 0;
+	  ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER4;
 	  break;
 	case '5':
-	  ret = _DL_FIRST_PLATFORM + 2;
+	  ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5;
 	  if (str[1] == '+')
-	    ++ret, ++str;
+	    {
+	      ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5_PLUS;
+	      ++str;
+	    }
 	  break;
 	case '6':
-	  ret = _DL_FIRST_PLATFORM + 4;
+	  ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6;
+	  if (str[1] == 'x')
+	    {
+	      ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6X;
+	      ++str;
+	    }
 	  break;
 	default:
 	  return -1;
@@ -91,12 +109,16 @@
       if (str[1] == '\0')
 	return ret;
     }
-  else if (strncmp (str, GLRO(dl_powerpc_platforms)[1], 3) == 0)
+  else if (strncmp (str, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC970],
+		    3) == 0)
     {
-      if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[1] + 3) == 0)
-	return _DL_FIRST_PLATFORM + 1;
-      else if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[5] + 3) == 0)
-	return _DL_FIRST_PLATFORM + 5;
+      if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC970]
+			   + 3) == 0)
+	return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC970;
+      else if (strcmp (str + 3,
+		       GLRO(dl_powerpc_platforms)[PPC_PLATFORM_CELL_BE] + 3)
+	       == 0)
+	return _DL_FIRST_PLATFORM + PPC_PLATFORM_CELL_BE;
     }
 
   return -1;

Modified: fsf/trunk/libc/sysdeps/powerpc/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/powerpc/sysdep.h Wed Dec 20 00:01:43 2006
@@ -34,13 +34,16 @@
 #define PPC_FEATURE_HAS_EFP_DOUBLE	0x00200000 /* SPE Double.  */
 #define PPC_FEATURE_NO_TB		0x00100000 /* 601/403gx have no timebase */
 #define PPC_FEATURE_POWER4		0x00080000 /* POWER4 ISA 2.00 */
-#define PPC_FEATURE_POWER5		0x00040000 /* POWER5 ISA 2.01 */
-#define PPC_FEATURE_POWER5_PLUS		0x00020000 /* POWER5+ ISA 2.02 */
+#define PPC_FEATURE_POWER5		0x00040000 /* POWER5 ISA 2.02 */
+#define PPC_FEATURE_POWER5_PLUS		0x00020000 /* POWER5+ ISA 2.03 */
 #define PPC_FEATURE_CELL_BE		0x00010000 /* CELL Broadband Engine */
 #define PPC_FEATURE_BOOKE		0x00008000
-#define PPC_FEATURE_SMT			0x00004000
+#define PPC_FEATURE_SMT			0x00004000 /* Simultaneous Multi-Threading */
 #define PPC_FEATURE_ICACHE_SNOOP	0x00002000
 #define PPC_FEATURE_ARCH_2_05		0x00001000 /* ISA 2.05 */
+#define PPC_FEATURE_PA6T		0x00000800 /* PA Semi 6T Core */
+#define PPC_FEATURE_HAS_DFP		0x00000400 /* Decimal FP Unit */
+#define PPC_FEATURE_POWER6_EXT		0x00000200 /* P6 + mffgpr/mftgpr */
 #define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC)
 
 #ifdef __ASSEMBLER__

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S Wed Dec 20 00:01:43 2006
@@ -26,9 +26,7 @@
 
 ENTRY(__makecontext)
 	/* Set up the first 7 args to the function in its registers */
-	addi	r11,r3,_UC_REG_SPACE+12
-	clrrwi  r11,r11,4
-	stw	r11,_UC_REGS_PTR(r3)
+	lwz	r11,_UC_REGS_PTR(r3)
 	stw	r6,_UC_GREGS+(PT_R3*4)(r11)
 	stw	r7,_UC_GREGS+(PT_R4*4)(r11)
 	stw	r8,_UC_GREGS+(PT_R5*4)(r11)