setjmp cleanup
Peter S. Mazinger
ps.m at gmx.net
Tue Aug 22 12:26:09 UTC 2006
Hello!
The attached patch syncs some headers with glibc, moves built related
parts to internal headers and adapts all sources to use these. Hope I
catched all (handedited patch)
libpthread/linuxthreads.old/ptlongjmp.c
libpthread/linuxthreads/ptcleanup.c should include jmpbuf-unwind.h for
__JMPBUF_UNWINDS (ptcleanup unconditionally). Sorry, no patch for these.
Peter
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
-------------- next part --------------
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/alpha/__longjmp.S uClibc/libc/sysdeps/linux/alpha/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/alpha/__longjmp.S 2006-06-12 17:37:27 +0200
+++ uClibc/libc/sysdeps/linux/alpha/__longjmp.S 2006-05-05 00:55:40 +0200
@@ -16,10 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <features.h>
-#define _SETJMP_H
-#define __ASSEMBLY__
-#include <bits/setjmp.h>
+#include <setjmp-offsets.h>
#define a0 $16
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/alpha/bits/setjmp.h uClibc/libc/sysdeps/linux/alpha/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/alpha/bits/setjmp.h 2006-06-12 17:37:15 +0200
+++ uClibc/libc/sysdeps/linux/alpha/bits/setjmp.h 2006-05-11 13:16:30 +0200
@@ -55,33 +55,6 @@
* registers.
*/
-#if defined __USE_MISC || defined __ASSEMBLY__
-# define JB_S0 0
-# define JB_S1 1
-# define JB_S2 2
-# define JB_S3 3
-# define JB_S4 4
-# define JB_S5 5
-# define JB_PC 6
-# define JB_FP 7
-# define JB_SP 8
-# define JB_F2 9
-# define JB_F3 10
-# define JB_F4 11
-# define JB_F5 12
-# define JB_F6 13
-# define JB_F7 14
-# define JB_F8 15
-# define JB_F9 16
-#endif
-
-#ifndef __ASSEMBLY__
typedef long int __jmp_buf[17];
-/* Test if longjmp to JMPBUF would unwind the frame containing a local
- variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ((void *)(_address) < (void *)((_jmpbuf)[JB_SP]))
-#endif
-
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/alpha/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/alpha/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/alpha/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/alpha/jmpbuf-offsets.h 2006-05-05 00:55:40 +0200
@@ -0,0 +1,36 @@
+/* Private macros for accessing __jmp_buf contents. Alpha version.
+ 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. */
+
+#define JB_S0 0
+#define JB_S1 1
+#define JB_S2 2
+#define JB_S3 3
+#define JB_S4 4
+#define JB_S5 5
+#define JB_PC 6
+#define JB_FP 7
+#define JB_SP 8
+#define JB_F2 9
+#define JB_F3 10
+#define JB_F4 11
+#define JB_F5 12
+#define JB_F6 13
+#define JB_F7 14
+#define JB_F8 15
+#define JB_F9 16
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/alpha/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/alpha/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/alpha/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/alpha/jmpbuf-unwind.h 2006-05-05 00:55:40 +0200
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+#include <jmpbuf-offsets.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame containing a local
+ variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
+ ((void *)(_address) < (void *)((_jmpbuf)[JB_SP]))
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/alpha/setjmp.S uClibc/libc/sysdeps/linux/alpha/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/alpha/setjmp.S 2006-06-12 17:37:27 +0200
+++ uClibc/libc/sysdeps/linux/alpha/setjmp.S 2006-05-05 00:55:40 +0200
@@ -16,11 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#define __ASSEMBLY__
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#define a0 $16
@@ -30,10 +26,16 @@
ldgp $29, 0($27)
$sigsetjmp_local:
- subq $30, 16, $30
- .frame $26, 16, $26, 0
- stq $26, 0($30)
- .mask 0x04000000, -16
+#ifndef __PIC__
+# define FRAME 16
+ subq $30, FRAME, $30
+ .frame $30, FRAME, $26, 0
+ stq $26, 0($30)
+ .mask 0x04000000, -FRAME
+#else
+# define FRAME 0
+ .frame $30, FRAME, $26, 0
+#endif
.prologue 1
stq $9, JB_S0*8(a0)
@@ -43,9 +45,9 @@
stq $13, JB_S4*8(a0)
stq $14, JB_S5*8(a0)
stq $26, JB_PC*8(a0)
- addq $30, 16, $1
- stq $15, JB_FP*8(a0)
+ addq $30, FRAME, $1
stq $1, JB_SP*8(a0)
+ stq $15, JB_FP*8(a0)
stt $f2, JB_F2*8(a0)
stt $f3, JB_F3*8(a0)
stt $f4, JB_F4*8(a0)
@@ -55,12 +57,16 @@
stt $f8, JB_F8*8(a0)
stt $f9, JB_F9*8(a0)
+#ifndef __PIC__
/* Call to C to (potentially) save our signal mask. */
jsr $26, __sigjmp_save
-
ldq $26, 0($30)
addq $30, 16, $30
ret
+#else
+ /* Tailcall to save the signal mask. */
+ br $31, __sigjmp_save !samegp
+#endif
.end __sigsetjmp
@@ -71,7 +77,6 @@
.align 3;
.ent _setjmp , 0;
_setjmp:
- .frame $30 , 0, $26
ldgp $29, 0($27)
mov 0, $17
br $sigsetjmp_local
@@ -81,11 +86,7 @@
.align 3;
.ent setjmp , 0;
setjmp:
- .frame $30 , 0, $26
ldgp $29, 0($27)
mov 1, $17
br $sigsetjmp_local
.end setjmp
-
-.weak _setjmp
-.weak setjmp
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/arm/__longjmp.S uClibc/libc/sysdeps/linux/arm/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/arm/__longjmp.S 2006-06-12 17:36:34 +0200
+++ uClibc/libc/sysdeps/linux/arm/__longjmp.S 2006-05-05 00:55:40 +0200
@@ -18,10 +18,6 @@
02111-1307 USA. */
#include <features.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
.global __longjmp
.type __longjmp,%function
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/arm/bits/setjmp.h uClibc/libc/sysdeps/linux/arm/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/arm/bits/setjmp.h 2006-06-12 17:36:22 +0200
+++ uClibc/libc/sysdeps/linux/arm/bits/setjmp.h 2006-05-11 13:16:30 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2005,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
@@ -17,14 +17,14 @@
02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. ARM version. */
+
#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
+#define _BITS_SETJMP_H 1
#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-#ifndef _ASM
/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
saved. */
#ifdef __ARM_EABI__
@@ -38,15 +38,10 @@
#elif defined __MAVERICK__
typedef int __jmp_buf[34];
#else
+# ifdef __UCLIBC_HAS_FPU__
typedef int __jmp_buf[22];
+# else
+typedef int __jmp_buf[10];
+# endif
#endif
#endif
-
-#define __JMP_BUF_SP 8
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
-
-#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/arm/bsd-_setjmp.S uClibc/libc/sysdeps/linux/arm/bsd-_setjmp.S
--- uClibc.orig/libc/sysdeps/linux/arm/bsd-_setjmp.S 2006-06-12 17:36:31 +0200
+++ uClibc/libc/sysdeps/linux/arm/bsd-_setjmp.S 2006-05-05 00:55:40 +0200
@@ -21,10 +21,6 @@
We cannot do it in C because it must be a tail-call, so frame-unwinding
in setjmp doesn't clobber the state restored by longjmp. */
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
.global _setjmp
.type _setjmp,%function
.align 2
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/arm/bsd-setjmp.S uClibc/libc/sysdeps/linux/arm/bsd-setjmp.S
--- uClibc.orig/libc/sysdeps/linux/arm/bsd-setjmp.S 2006-06-12 17:36:34 +0200
+++ uClibc/libc/sysdeps/linux/arm/bsd-setjmp.S 2006-05-05 00:55:40 +0200
@@ -21,10 +21,6 @@
We cannot do it in C because it must be a tail-call, so frame-unwinding
in setjmp doesn't clobber the state restored by longjmp. */
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
.global setjmp
.type setjmp,%function
.align 2
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/arm/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/arm/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/arm/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/arm/jmpbuf-offsets.h 2006-05-11 13:16:30 +0200
@@ -0,0 +1,24 @@
+/* Private macros for accessing __jmp_buf contents. ARM version.
+ 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. */
+
+#ifdef __UCLIBC_HAS_FPU__
+#define __JMP_BUF_SP 20
+#else
+#define __JMP_BUF_SP 8
+#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/arm/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/arm/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/arm/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/arm/jmpbuf-unwind.h 2006-05-05 00:55:41 +0200
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+#include <jmpbuf-offsets.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/arm/setjmp.S uClibc/libc/sysdeps/linux/arm/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/arm/setjmp.S 2006-06-12 17:36:30 +0200
+++ uClibc/libc/sysdeps/linux/arm/setjmp.S 2006-05-05 00:55:41 +0200
@@ -18,9 +18,6 @@
02111-1307 USA. */
#include <features.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
.global __sigsetjmp
.type __sigsetjmp,%function
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/bfin/bits/setjmp.h uClibc/libc/sysdeps/linux/bfin/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/bfin/bits/setjmp.h 2006-06-12 17:41:17 +0200
+++ uClibc/libc/sysdeps/linux/bfin/bits/setjmp.h 2006-05-11 13:16:30 +0200
@@ -24,7 +24,6 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-#ifndef _ASM
/* Jump buffer contains r7-r4, p5-p3, fp, sp and pc. Other registers are not saved. */
typedef struct
{
@@ -45,13 +44,4 @@
unsigned long pc;
}__jmp_buf[1];
-#endif
-
-#define __JMP_BUF_SP 8
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)->__pregs[6])
-
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/bfin/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/bfin/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/bfin/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/bfin/jmpbuf-offsets.h 2006-05-05 00:55:41 +0200
@@ -0,0 +1,8 @@
+/* Private macros for accessing __jmp_buf contents. BFIN version. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define __JMP_BUF_SP 8
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/bfin/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/bfin/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/bfin/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/bfin/jmpbuf-unwind.h 2006-05-05 00:55:41 +0200
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)->__pregs[6])
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/common/bits/sched.h uClibc/libc/sysdeps/linux/common/bits/sched.h
--- uClibc.orig/libc/sysdeps/linux/common/bits/sched.h 2006-06-12 17:39:28 +0200
+++ uClibc/libc/sysdeps/linux/common/bits/sched.h 2006-05-22 23:13:38 +0200
@@ -29,7 +29,7 @@
#define SCHED_OTHER 0
#define SCHED_FIFO 1
#define SCHED_RR 2
-#if 0 /*def __USE_GNU*/
+#ifdef __USE_GNU
# define SCHED_BATCH 3
#endif
@@ -46,7 +46,6 @@
# define CLONE_PARENT 0x00008000 /* Set if we want to have the same
parent as the cloner. */
# define CLONE_THREAD 0x00010000 /* Set to add to same thread group. */
-#if 0
# define CLONE_NEWNS 0x00020000 /* Set to create new namespace. */
# define CLONE_SYSVSEM 0x00040000 /* Set to shared SVID SEM_UNDO semantics. */
# define CLONE_SETTLS 0x00080000 /* Set TLS info. */
@@ -61,9 +60,6 @@
the child. */
# define CLONE_STOPPED 0x02000000 /* Start in stopped state. */
#endif
-#endif
-
-#ifndef __ASSEMBLER__
/* The official definition. */
struct sched_param
@@ -86,12 +82,8 @@
__END_DECLS
-#endif /* __ASSEMBLER__ */
-
#endif /* need schedparam */
-#ifndef __ASSEMBLER__
-
#if !defined __defined_schedparam \
&& (defined __need_schedparam || defined _SCHED_H)
# define __defined_schedparam 1
@@ -104,7 +96,6 @@
#endif
-#if 0
#if defined _SCHED_H && !defined __cpu_set_t_defined
# define __cpu_set_t_defined
/* Size definition for CPU sets. */
@@ -139,6 +130,3 @@
# define __CPU_ISSET(cpu, cpusetp) \
(((cpusetp)->__bits[__CPUELT (cpu)] & __CPUMASK (cpu)) != 0)
#endif
-#endif
-
-#endif /* __ASSEMBLER__ */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/common/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/common/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/common/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/common/jmpbuf-offsets.h 2006-05-05 00:55:41 +0200
@@ -0,0 +1,6 @@
+/* Private macros for accessing __jmp_buf contents. dummy version. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/cris/__longjmp.S uClibc/libc/sysdeps/linux/cris/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/cris/__longjmp.S 2006-06-12 17:40:28 +0200
+++ uClibc/libc/sysdeps/linux/cris/__longjmp.S 2006-05-05 00:55:41 +0200
@@ -17,11 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <features.h>
#include "sysdep.h"
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
.syntax no_register_prefix
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/cris/bits/setjmp.h uClibc/libc/sysdeps/linux/cris/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/cris/bits/setjmp.h 2006-06-12 17:40:26 +0200
+++ uClibc/libc/sysdeps/linux/cris/bits/setjmp.h 2006-05-11 13:16:30 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005 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
@@ -16,7 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Define the machine-dependent type `jmp_buf'. CRIS version. */
+/* Define the machine-dependent type `jmp_buf', CRIS version. */
#ifndef _BITS_SETJMP_H
#define _BITS_SETJMP_H 1
@@ -24,10 +24,8 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-/*
- Note that we save and restore CCR to be able to
- correctly handle DI/EI. Note also that the "move x,ccr" does NOT affect
- the DMA enable bits (E and D).
+/* Note that saving and restoring CCR has no meaning in user mode, so we
+ don't actually do it; the slot is now reserved.
jmp_buf[0] - PC
jmp_buf[1] - SP (R14)
@@ -46,21 +44,8 @@
jmp_buf[14] - R1
jmp_buf[15] - R0
jmp_buf[16] - SRP
- jmp_buf[17] - CCR
- */
+ jmp_buf[17] - CCR */
-#define _JBLEN 18
-#if defined (__USE_MISC) || defined (_ASM)
-#define JB_SP 1
-#endif
-
-#ifndef _ASM
-typedef int __jmp_buf[_JBLEN];
-#endif
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_SP])
+typedef int __jmp_buf[18];
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/cris/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/cris/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/cris/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/cris/jmpbuf-offsets.h 2006-05-05 00:55:41 +0200
@@ -0,0 +1,8 @@
+/* Private macros for accessing __jmp_buf contents. BFIN version. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define JB_SP 1
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/cris/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/cris/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/cris/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/cris/jmpbuf-unwind.h 2006-05-05 00:55:41 +0200
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+#include <jmpbuf-offsets.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)[JB_SP])
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/cris/setjmp.S uClibc/libc/sysdeps/linux/cris/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/cris/setjmp.S 2006-06-12 17:40:28 +0200
+++ uClibc/libc/sysdeps/linux/cris/setjmp.S 2006-05-05 00:55:41 +0200
@@ -18,9 +18,6 @@
Boston, MA 02111-1307, USA. */
#include "sysdep.h"
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
.syntax no_register_prefix
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/frv/__longjmp.S uClibc/libc/sysdeps/linux/frv/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/frv/__longjmp.S 2006-06-12 17:40:12 +0200
+++ uClibc/libc/sysdeps/linux/frv/__longjmp.S 2006-05-11 13:16:30 +0200
@@ -4,10 +4,6 @@
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
# setjmp/longjmp for Frv. The jmpbuf looks like this:
#
# Register jmpbuf offset
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/frv/bits/setjmp.h uClibc/libc/sysdeps/linux/frv/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/frv/bits/setjmp.h 2006-06-12 17:40:09 +0200
+++ uClibc/libc/sysdeps/linux/frv/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -35,7 +35,6 @@
#define __SETJMP_FP (__SETJMP_SP+1)
-#ifndef _ASM
typedef struct
/* Demand 64-bit alignment such that we can use std/ldd in
setjmp/longjmp. */
@@ -48,11 +47,5 @@
unsigned long __sp; /* stack pointer */
unsigned long __fp; /* frame pointer */
} __jmp_buf[1];
-#endif
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)->__sp)
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/frv/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/frv/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/frv/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/frv/jmpbuf-unwind.h 2006-05-11 13:16:31 +0200
@@ -0,0 +1,14 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)->__sp)
+
+#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/frv/setjmp.S uClibc/libc/sysdeps/linux/frv/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/frv/setjmp.S 2006-06-12 17:40:12 +0200
+++ uClibc/libc/sysdeps/linux/frv/setjmp.S 2006-05-11 13:16:31 +0200
@@ -1,8 +1,3 @@
-#include <features.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
.text
/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/h8300/__longjmp.S uClibc/libc/sysdeps/linux/h8300/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/h8300/__longjmp.S 2006-06-12 17:40:32 +0200
+++ uClibc/libc/sysdeps/linux/h8300/__longjmp.S 2006-05-11 13:16:31 +0200
@@ -1,7 +1,3 @@
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
#ifdef __H8300S__
.h8300s
#else
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/h8300/bits/setjmp.h uClibc/libc/sysdeps/linux/h8300/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/h8300/bits/setjmp.h 2006-06-12 17:40:30 +0200
+++ uClibc/libc/sysdeps/linux/h8300/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -9,24 +9,10 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-#ifndef _ASM
-
typedef struct
{
unsigned long __regs[4]; /* save er4 - er7(sp) */
unsigned long __pc; /* the return address */
} __jmp_buf[1];
-#endif /* _ASM */
-
-#define JB_REGS 0
-#define JB_PC 16
-#define JB_SIZE 20
-
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)->__regs[3])
-
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/h8300/bsd-_setjmp.S uClibc/libc/sysdeps/linux/h8300/bsd-_setjmp.S
--- uClibc.orig/libc/sysdeps/linux/h8300/bsd-_setjmp.S 2006-06-12 17:40:32 +0200
+++ uClibc/libc/sysdeps/linux/h8300/bsd-_setjmp.S 2006-05-11 13:16:31 +0200
@@ -1,8 +1,6 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. H8/300 version. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#ifdef __H8300S__
.h8300s
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/h8300/bsd-setjmp.S uClibc/libc/sysdeps/linux/h8300/bsd-setjmp.S
--- uClibc.orig/libc/sysdeps/linux/h8300/bsd-setjmp.S 2006-06-12 17:40:33 +0200
+++ uClibc/libc/sysdeps/linux/h8300/bsd-setjmp.S 2006-05-11 13:16:31 +0200
@@ -1,8 +1,6 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 1)'. H8/300 version. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#ifdef __H8300S__
.h8300s
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/h8300/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/h8300/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/h8300/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/h8300/jmpbuf-offsets.h 2006-05-11 13:16:31 +0200
@@ -0,0 +1,9 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define JB_REGS 0
+#define JB_PC 16
+#define JB_SIZE 20
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/h8300/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/h8300/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/h8300/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/h8300/jmpbuf-unwind.h 2006-05-11 13:16:31 +0200
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)->__regs[3])
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/h8300/setjmp.S uClibc/libc/sysdeps/linux/h8300/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/h8300/setjmp.S 2006-06-12 17:40:32 +0200
+++ uClibc/libc/sysdeps/linux/h8300/setjmp.S 2006-05-11 13:16:31 +0200
@@ -1,6 +1,4 @@
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#ifdef __H8300S__
.h8300s
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/hppa/__longjmp.S uClibc/libc/sysdeps/linux/hppa/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/hppa/__longjmp.S 2006-06-12 17:38:38 +0200
+++ uClibc/libc/sysdeps/linux/hppa/__longjmp.S 2006-05-05 00:55:41 +0200
@@ -17,11 +17,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <features.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
/* __longjmp(jmpbuf, val) */
.text
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/hppa/bits/setjmp.h uClibc/libc/sysdeps/linux/hppa/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/hppa/bits/setjmp.h 2006-06-12 17:38:24 +0200
+++ uClibc/libc/sysdeps/linux/hppa/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2005, 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
@@ -29,17 +29,6 @@
easier, and to ensure proper alignment. Naturally, user code should
not depend on either representation. */
-#if defined __USE_MISC || defined _ASM
-#define JB_SP (76/4)
-#endif
-
-#ifndef _ASM
typedef double __jmp_buf[21];
-#endif
-
-/* Test if longjmp to JMPBUF would unwind the frame containing a local
- variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/hppa/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/hppa/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/hppa/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/hppa/jmpbuf-offsets.h 2006-05-05 00:55:41 +0200
@@ -0,0 +1,20 @@
+/* Private macros for accessing __jmp_buf contents. HPPA version.
+ 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. */
+
+#define JB_SP (76/4)
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/hppa/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/hppa/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/hppa/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/hppa/jmpbuf-unwind.h 2006-05-05 00:55:41 +0200
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+#include <jmpbuf-offsets.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame containing a local
+ variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
+ ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/hppa/setjmp.S uClibc/libc/sysdeps/linux/hppa/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/hppa/setjmp.S 2006-06-12 17:38:38 +0200
+++ uClibc/libc/sysdeps/linux/hppa/setjmp.S 2006-05-05 00:55:42 +0200
@@ -17,11 +17,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
-
.text
.align 4
.import __sigjmp_save, code
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/i386/__longjmp.S uClibc/libc/sysdeps/linux/i386/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/i386/__longjmp.S 2006-06-12 17:40:01 +0200
+++ uClibc/libc/sysdeps/linux/i386/__longjmp.S 2006-05-05 00:55:42 +0200
@@ -17,10 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.global __longjmp
.type __longjmp,%function
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/i386/bits/setjmp.h uClibc/libc/sysdeps/linux/i386/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/i386/bits/setjmp.h 2006-06-12 17:39:56 +0200
+++ uClibc/libc/sysdeps/linux/i386/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000,2001,2003,2005,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
@@ -24,23 +25,6 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-#if defined __USE_MISC || defined _ASM
-# define JB_BX 0
-# define JB_SI 1
-# define JB_DI 2
-# define JB_BP 3
-# define JB_SP 4
-# define JB_PC 5
-# define JB_SIZE 24
-#endif
-
-#ifndef _ASM
typedef int __jmp_buf[6];
-#endif
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_SP])
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/i386/bsd-_setjmp.S uClibc/libc/sysdeps/linux/i386/bsd-_setjmp.S
--- uClibc.orig/libc/sysdeps/linux/i386/bsd-_setjmp.S 2006-06-12 17:40:01 +0200
+++ uClibc/libc/sysdeps/linux/i386/bsd-_setjmp.S 2006-05-05 00:55:42 +0200
@@ -21,9 +21,7 @@
We cannot do it in C because it must be a tail-call, so frame-unwinding
in setjmp doesn't clobber the state restored by longjmp. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.global _setjmp
.type _setjmp,%function
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/i386/bsd-setjmp.S uClibc/libc/sysdeps/linux/i386/bsd-setjmp.S
--- uClibc.orig/libc/sysdeps/linux/i386/bsd-setjmp.S 2006-06-12 17:40:01 +0200
+++ uClibc/libc/sysdeps/linux/i386/bsd-setjmp.S 2006-05-05 00:55:42 +0200
@@ -17,10 +17,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
.global setjmp
.type setjmp,%function
.align 4
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/i386/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/i386/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/i386/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/i386/jmpbuf-offsets.h 2006-05-05 00:55:42 +0200
@@ -0,0 +1,26 @@
+/* Private macros for accessing __jmp_buf contents. i386 version.
+ 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. */
+
+#define JB_BX 0
+#define JB_SI 1
+#define JB_DI 2
+#define JB_BP 3
+#define JB_SP 4
+#define JB_PC 5
+#define JB_SIZE 24
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/i386/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/i386/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/i386/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/i386/jmpbuf-unwind.h 2006-05-05 00:55:42 +0200
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+#include <jmpbuf-offsets.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)[JB_SP])
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/i386/setjmp.S uClibc/libc/sysdeps/linux/i386/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/i386/setjmp.S 2006-06-12 17:40:01 +0200
+++ uClibc/libc/sysdeps/linux/i386/setjmp.S 2006-05-05 00:55:42 +0200
@@ -17,11 +17,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
-
.global __sigsetjmp
.type __sigsetjmp,%function
.align 4
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/ia64/bits/setjmp.h uClibc/libc/sysdeps/linux/ia64/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/ia64/bits/setjmp.h 2006-06-12 17:40:39 +0200
+++ uClibc/libc/sysdeps/linux/ia64/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version.
- Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang <davidm at hpl.hp.com>.
@@ -32,9 +32,4 @@
/* the __jmp_buf element type should be __float80 per ABI... */
typedef long __jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
-/* Test if longjmp to JMPBUF would unwind the frame containing a local
- variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ((void *)(_address) < (void *)(((long *)_jmpbuf)[0]))
-
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/ia64/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/ia64/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/ia64/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/ia64/jmpbuf-unwind.h 2006-05-05 00:55:42 +0200
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame containing a local
+ variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
+ ((void *)(_address) < (void *)(((long *)_jmpbuf)[0]))
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/ia64/vfork.S uClibc/libc/sysdeps/linux/ia64/vfork.S
--- uClibc.orig/libc/sysdeps/linux/ia64/vfork.S 2006-06-12 17:40:42 +0200
+++ uClibc/libc/sysdeps/linux/ia64/vfork.S 2006-05-07 23:50:45 +0200
@@ -20,8 +20,11 @@
#include "sysdep.h"
#define _SIGNAL_H
#include <bits/signum.h>
-#define _SCHED_H
-#include <bits/sched.h>
+
+/* The following are defined in linux/sched.h, which unfortunately */
+/* is not safe for inclusion in an assembly file. */
+#define CLONE_VM 0x00000100 /* set if VM shared between processes */
+#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */
/* pid_t vfork(void); */
/* Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/m68k/__longjmp.S uClibc/libc/sysdeps/linux/m68k/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/m68k/__longjmp.S 2006-06-12 17:37:47 +0200
+++ uClibc/libc/sysdeps/linux/m68k/__longjmp.S 2006-05-05 00:55:42 +0200
@@ -1,11 +1,11 @@
+/* Copyright (C) 2002, David McCullough <davidm at snapgear.com>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
-/* Copyright (C) 2002, David McCullough <davidm at snapgear.com> */
-/* This file is released under the LGPL, any version you like */
-
-#define _ASM
-#define _SETJMP_H
#include <features.h>
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.globl __longjmp
.type __longjmp, at function
@@ -17,7 +17,7 @@
movel #1, %d0
1:
moveml %a0@(JB_REGS), %d2-%d7/%a2-%a7
-#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
+#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
fmovemx %a0@(JB_FPREGS), %fp2-%fp7
#endif
movel %a0@(JB_PC), %sp@
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/m68k/bits/setjmp.h uClibc/libc/sysdeps/linux/m68k/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/m68k/bits/setjmp.h 2006-06-12 17:37:38 +0200
+++ uClibc/libc/sysdeps/linux/m68k/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -25,8 +25,6 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-#ifndef _ASM
-
typedef struct
{
/* There are eight 4-byte data registers, but D0 is not saved. */
@@ -45,24 +43,4 @@
} __jmp_buf[1];
-#endif
-
-#define JB_REGS 0
-#define JB_DREGS 0
-#define JB_AREGS 24
-#define JB_PC 48
-#define JB_FPREGS 52
-
-#if defined __HAVE_68881__ || defined __HAVE_FPU__
-# define JB_SIZE 76
-#else
-# define JB_SIZE 52
-#endif
-
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)->__aregs[5])
-
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/m68k/bsd-_setjmp.S uClibc/libc/sysdeps/linux/m68k/bsd-_setjmp.S
--- uClibc.orig/libc/sysdeps/linux/m68k/bsd-_setjmp.S 2006-06-12 17:37:47 +0200
+++ uClibc/libc/sysdeps/linux/m68k/bsd-_setjmp.S 2006-05-05 00:55:42 +0200
@@ -1,10 +1,11 @@
+/* Copyright (C) 2002, David McCullough <davidm at snapgear.com>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
-/* Copyright (C) 2002, David McCullough <davidm at snapgear.com> */
-/* This file is released under the LGPL, any version you like */
-
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <features.h>
+#include <jmpbuf-offsets.h>
.globl _setjmp;
.type _setjmp, at function
@@ -14,7 +15,7 @@
moveal %sp@(4), %a0
movel %sp@(0), %a0@(JB_PC)
moveml %d2-%d7/%a2-%a7, %a0@(JB_REGS)
-#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
+#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
fmovemx %fp2-%fp7, %a0@(JB_FPREGS)
#endif
clrl %d0
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/m68k/bsd-setjmp.S uClibc/libc/sysdeps/linux/m68k/bsd-setjmp.S
--- uClibc.orig/libc/sysdeps/linux/m68k/bsd-setjmp.S 2006-06-12 17:37:47 +0200
+++ uClibc/libc/sysdeps/linux/m68k/bsd-setjmp.S 2006-05-05 00:55:42 +0200
@@ -1,10 +1,11 @@
+/* Copyright (C) 2002, David McCullough <davidm at snapgear.com>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
-/* Copyright (C) 2002, David McCullough <davidm at snapgear.com> */
-/* This file is released under the LGPL, any version you like */
-
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <features.h>
+#include <jmpbuf-offsets.h>
.globl setjmp;
.type setjmp, at function
@@ -14,7 +15,7 @@
moveal %sp@(4), %a0
movel %sp@(0), %a0@(JB_PC)
moveml %d2-%d7/%a2-%a7, %a0@(JB_REGS)
-#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
+#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
fmovemx %fp2-%fp7, %a0@(JB_FPREGS)
#endif
clrl %d0
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/m68k/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/m68k/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/m68k/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/m68k/jmpbuf-offsets.h 2006-05-05 00:55:42 +0200
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define JB_REGS 0
+#define JB_DREGS 0
+#define JB_AREGS 24
+#define JB_PC 48
+#define JB_FPREGS 52
+
+#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
+# define JB_SIZE 76
+#else
+# define JB_SIZE 52
+#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/m68k/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/m68k/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/m68k/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/m68k/jmpbuf-unwind.h 2006-05-05 00:55:42 +0200
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)->__aregs[5])
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/m68k/setjmp.S uClibc/libc/sysdeps/linux/m68k/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/m68k/setjmp.S 2006-06-12 17:37:47 +0200
+++ uClibc/libc/sysdeps/linux/m68k/setjmp.S 2006-05-05 00:55:42 +0200
@@ -1,10 +1,11 @@
+/* Copyright (C) 2002, David McCullough <davidm at snapgear.com>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
-/* Copyright (C) 2002, David McCullough <davidm at snapgear.com> */
-/* This file is released under the LGPL, any version you like */
-
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <features.h>
+#include <jmpbuf-offsets.h>
.globl __sigsetjmp;
.type __sigsetjmp, at function
@@ -14,7 +15,7 @@
moveal %sp@(4), %a0
movel %sp@(0), %a0@(JB_PC)
moveml %d2-%d7/%a2-%a7, %a0@(JB_REGS)
-#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
+#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
fmovemx %fp2-%fp7, %a0@(JB_FPREGS)
#endif
clrl %d0
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/microblaze/__longjmp.S uClibc/libc/sysdeps/linux/microblaze/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/microblaze/__longjmp.S 2006-06-12 17:38:10 +0200
+++ uClibc/libc/sysdeps/linux/microblaze/__longjmp.S 2006-05-11 13:16:31 +0200
@@ -12,10 +12,6 @@
* Written by Miles Bader <miles at gnu.org>
*/
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
#include <clinkage.h>
.text
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/microblaze/bits/setjmp.h uClibc/libc/sysdeps/linux/microblaze/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/microblaze/bits/setjmp.h 2006-06-12 17:38:03 +0200
+++ uClibc/libc/sysdeps/linux/microblaze/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -19,7 +19,6 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-#ifndef _ASM
typedef struct
{
/* Stack pointer. */
@@ -31,13 +30,5 @@
/* Callee-saved registers r18-r30. */
int __regs[13];
} __jmp_buf[1];
-#endif
-
-#define JB_SIZE (4 * 15)
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[0].__sp)
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h 2006-05-11 13:16:31 +0200
@@ -0,0 +1,6 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#define JB_SIZE (4 * 15)
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h 2006-05-11 13:16:31 +0200
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)[0].__sp)
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/microblaze/setjmp.S uClibc/libc/sysdeps/linux/microblaze/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/microblaze/setjmp.S 2006-06-12 17:38:10 +0200
+++ uClibc/libc/sysdeps/linux/microblaze/setjmp.S 2006-05-11 13:16:31 +0200
@@ -12,10 +12,6 @@
* Written by Miles Bader <miles at gnu.org>
*/
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
#include <clinkage.h>
.text
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/mips/bits/setjmp.h uClibc/libc/sysdeps/linux/mips/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/mips/bits/setjmp.h 2006-06-12 17:40:50 +0200
+++ uClibc/libc/sysdeps/linux/mips/bits/setjmp.h 2006-05-05 00:55:42 +0200
@@ -1,5 +1,6 @@
/* Define the machine-dependent type `jmp_buf'. MIPS version.
- Copyright (C) 1992,93,95,97,2000 Free Software Foundation, Inc.
+ Copyright (C) 1992,1993,1995,1997,2000,2002,2003,2004,2005,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
@@ -17,46 +18,58 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
+#ifndef _MIPS_BITS_SETJMP_H
+#define _MIPS_BITS_SETJMP_H 1
-#if !defined _SETJMP_H && !defined _PTHREAD_H
+#if !defined(_SETJMP_H) && !defined(_PTHREAD_H)
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
+#include <sgidefs.h>
+
typedef struct
{
+#if _MIPS_SIM == _ABIO32
/* Program counter. */
- void * __pc;
+ __ptr_t __pc;
/* Stack pointer. */
- void * __sp;
+ __ptr_t __sp;
/* Callee-saved registers s0 through s7. */
int __regs[8];
/* The frame pointer. */
- void * __fp;
+ __ptr_t __fp;
+
+ /* The global pointer. */
+ __ptr_t __gp;
+#else
+ /* Program counter. */
+ __extension__ long long __pc;
+
+ /* Stack pointer. */
+ __extension__ long long __sp;
+
+ /* Callee-saved registers s0 through s7. */
+ __extension__ long long __regs[8];
+
+ /* The frame pointer. */
+ __extension__ long long __fp;
/* The global pointer. */
- void * __gp;
+ __extension__ long long __gp;
+#endif
/* Floating point status register. */
int __fpc_csr;
/* Callee-saved floating point registers. */
+#if _MIPS_SIM == _ABI64
+ double __fpregs[8];
+#else
double __fpregs[6];
- } __jmp_buf[1];
-
-#ifdef __USE_MISC
-/* Offset to the program counter in `jmp_buf'. */
-# define JB_PC 0
#endif
+ } __jmp_buf[1];
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[0].__sp)
-
-#endif /* bits/setjmp.h */
+#endif /* _MIPS_BITS_SETJMP_H */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/mips/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/mips/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/mips/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/mips/jmpbuf-offsets.h 2006-05-05 00:55:42 +0200
@@ -0,0 +1,7 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+# define JB_PC 0
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/mips/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/mips/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/mips/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/mips/jmpbuf-unwind.h 2006-05-05 00:55:42 +0200
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)[0].__sp)
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios/__longjmp.S uClibc/libc/sysdeps/linux/nios/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/nios/__longjmp.S 2006-06-12 17:40:59 +0200
+++ uClibc/libc/sysdeps/linux/nios/__longjmp.S 2006-05-05 00:55:42 +0200
@@ -16,11 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
+#include <jmpbuf-offsets.h>
;----------------------------------------
; Name: __longjmp
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios/bits/setjmp.h uClibc/libc/sysdeps/linux/nios/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/nios/bits/setjmp.h 2006-06-12 17:40:57 +0200
+++ uClibc/libc/sysdeps/linux/nios/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -24,8 +24,6 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-#ifndef _ASM
-
#include <signal.h>
typedef struct
@@ -44,33 +42,4 @@
} __jmp_buf[1];
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)->__sp)
-
-#else /* _ASM */
-
-#define jmpbuf_l0 0x00
-#define jmpbuf_l1 0x01
-#define jmpbuf_l2 0x02
-#define jmpbuf_l3 0x03
-#define jmpbuf_l4 0x04
-#define jmpbuf_l5 0x05
-#define jmpbuf_l6 0x06
-#define jmpbuf_l7 0x07
-
-#define jmpbuf_i0 0x08
-#define jmpbuf_i1 0x09
-#define jmpbuf_i2 0x0a
-#define jmpbuf_i3 0x0b
-#define jmpbuf_i4 0x0c
-#define jmpbuf_i5 0x0d
-
-#define jmpbuf_sp 0x0e
-#define jmpbuf_jmpret 0x0f
-#define jmpbuf_callersret 0x10
-
-#endif /* _ASM */
-
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/nios/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/nios/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/nios/jmpbuf-offsets.h 2006-05-05 00:55:42 +0200
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define jmpbuf_l0 0x00
+#define jmpbuf_l1 0x01
+#define jmpbuf_l2 0x02
+#define jmpbuf_l3 0x03
+#define jmpbuf_l4 0x04
+#define jmpbuf_l5 0x05
+#define jmpbuf_l6 0x06
+#define jmpbuf_l7 0x07
+
+#define jmpbuf_i0 0x08
+#define jmpbuf_i1 0x09
+#define jmpbuf_i2 0x0a
+#define jmpbuf_i3 0x0b
+#define jmpbuf_i4 0x0c
+#define jmpbuf_i5 0x0d
+
+#define jmpbuf_sp 0x0e
+#define jmpbuf_jmpret 0x0f
+#define jmpbuf_callersret 0x10
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/nios/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/nios/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/nios/jmpbuf-unwind.h 2006-05-05 00:55:42 +0200
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)->__sp)
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios/setjmp.S uClibc/libc/sysdeps/linux/nios/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/nios/setjmp.S 2006-06-12 17:40:59 +0200
+++ uClibc/libc/sysdeps/linux/nios/setjmp.S 2006-05-05 00:55:42 +0200
@@ -16,10 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#include "NM_Macros.S"
;----------------------------------------
@@ -90,13 +87,3 @@
movhi %g0,%xlo(__sigjmp_save at h)
jmp %g0
nop ; (delay slot)
-
-
-
-
-
-
-
-
-
-
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios2/__longjmp.S uClibc/libc/sysdeps/linux/nios2/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/nios2/__longjmp.S 2006-06-12 17:40:06 +0200
+++ uClibc/libc/sysdeps/linux/nios2/__longjmp.S 2006-05-05 00:55:43 +0200
@@ -3,18 +3,13 @@
*
* Copyright (C) 2004,05,06 Microtronix Datacom Ltd
*
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License. See the file COPYING.LIB in the main
- * directory of this archive for more details.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*
* Written by Wentao Xu <wentao at microtronix.com>
- *
*/
#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.globl __longjmp
.type __longjmp, at function
@@ -39,7 +34,7 @@
ldw gp, JB_GP(r4)
ldw sp, JB_SP(r4)
-#if defined(__HAVE_FPU__)
+#ifdef __UCLIBC_HAS_FPU__
RESTORE_FPU r4 JB_FPREGS
#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios2/bits/setjmp.h uClibc/libc/sysdeps/linux/nios2/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/nios2/bits/setjmp.h 2006-06-12 17:40:04 +0200
+++ uClibc/libc/sysdeps/linux/nios2/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -24,7 +24,6 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-#ifndef _ASM
typedef struct
{
/* Callee-saved registers r16 through r23. */
@@ -43,30 +42,9 @@
unsigned long __gp;
/* floating point regs, if any */
-#if defined __HAVE_FPU__
+#ifdef __UCLIBC_HAS_FPU__
unsigned long __fpregs[64];
#endif
} __jmp_buf[1];
-#endif
-
-#define JB_REGS 0
-#define JB_PC 32
-#define JB_SP 36
-#define JB_FP 40
-#define JB_GP 44
-#define JB_FPREGS 48
-
-#if defined __HAVE_FPU__
-# define JB_SIZE 304
-#else
-# define JB_SIZE 48
-#endif
-
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void*)(jmpbuf)->__sp)
-
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios2/bsd-_setjmp.S uClibc/libc/sysdeps/linux/nios2/bsd-_setjmp.S
--- uClibc.orig/libc/sysdeps/linux/nios2/bsd-_setjmp.S 2006-06-12 17:40:06 +0200
+++ uClibc/libc/sysdeps/linux/nios2/bsd-_setjmp.S 2006-05-05 00:55:43 +0200
@@ -3,17 +3,13 @@
*
* Copyright (C) 2004,05,06 Microtronix Datacom Ltd
*
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License. See the file COPYING.LIB in the main
- * directory of this archive for more details.
- *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ *
* Written by Wentao Xu <wentao at microtronix.com>
- *
*/
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <features.h>
+#include <jmpbuf-offsets.h>
.globl _setjmp
.type _setjmp, at function
@@ -34,7 +30,7 @@
stw fp, JB_FP(r4)
stw gp, JB_GP(r4)
-#if defined(__HAVE_FPU__)
+#ifdef __UCLIBC_HAS_FPU__
SAVE_FPU r4 JB_FPREGS
#endif
stw r0, JB_SIZE(r4) /* signal mask is not saved */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios2/bsd-setjmp.S uClibc/libc/sysdeps/linux/nios2/bsd-setjmp.S
--- uClibc.orig/libc/sysdeps/linux/nios2/bsd-setjmp.S 2006-06-12 17:40:06 +0200
+++ uClibc/libc/sysdeps/linux/nios2/bsd-setjmp.S 2006-05-05 00:55:43 +0200
@@ -3,18 +3,13 @@
*
* Copyright (C) 2004,05,06 Microtronix Datacom Ltd
*
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License. See the file COPYING.LIB in the main
- * directory of this archive for more details.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*
* Written by Wentao Xu <wentao at microtronix.com>
- *
*/
-
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <features.h>
+#include <jmpbuf-offsets.h>
.globl setjmp
.type setjmp, at function
@@ -35,7 +30,7 @@
stw fp, JB_FP(r4)
stw gp, JB_GP(r4)
-#if defined(__HAVE_FPU__)
+#ifdef __UCLIBC_HAS_FPU__
SAVE_FPU r4 JB_FPREGS
#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios2/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/nios2/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/nios2/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/nios2/jmpbuf-offsets.h 2006-05-05 00:55:43 +0200
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define JB_REGS 0
+#define JB_PC 32
+#define JB_SP 36
+#define JB_FP 40
+#define JB_GP 44
+#define JB_FPREGS 48
+
+#if defined __UCLIBC_HAS_FPU__
+# define JB_SIZE 304
+#else
+# define JB_SIZE 48
+#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios2/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/nios2/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/nios2/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/nios2/jmpbuf-unwind.h 2006-05-05 00:55:43 +0200
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)->__sp)
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/nios2/setjmp.S uClibc/libc/sysdeps/linux/nios2/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/nios2/setjmp.S 2006-06-12 17:40:06 +0200
+++ uClibc/libc/sysdeps/linux/nios2/setjmp.S 2006-05-05 00:55:43 +0200
@@ -3,18 +3,13 @@
*
* Copyright (C) 2004,05,06 Microtronix Datacom Ltd
*
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License. See the file COPYING.LIB in the main
- * directory of this archive for more details.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*
* Written by Wentao Xu <wentao at microtronix.com>
- *
*/
#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.globl __sigsetjmp
.type __sigsetjmp, at function
@@ -35,11 +30,11 @@
stw fp, JB_FP(r4)
stw gp, JB_GP(r4)
-#if defined(__HAVE_FPU__)
+#ifdef __UCLIBC_HAS_FPU__
SAVE_FPU r4 JB_FPREGS
#endif
-#ifdef __PIC__
+#ifdef __PIC__
/* just pray 16 bit offset is enough */
br __sigjmp_save
#else
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/powerpc/__longjmp.S uClibc/libc/sysdeps/linux/powerpc/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/powerpc/__longjmp.S 2006-06-12 17:36:52 +0200
+++ uClibc/libc/sysdeps/linux/powerpc/__longjmp.S 2006-05-05 00:55:43 +0200
@@ -19,10 +19,8 @@
#include <features.h>
#include "ppc_asm.h"
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
+#include <bits/wordsize.h>
+#include <jmpbuf-offsets.h>
#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
#define FP(x...) x
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/powerpc/bits/setjmp.h uClibc/libc/sysdeps/linux/powerpc/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/powerpc/bits/setjmp.h 2006-06-12 17:36:42 +0200
+++ uClibc/libc/sysdeps/linux/powerpc/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000,2003,2004,2005,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
@@ -18,7 +19,7 @@
/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
+#define _BITS_SETJMP_H 1
#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
@@ -31,30 +32,6 @@
#include <bits/wordsize.h>
-#if defined __USE_MISC || defined _ASM
-# define JB_GPR1 0 /* Also known as the stack pointer */
-# define JB_GPR2 1
-# define JB_LR 2 /* The address we will return to */
-# if __WORDSIZE == 64
-# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18*2 words total. */
-# define JB_CR 21 /* Condition code registers with the VRSAVE at */
- /* offset 172 (low half of the double word. */
-# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
-# define JB_SIZE (64 * 8) /* As per PPC64-VMX ABI. */
-# define JB_VRSAVE 21 /* VRSAVE shares a double word with the CR at offset */
- /* 168 (high half of the double word). */
-# define JB_VRS 40 /* VRs 20 through 31 are saved, 12*4 words total. */
-# else
-# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total. */
-# define JB_CR 21 /* Condition code registers. */
-# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
-# define JB_SIZE ((64 + (12 * 4)) * 4)
-# define JB_VRSAVE 62
-# define JB_VRS 64
-# endif
-#endif
-
-
/* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI
the vrsave must be at byte 248 & v20 at byte 256. So we must pad this
correctly on 32 bit. It also insists that vecregs are only gauranteed
@@ -62,19 +39,12 @@
We have to version the code because members like int __mask_was_saved
in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We
cannot keep the altivec jmp_buf backward compatible with the jmp_buf. */
-#ifndef _ASM
-# if __WORDSIZE == 64
+#if __WORDSIZE == 64
typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16)));
-# else
+#else
/* The alignment is not essential, i.e.the buffer can be copied to a 4 byte
aligned buffer as per the ABI it is just added for performance reasons. */
typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16)));
-# endif
#endif
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
-
-#endif /* bits/setjmp.h */
+#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h 2006-05-05 00:55:43 +0200
@@ -0,0 +1,39 @@
+/* Private macros for accessing __jmp_buf contents. PowerPC version.
+ 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. */
+
+#define JB_GPR1 0 /* Also known as the stack pointer */
+#define JB_GPR2 1
+#define JB_LR 2 /* The address we will return to */
+#if __WORDSIZE == 64
+# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18*2 words total. */
+# define JB_CR 21 /* Condition code registers with the VRSAVE at */
+ /* offset 172 (low half of the double word. */
+# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
+# define JB_SIZE (64 * 8) /* As per PPC64-VMX ABI. */
+# define JB_VRSAVE 21 /* VRSAVE shares a double word with the CR at offset */
+ /* 168 (high half of the double word). */
+# define JB_VRS 40 /* VRs 20 through 31 are saved, 12*4 words total. */
+#else
+# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total. */
+# define JB_CR 21 /* Condition code registers. */
+# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
+# define JB_SIZE ((64 + (12 * 4)) * 4)
+# define JB_VRSAVE 62
+# define JB_VRS 64
+#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h 2006-05-05 00:55:43 +0200
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+#include <jmpbuf-offsets.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/powerpc/setjmp.S uClibc/libc/sysdeps/linux/powerpc/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/powerpc/setjmp.S 2006-06-12 17:36:52 +0200
+++ uClibc/libc/sysdeps/linux/powerpc/setjmp.S 2006-05-05 00:55:43 +0200
@@ -19,9 +19,8 @@
#include <features.h>
#include "ppc_asm.h"
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <bits/wordsize.h>
+#include <jmpbuf-offsets.h>
#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
#define FP(x...) x
@@ -82,3 +81,5 @@
b __sigjmp_save
#endif
.size __sigsetjmp,.-__sigsetjmp
+
+libc_hidden_def(__sigsetjmp)
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/sh/__longjmp.S uClibc/libc/sysdeps/linux/sh/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/sh/__longjmp.S 2006-06-12 17:41:15 +0200
+++ uClibc/libc/sysdeps/linux/sh/__longjmp.S 2006-05-05 00:55:43 +0200
@@ -17,9 +17,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
#include <features.h>
/* __longjmp(jmpbuf, val) */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/sh/bits/setjmp.h uClibc/libc/sysdeps/linux/sh/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/sh/bits/setjmp.h 2006-06-12 17:41:12 +0200
+++ uClibc/libc/sysdeps/linux/sh/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1999,2000,2003,2005,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
@@ -18,13 +18,12 @@
/* Define the machine-dependent type `jmp_buf'. SH version. */
#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
+#define _BITS_SETJMP_H 1
#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-#ifndef _ASM
typedef struct
{
/* Callee-saved registers r8 through r15. */
@@ -42,15 +41,5 @@
/* Callee-saved floating point registers fr12 through fr15. */
int __fpregs[4];
} __jmp_buf[1];
-#endif
-
-#if defined __USE_MISC || defined _ASM
-# define JB_SIZE (4 * 15)
-#endif
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[0].__regs[7])
-#endif /* bits/setjmp.h */
+#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/sh/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/sh/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/sh/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/sh/jmpbuf-offsets.h 2006-05-05 00:55:43 +0200
@@ -0,0 +1,20 @@
+/* Private macros for accessing __jmp_buf contents. SH version.
+ 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. */
+
+#define JB_SIZE (4 * 15)
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/sh/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/sh/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/sh/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/sh/jmpbuf-unwind.h 2006-05-05 00:55:43 +0200
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)[0].__regs[7])
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/sh/setjmp.S uClibc/libc/sysdeps/linux/sh/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/sh/setjmp.S 2006-06-12 17:41:15 +0200
+++ uClibc/libc/sysdeps/linux/sh/setjmp.S 2006-05-05 00:55:43 +0200
@@ -18,9 +18,7 @@
Boston, MA 02111-1307, USA. */
#include <features.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.text
@@ -77,7 +75,7 @@
mov.l r9, @-r4
mov.l r8, @-r4
-#ifdef __HAVE_SHARED__
+#ifdef __HAVE_SHARED__ /* shouldn't this be __PIC__? */
mov.l .LG, r2
mova .LG, r0
add r0, r2
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/sh64/bits/setjmp.h uClibc/libc/sysdeps/linux/sh64/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/sh64/bits/setjmp.h 2006-06-12 17:36:58 +0200
+++ uClibc/libc/sysdeps/linux/sh64/bits/setjmp.h 2006-05-11 13:16:31 +0200
@@ -33,8 +33,6 @@
#define __SETJMP_TRG(x) (__SETJMP_NUM_INT+__SETJMP_NUM_DBL+(x))
#define __SETJMP_LR (__SETJMP_NUM_INT+__SETJMP_NUM_DBL+__SETJMP_NUM_TRG)
-
-#ifndef _ASM
typedef struct
{
/* Callee-saved registers. */
@@ -45,6 +43,5 @@
unsigned long long __trgs[__SETJMP_NUM_TRG]; /* traget registers */
unsigned long long __lr; /* linkage register */
} __jmp_buf[1];
-#endif
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/sparc/__longjmp.S uClibc/libc/sysdeps/linux/sparc/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/sparc/__longjmp.S 2006-06-12 17:41:09 +0200
+++ uClibc/libc/sysdeps/linux/sparc/__longjmp.S 2006-05-05 00:55:43 +0200
@@ -16,12 +16,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <features.h>
-#include <sys/syscall.h>
+#include <bits/wordsize.h>
-#define _ASM 1
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#if __WORDSIZE == 32
+#include <jmpbuf-offsets.h>
#define ENV(base,reg) [%base + (reg * 4)]
#define ST_FLUSH_WINDOWS 3
#define RW_FP [%fp + 0x48]
@@ -30,7 +28,6 @@
.type __longjmp,%function
.align 4
__longjmp:
-
/* Store our arguments in global registers so we can still
* use them while unwinding frames and their register windows. */
@@ -86,3 +83,4 @@
.size __longjmp,.-__longjmp
libc_hidden_def(__longjmp)
+#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/sparc/bits/setjmp.h uClibc/libc/sysdeps/linux/sparc/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/sparc/bits/setjmp.h 2006-06-12 17:41:06 +0200
+++ uClibc/libc/sysdeps/linux/sparc/bits/setjmp.h 2006-05-11 13:16:32 +0200
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1999,2000,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999, 2000, 2003, 2005, 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
@@ -26,8 +27,6 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 64
-
-#ifndef _ASM
typedef struct __sparc64_jmp_buf
{
struct __sparc64_jmp_buf *uc_link;
@@ -55,30 +54,8 @@
} mc_fpregs;
} uc_mcontext;
} __jmp_buf[1];
-#endif
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp)
-
#else
-
-#if defined __USE_MISC || defined _ASM
-# define JB_SP 0
-# define JB_FP 1
-# define JB_PC 2
-#endif
-
-#ifndef _ASM
typedef int __jmp_buf[3];
#endif
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((int) (address) < (jmpbuf)[JB_SP])
-
-#endif
-
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/sparc/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/sparc/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/sparc/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/sparc/jmpbuf-offsets.h 2006-05-05 00:55:43 +0200
@@ -0,0 +1,28 @@
+/* Private macros for accessing __jmp_buf contents. SPARC version.
+ 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. */
+
+#if __WORDSIZE == 64
+#define O_mask_was_saved 512
+#define O_gregs 32
+#define O_g1 (O_gregs + 4*8)
+#else
+#define JB_SP 0
+#define JB_FP 1
+#define JB_PC 2
+#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/sparc/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/sparc/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/sparc/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/sparc/jmpbuf-unwind.h 2006-05-05 00:55:43 +0200
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+#include <jmpbuf-offsets.h>
+
+#if __WORDSIZE == 64
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp)
+
+#else
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((int) (address) < (jmpbuf)[JB_SP])
+
+#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/sparc/setjmp.S uClibc/libc/sysdeps/linux/sparc/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/sparc/setjmp.S 2006-06-12 17:41:09 +0200
+++ uClibc/libc/sysdeps/linux/sparc/setjmp.S 2006-05-05 00:55:43 +0200
@@ -16,40 +16,57 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sys/syscall.h>
+#include <bits/wordsize.h>
+#include <jmpbuf-offsets.h>
-#define _ASM 1
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#if __WORDSIZE == 32
#define ST_FLUSH_WINDOWS 3
+#endif
.global _setjmp
.type _setjmp,%function
.align 4
_setjmp:
+#if __WORDSIZE == 64
+ ba __sigsetjmp_local
+#else
b 1f
+#endif
set 0, %o1
.size _setjmp,.-_setjmp
-
-
-
.global setjmp
.type setjmp,%function
.align 4
setjmp:
+#if __WORDSIZE == 64
+ ba,pt %xcc, __sigsetjmp_local
+#else
set 1, %o1
+#endif
.size setjmp,.-setjmp
-
-
-
.global __sigsetjmp
.type __sigsetjmp,%function
.align 4
__sigsetjmp:
+#if __WORDSIZE == 64
+__sigsetjmp_local:
+ /* Record whether the user is intending to save the sigmask. */
+ st %o1, [%o0 + O_mask_was_saved]
+
+ /* Load up our return value, as longjmp is going to override
+ the jmp_buf on its way back. */
+ mov %g0, %g1
+
+ /* And call getcontext! */
+ ta 0x6e
+
+ retl
+ mov %g1, %o0
+#else
1:
/* Save our PC, SP and FP. Save the signal mask if requested with
a tail-call for simplicity; it always returns zero. */
@@ -62,9 +79,5 @@
mov %o7, %g1
call __sigjmp_save
mov %g1, %o7
+#endif
.size __sigsetjmp,.-__sigsetjmp
-
-
-
-.weak _setjmp
-.weak setjmp
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/v850/__longjmp.S uClibc/libc/sysdeps/linux/v850/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/v850/__longjmp.S 2006-06-12 17:40:37 +0200
+++ uClibc/libc/sysdeps/linux/v850/__longjmp.S 2006-05-11 13:16:32 +0200
@@ -11,11 +11,6 @@
* Written by Miles Bader <miles at gnu.org>
*/
-#include <features.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
#include <clinkage.h>
.text
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/v850/bits/setjmp.h uClibc/libc/sysdeps/linux/v850/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/v850/bits/setjmp.h 2006-06-12 17:40:35 +0200
+++ uClibc/libc/sysdeps/linux/v850/bits/setjmp.h 2006-05-11 13:16:32 +0200
@@ -18,7 +18,6 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-#ifndef _ASM
typedef struct
{
/* Stack pointer. */
@@ -30,13 +29,5 @@
/* Callee-saved registers r2 and r20-r29. */
int __regs[11];
} __jmp_buf[1];
-#endif
-
-#define JB_SIZE (4 * 13)
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[0].__sp)
#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/v850/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/v850/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/v850/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/v850/jmpbuf-offsets.h 2006-05-11 13:16:32 +0200
@@ -0,0 +1,6 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#define JB_SIZE (4 * 13)
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/v850/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/v850/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/v850/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/v850/jmpbuf-unwind.h 2006-05-11 13:16:32 +0200
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)[0].__sp)
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/v850/setjmp.S uClibc/libc/sysdeps/linux/v850/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/v850/setjmp.S 2006-06-12 17:40:37 +0200
+++ uClibc/libc/sysdeps/linux/v850/setjmp.S 2006-05-11 13:16:32 +0200
@@ -11,10 +11,6 @@
* Written by Miles Bader <miles at gnu.org>
*/
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
#include <clinkage.h>
.text
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/vax/__longjmp.S uClibc/libc/sysdeps/linux/vax/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/vax/__longjmp.S 2006-06-12 17:40:17 +0200
+++ uClibc/libc/sysdeps/linux/vax/__longjmp.S 2006-05-05 00:55:43 +0200
@@ -1,5 +1,3 @@
-#include <features.h>
-
/*
* longjmp.S atp sept 2001
* Jan-Benedict Glaw <jbglaw at lug-owl.de> 2006
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/vax/bits/setjmp.h uClibc/libc/sysdeps/linux/vax/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/vax/bits/setjmp.h 2006-06-12 17:40:15 +0200
+++ uClibc/libc/sysdeps/linux/vax/bits/setjmp.h 2006-05-11 13:16:32 +0200
@@ -6,14 +6,8 @@
/* we want to save enough that we can use this to fool RET,
* So we basically save all of the CALLS stack frame. Plus regs. */
-#ifndef _ASM
typedef int __jmp_buf[16];
-#endif
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf[4]))
/*
jmp_buf layout. jmp_buf[0]
void *__cond; The condition handler
@@ -34,4 +28,3 @@
void *__rA; regs, r0->r11.
void *__rB; regs, r0->r11.
*/
-
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/vax/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/vax/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/vax/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/vax/jmpbuf-unwind.h 2006-05-05 00:55:44 +0200
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf[4]))
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/x86_64/__longjmp.S uClibc/libc/sysdeps/linux/x86_64/__longjmp.S
--- uClibc.orig/libc/sysdeps/linux/x86_64/__longjmp.S 2006-06-12 17:40:23 +0200
+++ uClibc/libc/sysdeps/linux/x86_64/__longjmp.S 2006-05-05 00:55:44 +0200
@@ -16,10 +16,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 64
+#include <jmpbuf-offsets.h>
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0.
@@ -45,3 +45,4 @@
jmpq *%rdx
.size __longjmp,.-__longjmp
libc_hidden_def(__longjmp)
+#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/x86_64/bits/setjmp.h uClibc/libc/sysdeps/linux/x86_64/bits/setjmp.h
--- uClibc.orig/libc/sysdeps/linux/x86_64/bits/setjmp.h 2006-06-12 17:40:20 +0200
+++ uClibc/libc/sysdeps/linux/x86_64/bits/setjmp.h 2006-05-11 13:16:32 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2002,2003,2005,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
@@ -18,7 +18,7 @@
/* Define the machine-dependent type `jmp_buf'. x86-64 version. */
#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
+#define _BITS_SETJMP_H 1
#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
@@ -27,52 +27,9 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 64
-
-/* We only need to save callee-saved registers plus stackpointer and
- program counter. */
-# if defined __USE_MISC || defined _ASM
-# define JB_RBX 0
-# define JB_RBP 1
-# define JB_R12 2
-# define JB_R13 3
-# define JB_R14 4
-# define JB_R15 5
-# define JB_RSP 6
-# define JB_PC 7
-# define JB_SIZE (8*8)
-# endif
-
-#else
-
-# if defined __USE_MISC || defined _ASM
-# define JB_BX 0
-# define JB_SI 1
-# define JB_DI 2
-# define JB_BP 3
-# define JB_SP 4
-# define JB_PC 5
-# define JB_SIZE 24
-# endif
-
-#endif
-
-#ifndef _ASM
-
-# if __WORDSIZE == 64
typedef long int __jmp_buf[8];
-# else
+#else
typedef int __jmp_buf[6];
-# endif
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-# if __WORDSIZE == 64
-# define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_RSP])
-# else
-# define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_SP])
-# endif
#endif
-#endif /* bits/setjmp.h */
+#endif /* bits/setjmp.h */
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/x86_64/bsd-_setjmp.S uClibc/libc/sysdeps/linux/x86_64/bsd-_setjmp.S
--- uClibc.orig/libc/sysdeps/linux/x86_64/bsd-_setjmp.S 2006-06-12 17:40:23 +0200
+++ uClibc/libc/sysdeps/linux/x86_64/bsd-_setjmp.S 2006-05-05 00:55:44 +0200
@@ -21,10 +21,6 @@
We cannot do it in C because it must be a tail-call, so frame-unwinding
in setjmp doesn't clobber the state restored by longjmp. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
.global _setjmp
.type _setjmp,%function
.align 16
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/x86_64/bsd-setjmp.S uClibc/libc/sysdeps/linux/x86_64/bsd-setjmp.S
--- uClibc.orig/libc/sysdeps/linux/x86_64/bsd-setjmp.S 2006-06-12 17:40:24 +0200
+++ uClibc/libc/sysdeps/linux/x86_64/bsd-setjmp.S 2006-05-05 00:55:44 +0200
@@ -17,10 +17,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
.global setjmp
.type setjmp,%function
.align 16
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/x86_64/clone.S uClibc/libc/sysdeps/linux/x86_64/clone.S
--- uClibc.orig/libc/sysdeps/linux/x86_64/clone.S 2006-06-12 17:40:23 +0200
+++ uClibc/libc/sysdeps/linux/x86_64/clone.S 2006-05-07 23:50:45 +0200
@@ -19,12 +19,12 @@
/* clone() is even more special than fork() as it mucks with stacks
and invokes a function in the right context after its all over. */
-#include <features.h>
-#define _ERRNO_H 1
+#define _ERRNO_H 1
#include <bits/errno.h>
#include <sys/syscall.h>
-#define _SCHED_H
-#include <bits/sched.h>
+
+#define CLONE_VM 0x00000100
+#define CLONE_THREAD 0x00010000
/* The userland implementation is:
int clone (int (*fn)(void *arg), void *child_stack, int flags, void *arg),
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h
--- uClibc.orig/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h 2006-05-05 00:55:44 +0200
@@ -0,0 +1,44 @@
+/* Private macros for accessing __jmp_buf contents. x86-64 version.
+ 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. */
+
+#if __WORDSIZE == 64
+
+/* We only need to save callee-saved registers plus stackpointer and
+ program counter. */
+# define JB_RBX 0
+# define JB_RBP 1
+# define JB_R12 2
+# define JB_R13 3
+# define JB_R14 4
+# define JB_R15 5
+# define JB_RSP 6
+# define JB_PC 7
+# define JB_SIZE (8*8)
+
+#else
+
+# define JB_BX 0
+# define JB_SI 1
+# define JB_DI 2
+# define JB_BP 3
+# define JB_SP 4
+# define JB_PC 5
+# define JB_SIZE 24
+
+#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h
--- uClibc.orig/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h 1970-01-01 01:00:00 +0100
+++ uClibc/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h 2006-05-05 00:55:44 +0200
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+#include <jmpbuf-offsets.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#if __WORDSIZE == 64
+# define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)[JB_RSP])
+#else
+# define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)[JB_SP])
+#endif
diff -urN --exclude .svn --exclude CVS --exclude .cvsignore --exclude nptl --exclude linuxthreads --exclude linuxthreads.old --exclude linuxthreads.old_db uClibc.orig/libc/sysdeps/linux/x86_64/setjmp.S uClibc/libc/sysdeps/linux/x86_64/setjmp.S
--- uClibc.orig/libc/sysdeps/linux/x86_64/setjmp.S 2006-06-12 17:40:23 +0200
+++ uClibc/libc/sysdeps/linux/x86_64/setjmp.S 2006-05-05 00:55:44 +0200
@@ -17,9 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 64
+#include <jmpbuf-offsets.h>
.global __sigsetjmp
.type __sigsetjmp,%function
@@ -44,3 +45,4 @@
jmp __sigjmp_save
#endif
.size __sigsetjmp,.-__sigsetjmp
+#endif
More information about the uClibc
mailing list