Update of /cvsroot/linux-vax/glibc/sysdeps/vax
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1863
Modified Files:
bsd-_setjmp.S bsd-setjmp.S
Removed Files:
__longjmp.c setjmp.c
Log Message:
port over setjmp/longjmp etc from uClibc
Index: bsd-_setjmp.S
===================================================================
RCS file: /cvsroot/linux-vax/glibc/sysdeps/vax/bsd-_setjmp.S,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- bsd-_setjmp.S 25 Feb 2004 07:25:24 -0000 1.6
+++ bsd-_setjmp.S 26 Feb 2004 02:06:31 -0000 1.7
@@ -21,8 +21,35 @@
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. */
-#include <sysdep.h>
+#include "DEFS.h"
+
+ENTRY(_setjmp, R6)
+ /* push an empty word onto the stack */
+ pushl $0
+ /* now copy handler, psw, ap, fp and pc on the stack up one word */
+ movl 4(%sp), (%sp) /* copy handler */
+ movl 8(%sp), 4(%sp) /* psw */
+ movl 12(%sp), 8(%sp) /* ap */
+ movl 16(%sp), 12(%sp) /* fp */
+ movl 20(%sp), 16(%sp) /* pc */
+ movl 24(%sp), 20(%sp) /* r6 from register mask */
+
+ movl $2, 24(%sp) /* set the number of arguments to 2 */
+ movl 32(%sp), 28(%sp) /* copy the jmp_buf */
+ movl $1, 32(%sp) /* put the 1 on the stack */
+
+ addl3 $24, %sp, %ap
+ movl %sp, %fp
+
+ moval __sigsetjmp, %r0
+ addl2 $2, %r0
+ pushl %r0
+ rsb
+END(_setjmp)
+
+#if 0
+
ENTRY (_setjmp, 0)
movl (%sp)+,%r0 /* Pop return PC. */
movl (%sp)+,%r1 /* Pop jmp_buf argument. */
@@ -31,3 +58,5 @@
pushl %r0 /* Push back return PC. */
jmp C_SYMBOL_NAME (__sigsetjmp)+2
END(_setjmp)
+
+#endif
Index: bsd-setjmp.S
===================================================================
RCS file: /cvsroot/linux-vax/glibc/sysdeps/vax/bsd-setjmp.S,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- bsd-setjmp.S 25 Feb 2004 07:25:24 -0000 1.5
+++ bsd-setjmp.S 26 Feb 2004 02:06:31 -0000 1.6
@@ -21,8 +21,33 @@
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. */
-#include <sysdep.h>
+#include "DEFS.h"
+
+ENTRY(setjmp, R6)
+ pushl $0
+ /* now copy handler, psw, ap, fp and pc on the stack up one word */
+ movl 4(%sp), (%sp)
+ movl 8(%sp), 4(%sp)
+ movl 12(%sp), 8(%sp)
+ movl 16(%sp), 12(%sp)
+ movl 20(%sp), 16(%sp)
+ movl 24(%sp), 20(%sp) /* r6 from register mask */
+
+ movl $2, 24(%sp) /* set the number of arguments to 2 */
+ movl 32(%sp), 28(%sp) /* copy the jmp_buf */
+ movl $0, 32(%sp) /* put the 0 on the stack */
+
+ addl3 $24, %sp, %ap
+ movl %sp, %fp
+
+ moval __sigsetjmp, %r0
+ addl2 $2, %r0
+ pushl %r0
+ rsb
+END(setjmp)
+
+#if 0
ENTRY (setjmp, 0)
movl (%sp)+,%r0 /* Pop return PC. */
movl (%sp)+,%r1 /* Pop jmp_buf argument. */
@@ -31,3 +56,5 @@
pushl %r0 /* Push back return PC. */
jmp C_SYMBOL_NAME (__sigsetjmp)+2
END(setjmp)
+#endif
+
--- __longjmp.c DELETED ---
--- setjmp.c DELETED ---
|