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

r3039 - in glibc-package/trunk/debian: . patches patches/hppa patches/sparc



Author: aurel32
Date: 2008-08-07 07:25:26 +0000 (Thu, 07 Aug 2008)
New Revision: 3039

Added:
   glibc-package/trunk/debian/patches/hppa/local-context.diff
   glibc-package/trunk/debian/patches/sparc/cvs-context.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * patches/sparc/cvs-context.diff: new patch from upstream to add
    getcontext(), setcontext(), makecontext() on Sparc.  Closes: #295173.
  * patches/hppa/local-context.diff: new patch from Helge Deller to add
    getcontext(), setcontext(), makecontext() on PARISC.  Closes: #492778.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2008-08-07 02:16:08 UTC (rev 3038)
+++ glibc-package/trunk/debian/changelog	2008-08-07 07:25:26 UTC (rev 3039)
@@ -6,6 +6,10 @@
   [ Aurelien Jarno ]
   * patches/mips/cvs-mknod.diff: new patch from upstream to allow > 255 minors
     on mips.  Closes: #493751.
+  * patches/sparc/cvs-context.diff: new patch from upstream to add
+    getcontext(), setcontext(), makecontext() on Sparc.  Closes: #295173.
+  * patches/hppa/local-context.diff: new patch from Helge Deller to add
+    getcontext(), setcontext(), makecontext() on PARISC.  Closes: #492778.
 
   [ Samuel Thibault ]
   * patches/hurd-i386/cvs-lock-memory-clobber.diff: new patch from upstream

Added: glibc-package/trunk/debian/patches/hppa/local-context.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/local-context.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hppa/local-context.diff	2008-08-07 07:25:26 UTC (rev 3039)
@@ -0,0 +1,491 @@
+diff -up ports/sysdeps/unix/sysv/linux/hppa/Makefile.org ports/sysdeps/unix/sysv/linux/hppa/Makefile
+--- ports/sysdeps/unix/sysv/linux/hppa/Makefile.org	2008-07-16 19:41:29.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/hppa/Makefile	2008-07-16 19:41:37.000000000 +0200
+@@ -1,2 +1,7 @@
+ # linux/hppa does not use -lmilli anymore
+ gnulib := -lgcc
++
++ifeq ($(subdir),stdlib)
++gen-as-const-headers += ucontext_i.sym
++endif
++
+diff -up ports/sysdeps/unix/sysv/linux/hppa/getcontext.S.org ports/sysdeps/unix/sysv/linux/hppa/getcontext.S
+--- ports/sysdeps/unix/sysv/linux/hppa/getcontext.S.org	2008-07-16 19:52:11.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/hppa/getcontext.S	2008-07-18 23:34:32.000000000 +0200
+@@ -0,0 +1,101 @@
++/* Get current user context.
++   Copyright (C) 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Helge Deller <deller@gmx.de>, 2008.
++
++   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 <sysdep.h>
++
++#include "ucontext_i.h"
++
++ENTRY(__getcontext)
++	/* Save the register.  */
++	stw	%r0, oR0(%r26)
++	stw	%r1, oR1(%r26)
++	stw	%r2, oR2(%r26)
++	stw	%r3, oR3(%r26)
++	stw	%r4, oR4(%r26)
++	stw	%r5, oR5(%r26)
++	stw	%r6, oR6(%r26)
++	stw	%r7, oR7(%r26)
++	stw	%r8, oR8(%r26)
++	stw	%r9, oR9(%r26)
++	stw	%r10, oR10(%r26)
++	stw	%r11, oR11(%r26)
++	stw	%r12, oR12(%r26)
++	stw	%r13, oR13(%r26)
++	stw	%r14, oR14(%r26)
++	stw	%r15, oR15(%r26)
++	stw	%r16, oR16(%r26)
++	stw	%r17, oR17(%r26)
++	stw	%r18, oR18(%r26)
++	stw	%r19, oR19(%r26)
++	stw	%r20, oR20(%r26)
++	stw	%r21, oR21(%r26)
++	stw	%r22, oR22(%r26)
++	stw	%r23, oR23(%r26)
++	stw	%r24, oR24(%r26)
++	stw	%r25, oR25(%r26)
++	stw	%r26, oR26(%r26)
++	stw	%r27, oR27(%r26)
++	stw	%r28, oR28(%r26)
++	stw	%r29, oR29(%r26)
++	ldo	-64(%sp), %r1	/* Calculate %sp in %r1.  */
++	stw	%r1, oR30(%r26)	/* Save new %sp.  */
++	stw	%r31, oR31(%r26)
++
++	stw	%r0, oUC_FLAGS(%r26)
++	stw	%r0, oUC_LINK(%r26)
++	stw	%r1, oSS_SP(%r26)  /* New %sp.  */
++	stw	%r0, oSS_FLAGS(%r26)
++	stw	%r0, oSS_SIZE(%r26)
++
++	stw	%r0, oSC_FLAGS(%r26)
++
++	stw	%r0, oIASQ0(%r26)
++	stw	%r0, oIASQ1(%r26)
++	stw	%r0, oIAOQ0(%r26)
++	stw	%r0, oIAOQ1(%r26)
++	stw	%r0, oSAR(%r26)
++
++	/* Store floating-point regs.  */
++	/* fstd	%fr0, oFP0(%r26)  */
++
++
++	/* Prologue */
++	stwm	%r4, 64(%r30)
++#ifdef PIC
++	stw	%r19, -32(%r30)
++#endif
++
++	/* Save the current signal mask.  */
++	/* sigprocmask(SIG_BLOCK, NULL, &ucp->uc_sigmask);  */
++	ldo	oSIGMASK(%r26), %r24
++	copy	%r0, %r25
++	bl	sigprocmask, %r2
++	ldi	SIG_BLOCK, %r26
++
++	/* Epilogue */
++	ldw	-84(%r30), %r2
++#ifdef PIC
++	ldw	-96(%r30), %r19
++#endif
++	bv	%r0(%r2)
++	ldwm	-64(%r30), %r4
++END(__getcontext)
++
++weak_alias (__getcontext, getcontext)
+diff -up ports/sysdeps/unix/sysv/linux/hppa/makecontext.c.org ports/sysdeps/unix/sysv/linux/hppa/makecontext.c
+--- ports/sysdeps/unix/sysv/linux/hppa/makecontext.c.org	2008-07-16 21:41:02.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/hppa/makecontext.c	2008-07-16 22:16:29.000000000 +0200
+@@ -0,0 +1,79 @@
++/* Create new context.
++   Copyright (C) 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Helge Deller <deller@gmx.de>, 2008.
++
++   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 <libintl.h>
++#include <stdarg.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <sysdep.h>
++#include <ucontext.h>
++
++/* XXX: This implementation only handles integer arguments.  */
++
++void
++__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
++{
++  unsigned int *sp;
++  va_list ap;
++  int i;
++
++  if (argc > 8)
++    {
++      fprintf (stderr, _("\
++makecontext: does not know how to handle more than 8 arguments\n"));
++      exit (-1);
++    }
++
++  /* Generate room on stack for parameter if needed and uc_link.  */
++  sp = (unsigned int *) ucp->uc_stack.ss_sp;
++
++  /* Address to jump to.  */
++  ucp->uc_mcontext.sc_gr[2] = (unsigned long) func;
++
++  va_start (ap, argc);
++  /* Handle arguments.  */
++  for (i = 0; i < argc; ++i)
++    switch (i)
++      {
++      case 0:
++      case 1:
++      case 2:
++      case 3:
++      	ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int);
++	break;
++      case 4:
++      case 5:
++      case 6:
++      case 7:
++	if (sizeof(unsigned long) == 4) {
++		/* 32bit: put arg7-arg4 on stack.  */
++		sp[7-i] = va_arg (ap, int);
++	} else {
++		/* 64bit: r19-r22 are arg7-arg4.  */
++		ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int);
++	}
++	break;
++      }
++  va_end (ap);
++
++}
++
++
++weak_alias(__makecontext, makecontext)
+diff -up ports/sysdeps/unix/sysv/linux/hppa/setcontext.S.org ports/sysdeps/unix/sysv/linux/hppa/setcontext.S
+--- ports/sysdeps/unix/sysv/linux/hppa/setcontext.S.org	2008-07-16 22:29:10.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/hppa/setcontext.S	2008-07-18 23:34:23.000000000 +0200
+@@ -0,0 +1,124 @@
++/* Install given context.
++   Copyright (C) 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Helge Deller <deller@gmx.de>, 2008.
++
++   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 <sysdep.h>
++
++#include "ucontext_i.h"
++
++
++ENTRY(__setcontext)
++	/* Prologue */
++	stwm	%r3, 64(%r30)
++#ifdef PIC
++	stw	%r19, -32(%r30)
++#endif
++
++	/* Save ucp.  */
++	copy	%r26, %r3
++
++L(_again):
++	/* Set the current signal mask.  */
++	/* sigprocmask(SIG_BLOCK, &ucp->uc_sigmask, NULL);  */
++	copy	%r0, %r24
++	ldo	oSIGMASK(%r3), %r25
++	bl	sigprocmask, %r2
++	ldi	SIG_SETMASK, %r26
++
++	comib,<> 0,%ret0,L(_error)
++	nop
++
++	/* Save %sp, %dp.  */
++	copy	%sp, %r4
++	copy	%dp, %r5
++	copy	%r19, %r6
++
++	/* Get the registers.  */
++	ldw	oR1(%r3), %r1
++	ldw	oR2(%r3), %r2
++	/* ldw	oR3(%r3), %r3 - used for ucp pointer.	*/
++	/* ldw	oR4(%r3), %r4 - used for original %sp.	*/
++	/* ldw	oR5(%r3), %r5 - used for %dp / %r27.	*/
++	/* ldw	oR6(%r3), %r6 - used for %r19.		*/
++	ldw	oR7(%r3), %r7
++	ldw	oR8(%r3), %r8
++	ldw	oR9(%r3), %r9
++	ldw	oR10(%r3), %r10
++	ldw	oR11(%r3), %r11
++	ldw	oR12(%r3), %r12
++	ldw	oR13(%r3), %r13
++	ldw	oR14(%r3), %r14
++	ldw	oR15(%r3), %r15
++	ldw	oR16(%r3), %r16
++	ldw	oR17(%r3), %r17
++	ldw	oR18(%r3), %r18
++	ldw	oR19(%r3), %r19
++	ldw	oR20(%r3), %r20
++	ldw	oR21(%r3), %r21
++	/* ldw	oR22(%r3), %r22 - dyncall arg.  */
++	ldw	oR23(%r3), %r23
++	ldw	oR24(%r3), %r24
++	ldw	oR25(%r3), %r25
++	ldw	oR26(%r3), %r26
++	ldw	oR27(%r3), %r27
++	ldw	oR28(%r3), %r28
++	ldw	oR29(%r3), %r29
++	ldw	oR30(%r3), %r30
++	ldw	oR31(%r3), %r31
++
++	/* Restore floating-point registers.  */
++	/* fldd	oFP0(%r3),%fr0  */
++
++
++	/* Calculate new stack pointer.  */
++	ldw	oSS_SP(%r3), %sp
++	ldo	64(%sp), %sp
++
++	/* Call function.  */
++	copy	%r2, %r22
++	bl	$$dyncall, %r31
++	copy	%r31, %r2
++
++	/* We return here. Get new ucp in %r3, reload %sp.  */
++	ldw	oUC_LINK(%r3), %r3
++	copy	%r4, %sp
++	copy	%r5, %dp
++	copy	%r6, %r19
++
++	/* If ucp == NULL then exit().  */
++	comib,<> 0,%r3,L(_again)
++	nop
++
++	/* If we looped through all uc_link contexts, exit now.  */
++	bl	_exit, %r2
++	ldi	-1, %r26
++	
++
++L(_error):
++	/* Epilogue */
++	ldw	-84(%r30), %r2
++#ifdef PIC
++	ldw	-96(%r30), %r19
++#endif
++	bv	%r0(%r2)
++	ldwm	-64(%r30), %r3
++L(pseudo_end):
++PSEUDO_END(__setcontext)
++
++weak_alias(__setcontext, setcontext)
+diff -up ports/sysdeps/unix/sysv/linux/hppa/swapcontext.c.org ports/sysdeps/unix/sysv/linux/hppa/swapcontext.c
+--- ports/sysdeps/unix/sysv/linux/hppa/swapcontext.c.org	2008-07-17 00:37:11.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/hppa/swapcontext.c	2008-07-18 23:07:15.000000000 +0200
+@@ -0,0 +1,66 @@
++/* swap to new context.
++   Copyright (C) 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Helge Deller <deller@gmx.de>, 2008.
++
++   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 <ucontext.h>
++
++extern int __getcontext (ucontext_t *ucp);
++extern int __setcontext (const ucontext_t *ucp);
++
++int
++__swapcontext (ucontext_t *oucp, const ucontext_t *ucp)
++{
++  extern void __swapcontext_ret (void);
++
++  /* Save the current machine context to oucp.  */
++  __getcontext (oucp);
++
++  /* uc_flags helps to skip the __setcontext call on reactivation.  */
++  if (++oucp->uc_flags == 1) {
++  	/* Temporarily save a few registers in r23-r26 which would be
++	 * overwritten by setcontext(). Set up the jump to __swapcontext_ret,
++	 * where the registers will be restored and then returned to the
++	 * above uc_flags == 1 test.  */
++  	oucp->uc_mcontext.sc_gr[20] = oucp->uc_mcontext.sc_gr[2];
++  	oucp->uc_mcontext.sc_gr[2] = (unsigned long) __swapcontext_ret;
++  	oucp->uc_mcontext.sc_gr[23] = oucp->uc_mcontext.sc_gr[3];
++  	oucp->uc_mcontext.sc_gr[24] = oucp->uc_mcontext.sc_gr[4];
++  	oucp->uc_mcontext.sc_gr[25] = oucp->uc_mcontext.sc_gr[5];
++  	oucp->uc_mcontext.sc_gr[26] = oucp->uc_mcontext.sc_gr[6];
++
++	/* Restore the machine context in ucp.  */
++  	__setcontext (ucp);
++  }
++  return 0;
++}
++
++asm ("							\n\
++	.text						\n\
++	.type	__swapcontext_ret, #function		\n\
++__swapcontext_ret:					\n\
++	copy	%r23, %r3				\n\
++	copy	%r24, %r4				\n\
++	copy	%r25, %r5				\n\
++	copy	%r26, %r6				\n\
++	bv	0(%r20)					\n\
++	copy	%r0, %ret0				\n\
++	.size	__swapcontext_ret, .-__swapcontext_ret	\n\
++     ");
++
++weak_alias (__swapcontext, swapcontext)
+diff -up ports/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym.org ports/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym
+--- ports/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym.org	2008-07-16 19:27:46.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym	2008-07-18 23:17:07.000000000 +0200
+@@ -0,0 +1,90 @@
++#include <stddef.h>
++#include <signal.h>
++#include <sys/ucontext.h>
++
++--
++
++SIG_BLOCK
++SIG_SETMASK
++
++#define ucontext(member)	offsetof (ucontext_t, member)
++#define mcontext(member)	ucontext (uc_mcontext.member)
++#define mreg(reg)		mcontext (sc_gr[reg])
++
++oUC_FLAGS	ucontext (uc_flags)
++oUC_LINK	ucontext (uc_link)
++oSS_SP		ucontext (uc_stack.ss_sp)
++oSS_FLAGS	ucontext (uc_stack.ss_flags)
++oSS_SIZE	ucontext (uc_stack.ss_size)
++oSC_FLAGS	mcontext (sc_flags)
++oR0		mreg (0)
++oR1		mreg (1)
++oR2		mreg (2)
++oR3		mreg (3)
++oR4		mreg (4)
++oR5		mreg (5)
++oR6		mreg (6)
++oR7		mreg (7)
++oR8		mreg (8)
++oR9		mreg (9)
++oR10		mreg (10)
++oR11		mreg (11)
++oR12		mreg (12)
++oR13		mreg (13)
++oR14		mreg (14)
++oR15		mreg (15)
++oR16		mreg (16)
++oR17		mreg (17)
++oR18		mreg (18)
++oR19		mreg (19)
++oR20		mreg (20)
++oR21		mreg (21)
++oR22		mreg (22)
++oR23		mreg (23)
++oR24		mreg (24)
++oR25		mreg (25)
++oR26		mreg (26)
++oR27		mreg (27)
++oR28		mreg (28)
++oR29		mreg (29)
++oR30		mreg (30)
++oR31		mreg (31)
++oFPREGS		mcontext (sc_fr)
++oFP0		mcontext (sc_fr[0])
++oFP1		mcontext (sc_fr[1])
++oFP2		mcontext (sc_fr[2])
++oFP3		mcontext (sc_fr[3])
++oFP4		mcontext (sc_fr[4])
++oFP5		mcontext (sc_fr[5])
++oFP6		mcontext (sc_fr[6])
++oFP7		mcontext (sc_fr[7])
++oFP8		mcontext (sc_fr[8])
++oFP9		mcontext (sc_fr[9])
++oFP10		mcontext (sc_fr[10])
++oFP11		mcontext (sc_fr[11])
++oFP12		mcontext (sc_fr[12])
++oFP13		mcontext (sc_fr[13])
++oFP14		mcontext (sc_fr[14])
++oFP15		mcontext (sc_fr[15])
++oFP16		mcontext (sc_fr[16])
++oFP17		mcontext (sc_fr[17])
++oFP18		mcontext (sc_fr[18])
++oFP19		mcontext (sc_fr[19])
++oFP20		mcontext (sc_fr[20])
++oFP21		mcontext (sc_fr[21])
++oFP22		mcontext (sc_fr[22])
++oFP23		mcontext (sc_fr[23])
++oFP24		mcontext (sc_fr[24])
++oFP25		mcontext (sc_fr[25])
++oFP26		mcontext (sc_fr[26])
++oFP27		mcontext (sc_fr[27])
++oFP28		mcontext (sc_fr[28])
++oFP29		mcontext (sc_fr[29])
++oFP30		mcontext (sc_fr[30])
++oFP31		mcontext (sc_fr[31])
++oIASQ0		mcontext (sc_iasq[0])
++oIASQ1		mcontext (sc_iasq[1])
++oIAOQ0		mcontext (sc_iaoq[0])
++oIAOQ1		mcontext (sc_iaoq[1])
++oSAR		mcontext (sc_sar)
++oSIGMASK	ucontext (uc_sigmask)

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2008-08-07 02:16:08 UTC (rev 3038)
+++ glibc-package/trunk/debian/patches/series	2008-08-07 07:25:26 UTC (rev 3039)
@@ -75,6 +75,7 @@
 hppa/local-inlining.diff -p0
 hppa/local-linuxthreads.diff -p0
 hppa/local-linuxthreads-gscope.diff -p0
+patches/hppa/local-context.diff -p0
 
 hurd-i386/local-dl-dynamic-weak.diff 
 hurd-i386/local-enable-ldconfig.diff -p0
@@ -135,6 +136,7 @@
 sh4/local-fpscr_values.diff -p0
 sh4/cvs-nptl-private-futexes.diff -p0
 
+sparc/cvs-context.diff -p1
 sparc/local-fork.diff -p0
 sparc/local-sparcv9-target.diff -p0
 sparc/submitted-timing.diff 

Added: glibc-package/trunk/debian/patches/sparc/cvs-context.diff
===================================================================
--- glibc-package/trunk/debian/patches/sparc/cvs-context.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/sparc/cvs-context.diff	2008-08-07 07:25:26 UTC (rev 3039)
@@ -0,0 +1,532 @@
+2008-05-01  David S. Miller  <davem@davemloft.net>
+ 
+	* sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym: New file.
+	* sysdeps/unix/sysv/linux/sparc/sparc32/Makefile [$(subdir) = stdlib]:
+	(gen-as-const-headers): Add it.
+	* sysdeps/unix/sysv/linux/sparc/sparc32/getcontext.S: New file.
+	* sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/sparc32/swapcontext.S: Likewise.
+	
+diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
+index cd1b3fb..8f7e76b 100644
+--- a/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
+@@ -2,6 +2,10 @@ asm-CPPFLAGS = -D__ASSEMBLY__
+ ASFLAGS-.os += -fPIC
+ LD += -melf32_sparc
+ 
++ifeq ($(subdir),stdlib)
++gen-as-const-headers += ucontext_i.sym
++endif
++
+ # When I get this to work, this is the right thing
+ ifeq ($(subdir),elf)
+ CFLAGS-rtld.c += -mcpu=v8
+diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/getcontext.S b/sysdeps/unix/sysv/linux/sparc/sparc32/getcontext.S
+new file mode 100644
+index 0000000..f8664a7
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/getcontext.S
+@@ -0,0 +1,85 @@
++/* Save current context.
++   Copyright (C) 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by David S. Miller <davem@davemloft.net>, 2008.
++
++   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 <sysdep.h>
++
++#include "ucontext_i.h"
++
++/*  int __getcontext (ucontext_t *ucp)
++
++  Saves the machine context in UCP such that when it is activated,
++  it appears as if __getcontext() returned again.
++
++  This implementation is intended to be used for *synchronous* context
++  switches only.  Therefore, it does not have to save anything
++  other than the PRESERVED state.  */
++
++
++ENTRY(__getcontext)
++	save	%sp, -112, %sp
++	st	%g0, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_PSR]
++
++	/* In reality, we only use the GREG_PC value when setting
++	   or swapping contexts.  But we fill in NPC for completeness.  */
++	add	%i7, 8, %o0
++	st	%o0, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_PC]
++	add	%o0, 4, %o0
++	st	%o0, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_NPC]
++
++	rd	%y, %o1
++	st	%o1, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_Y]
++
++	st	%g1, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G1]
++	st	%g2, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G2]
++	st	%g3, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G3]
++	st	%g4, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G4]
++	st	%g5, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G5]
++	st	%g6, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G6]
++	st	%g7, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G7]
++
++	mov	SIG_BLOCK, %o0
++	clr	%o1
++	add	%i0, UC_SIGMASK, %o2
++	mov	8, %o3
++	mov	__NR_rt_sigprocmask, %g1
++	ta	0x10
++
++	/* Zero, success, return value.  */
++	st	%g0, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O0]
++	st	%i1, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O1]
++	st	%i2, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O2]
++	st	%i3, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O3]
++	st	%i4, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O4]
++	st	%i5, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O5]
++	st	%i6, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O6]
++	st	%i7, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O7]
++
++	st	%g0, [%i0 + UC_MCONTEXT + MC_GWINS]
++
++	/* Do not save FPU state, it is volatile across calls.  */
++	stb	%g0, [%i0 + UC_MCONTEXT + MC_FPREGS + FPU_EN]
++
++	st	%g0, [%i0 + UC_MCONTEXT + MC_XRS + XRS_ID]
++	st	%g0, [%i0 + UC_MCONTEXT + MC_XRS + XRS_PTR]
++	jmpl	%i7 + 8, %g0
++	 restore %g0, %g0, %o0
++END(__getcontext)
++
++weak_alias (__getcontext, getcontext)
+diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c b/sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c
+new file mode 100644
+index 0000000..9b48dad
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c
+@@ -0,0 +1,93 @@
++/* Create new context.
++   Copyright (C) 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by David S. Miller <davem@davemloft.net>, 2008.
++
++   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 <sysdep.h>
++#include <stdarg.h>
++#include <stdint.h>
++#include <ucontext.h>
++
++/* Sets up the outgoing arguments and the program counter for a user
++   context for the requested function call.
++
++   Returning to the correct parent context is pretty simple on
++   Sparc.  We only need to link up the register windows correctly.
++   Since global registers are clobbered by calls, we need not be
++   concernred about those, and thus is all could be worked out without
++   using a trampoline.
++
++   Except that we must deal with the signal mask, thus a trampoline
++   is unavoidable. 32-bit stackframe layout:
++	      +-----------------------------------------+
++	      | 7th and further parameters		|
++	      +-----------------------------------------+
++	      | backup storage for initial 6 parameters |
++	      +-----------------------------------------+
++	      | struct return pointer			|
++	      +-----------------------------------------+
++	      | 8 incoming registers			|
++	      +-----------------------------------------+
++	      | 8 local registers			|
++     %sp -->  +-----------------------------------------+
++
++*/
++
++void
++__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
++{
++  extern void __start_context (void);
++  unsigned long int *sp;
++  va_list ap;
++  int i;
++
++  sp = (unsigned long int *) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
++  sp -= 16 + 7 + argc;
++  sp = (unsigned long int *) (((uintptr_t) sp) & ~(8 - 1));
++
++  for (i = 0; i < 8; i++)
++    sp[i + 8] = ucp->uc_mcontext.gregs[REG_O0 + i];
++
++  /* The struct return pointer is essentially unused, so we can
++     place the link there.  */
++  sp[16] = (unsigned long int) ucp->uc_link;
++
++  va_start (ap, argc);
++
++  /* Fill in outgoing arguments, including those which will
++     end up being passed on the stack.  */
++  for (i = 0; i < argc; i++)
++    {
++      unsigned long int arg = va_arg (ap, unsigned long int);
++      if (i < 6)
++	ucp->uc_mcontext.gregs[REG_O0 + i] = arg;
++      else
++	sp[i + 23] = arg;
++    }
++
++  va_end (ap);
++
++  ucp->uc_mcontext.gregs[REG_O6] = (unsigned long int) sp;
++
++  ucp->uc_mcontext.gregs[REG_O7] = ((unsigned long int) __start_context) - 8;
++
++  ucp->uc_mcontext.gregs[REG_PC] = (unsigned long int) func;
++  ucp->uc_mcontext.gregs[REG_nPC] = ucp->uc_mcontext.gregs[REG_PC] + 4;
++}
++
++weak_alias (__makecontext, makecontext)
+diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S b/sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S
+new file mode 100644
+index 0000000..33e40ac
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S
+@@ -0,0 +1,119 @@
++/* Install given context.
++   Copyright (C) 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by David S. Miller <davem@davemloft.net>, 2008.
++
++   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 <sysdep.h>
++#include <sys/trap.h>
++
++#include "ucontext_i.h"
++
++
++/*  int __setcontext (const ucontext_t *ucp)
++
++  Restores the machine context in UCP and thereby resumes execution
++  in that context.
++
++  This implementation is intended to be used for *synchronous* context
++  switches only.  Therefore, it does not have to restore anything
++  other than the PRESERVED state.  */
++
++ENTRY(__setcontext)
++	save	%sp, -112, %sp
++
++	mov	SIG_SETMASK, %o0
++	add	%i0, UC_SIGMASK, %o1
++	clr	%o2
++	mov	8, %o3
++	mov	__NR_rt_sigprocmask, %g1
++	ta	0x10
++
++	/* This is a bit on the expensive side, and we could optimize
++	   the unwind similar to how the 32-bit sparc longjmp code
++	   does if performance of this routine really matters.  */
++	ta	ST_FLUSH_WINDOWS
++
++	ldub	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_EN], %g1
++	cmp	%g1, 0
++	be	1f
++	 nop
++	ld	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_FSR], %fsr
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D0], %f0
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D2], %f2
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D4], %f4
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D6], %f6
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D8], %f8
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D10], %f10
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D12], %f12
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D14], %f14
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D16], %f16
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D18], %f18
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D20], %f20
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D22], %f22
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D24], %f24
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D26], %f26
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D28], %f28
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D30], %f30
++1:
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_Y], %g1
++	wr	%g1, 0x0, %y
++
++	/* We specifically do not restore %g1 since we need it here as
++	   a temporary.  */
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G2], %g2
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G3], %g3
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G4], %g4
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G5], %g5
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G6], %g6
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G7], %g7
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O1], %i1
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O2], %i2
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O3], %i3
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O4], %i4
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O5], %i5
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O6], %i6
++	restore
++	ld	[%o0 + UC_MCONTEXT + MC_GREGS + GREG_O7], %o7
++	ld	[%o0 + UC_MCONTEXT + MC_GREGS + GREG_PC], %g1
++	jmpl	%g1, %g0
++	 ld	[%o0 + UC_MCONTEXT + MC_GREGS + GREG_O0], %o0
++END(__setcontext)
++
++weak_alias (__setcontext, setcontext)
++
++/* This is the helper code which gets called if a function which is
++   registered with 'makecontext' returns.  In this case we have to
++   install the context listed in the uc_link element of the context
++   'makecontext' manipulated at the time of the 'makecontext' call.
++   If the pointer is NULL the process must terminate.  */
++
++ENTRY(__start_context)
++	ld	[%sp + (16 * 4)], %g1
++	cmp	%g1, 0
++	be,a	1f
++	 clr	%o0
++	call	__setcontext
++	 mov	%g1, %o0
++	/* If this returns (which can happen if the syscall fails) we'll
++	   exit the program with the return error value (-1).  */
++1:	call	exit
++	 nop
++	/* The 'exit' call should never return.  In case it does cause
++	   the process to terminate.  */
++	unimp
++END(__start_context)
+diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/swapcontext.S b/sysdeps/unix/sysv/linux/sparc/sparc32/swapcontext.S
+new file mode 100644
+index 0000000..1547466
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/swapcontext.S
+@@ -0,0 +1,119 @@
++/* Save current context and install the given one.
++   Copyright (C) 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by David S. Miller <davem@davemloft.net>, 2008.
++
++   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 <sysdep.h>
++#include <sys/trap.h>
++
++#include "ucontext_i.h"
++
++
++/* int __swapcontext (ucontext_t *oucp, const ucontext_t *ucp);
++
++  Saves the machine context in oucp such that when it is activated,
++  it appears as if __swapcontext() returned again, restores the
++  machine context in ucp and thereby resumes execution in that
++  context.
++
++  This implementation is intended to be used for *synchronous* context
++  switches only.  Therefore, it does not have to save anything
++  other than the PRESERVED state.  */
++
++ENTRY(__swapcontext)
++	save	%sp, -112, %sp
++	ta	ST_FLUSH_WINDOWS
++	st	%g0, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_PSR]
++	add	%i7, 8, %o0
++	st	%o0, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_PC]
++	add	%o0, 4, %o0
++	st	%o0, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_NPC]
++	rd	%y, %o1
++	st	%o1, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_Y]
++	st	%g1, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G1]
++	st	%g2, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G2]
++	st	%g3, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G3]
++	st	%g4, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G4]
++	st	%g5, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G5]
++	st	%g6, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G6]
++	st	%g7, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_G7]
++	st	%g0, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O0]
++	st	%i1, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O1]
++	st	%i2, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O2]
++	st	%i3, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O3]
++	st	%i4, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O4]
++	st	%i5, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O5]
++	st	%i6, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O6]
++	st	%i7, [%i0 + UC_MCONTEXT + MC_GREGS + GREG_O7]
++	st	%g0, [%i0 + UC_MCONTEXT + MC_GWINS]
++	stb	%g0, [%i0 + UC_MCONTEXT + MC_FPREGS + FPU_EN]
++	st	%g0, [%i0 + UC_MCONTEXT + MC_XRS + XRS_ID]
++	st	%g0, [%i0 + UC_MCONTEXT + MC_XRS + XRS_PTR]
++
++	mov	SIG_SETMASK, %o0
++	add	%i1, UC_SIGMASK, %o1
++	add	%i0, UC_SIGMASK, %o2
++	mov	8, %o3
++	mov	__NR_rt_sigprocmask, %g1
++	ta	0x10
++
++	mov	%i1, %i0
++	ldub	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_EN], %g1
++	cmp	%g1, 0
++	be	1f
++	 nop
++	ld	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_FSR], %fsr
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D0], %f0
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D2], %f2
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D4], %f4
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D6], %f6
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D8], %f8
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D10], %f10
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D12], %f12
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D14], %f14
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D16], %f16
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D18], %f18
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D20], %f20
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D22], %f22
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D24], %f24
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D26], %f26
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D28], %f28
++	ldd	[%i0 + UC_MCONTEXT + MC_FPREGS + FPU_D30], %f30
++1:
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_Y], %g1
++	wr	%g1, 0x0, %y
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G2], %g2
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G3], %g3
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G4], %g4
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G5], %g5
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G6], %g6
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_G7], %g7
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O1], %i1
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O2], %i2
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O3], %i3
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O4], %i4
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O5], %i5
++	ld	[%i0 + UC_MCONTEXT + MC_GREGS + GREG_O6], %i6
++	restore
++	ld	[%o0 + UC_MCONTEXT + MC_GREGS + GREG_O7], %o7
++	ld	[%o0 + UC_MCONTEXT + MC_GREGS + GREG_PC], %g1
++	jmpl	%g1, %g0
++	 ld	[%o0 + UC_MCONTEXT + MC_GREGS + GREG_O0], %o0
++END(__swapcontext)
++
++weak_alias (__swapcontext, swapcontext)
+diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym b/sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym
+new file mode 100644
+index 0000000..544030c
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym
+@@ -0,0 +1,61 @@
++#include <stddef.h>
++#include <signal.h>
++#include <sys/ucontext.h>
++
++--
++
++SIG_BLOCK
++SIG_SETMASK
++
++UC_FLAGS	offsetof (ucontext_t, uc_flags)
++UC_LINK		offsetof (ucontext_t, uc_link)
++UC_SIGMASK	offsetof (ucontext_t, uc_sigmask)
++UC_STACK	offsetof (ucontext_t, uc_stack)
++UC_MCONTEXT	offsetof (ucontext_t, uc_mcontext)
++MC_GREGS	offsetof (mcontext_t, gregs)
++MC_GWINS	offsetof (mcontext_t, gwins)
++MC_FPREGS	offsetof (mcontext_t, fpregs)
++MC_XRS		offsetof (mcontext_t, xrs)
++MC_FILLER	offsetof (mcontext_t, filler)
++GREG_PSR	(REG_PSR * sizeof(greg_t))
++GREG_PC		(REG_PC * sizeof(greg_t))
++GREG_NPC	(REG_nPC * sizeof(greg_t))
++GREG_Y		(REG_Y * sizeof(greg_t))
++GREG_G1		(REG_G1 * sizeof(greg_t))
++GREG_G2		(REG_G2 * sizeof(greg_t))
++GREG_G3		(REG_G3 * sizeof(greg_t))
++GREG_G4		(REG_G4 * sizeof(greg_t))
++GREG_G5		(REG_G5 * sizeof(greg_t))
++GREG_G6		(REG_G6 * sizeof(greg_t))
++GREG_G7		(REG_G7 * sizeof(greg_t))
++GREG_O0		(REG_O0 * sizeof(greg_t))
++GREG_O1		(REG_O1 * sizeof(greg_t))
++GREG_O2		(REG_O2 * sizeof(greg_t))
++GREG_O3		(REG_O3 * sizeof(greg_t))
++GREG_O4		(REG_O4 * sizeof(greg_t))
++GREG_O5		(REG_O5 * sizeof(greg_t))
++GREG_O6		(REG_O6 * sizeof(greg_t))
++GREG_O7		(REG_O7 * sizeof(greg_t))
++FPU_D0		offsetof (fpregset_t, fpu_fr.fpu_dregs[0])
++FPU_D2		offsetof (fpregset_t, fpu_fr.fpu_dregs[1])
++FPU_D4		offsetof (fpregset_t, fpu_fr.fpu_dregs[2])
++FPU_D6		offsetof (fpregset_t, fpu_fr.fpu_dregs[3])
++FPU_D8		offsetof (fpregset_t, fpu_fr.fpu_dregs[4])
++FPU_D10		offsetof (fpregset_t, fpu_fr.fpu_dregs[5])
++FPU_D12		offsetof (fpregset_t, fpu_fr.fpu_dregs[6])
++FPU_D14		offsetof (fpregset_t, fpu_fr.fpu_dregs[7])
++FPU_D16		offsetof (fpregset_t, fpu_fr.fpu_dregs[8])
++FPU_D18		offsetof (fpregset_t, fpu_fr.fpu_dregs[9])
++FPU_D20		offsetof (fpregset_t, fpu_fr.fpu_dregs[10])
++FPU_D22		offsetof (fpregset_t, fpu_fr.fpu_dregs[11])
++FPU_D24		offsetof (fpregset_t, fpu_fr.fpu_dregs[12])
++FPU_D26		offsetof (fpregset_t, fpu_fr.fpu_dregs[13])
++FPU_D28		offsetof (fpregset_t, fpu_fr.fpu_dregs[14])
++FPU_D30		offsetof (fpregset_t, fpu_fr.fpu_dregs[15])
++FPU_Q		offsetof (fpregset_t, fpu_q)
++FPU_FSR		offsetof (fpregset_t, fpu_fsr)
++FPU_QCNT	offsetof (fpregset_t, fpu_qcnt)
++FPU_Q_ENTRY_SZ	offsetof (fpregset_t, fpu_q_entrysize)
++FPU_EN		offsetof (fpregset_t, fpu_en)
++XRS_ID		offsetof (xrs_t, xrs_id)
++XRS_PTR		offsetof (xrs_t, xrs_ptr)


Reply to: