summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/cris/setjmp.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/cris/setjmp.S')
-rw-r--r--libc/sysdeps/linux/cris/setjmp.S33
1 files changed, 25 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/cris/setjmp.S b/libc/sysdeps/linux/cris/setjmp.S
index 0c5608fbd..e7bb6358a 100644
--- a/libc/sysdeps/linux/cris/setjmp.S
+++ b/libc/sysdeps/linux/cris/setjmp.S
@@ -1,5 +1,5 @@
/* setjmp for CRIS.
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 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,14 +18,28 @@
Boston, MA 02111-1307, USA. */
#include "sysdep.h"
-#define _ASM
#define _SETJMP_H
+#define _ASM
#include <bits/setjmp.h>
.syntax no_register_prefix
ENTRY (__sigsetjmp)
.Local__sigsetjmp:
+
+#ifdef __arch_v32
+
+ moveq 1,r9
+ move.d r10,r12
+ addq 14*4,r12
+ movem r9,[r10]
+ lapc 0f,r13
+ move.d sp,[r12+]
+ move.d r13,[r12+]
+ move srp,[r12+]
+
+#else
+
moveq 1,r9
movem sp,[r10+1*4]
#ifdef __PIC__
@@ -36,6 +50,15 @@ ENTRY (__sigsetjmp)
#endif
move.d r9,[r10]
move srp,[r10+16*4]
+
+#endif
+
+/* Saving and restoring CCR is meaningless, so we don't do it. */
+
+/* Saving registers would complicate the implementation, but we
+ can get away with not setting up R0 here since we know that
+ __sigjmp_save is a local symbol; it doesn't have a PLT (which
+ would have required GOT in R0 at the time of the jump). */
PLTJUMP (__sigjmp_save)
0: /* This is where longjmp returns. (Don't use "ret" - it's a macro. */
Ret
@@ -59,9 +82,3 @@ ENTRY (setjmp)
ba .Local__sigsetjmp
moveq 1,r11
END (setjmp)
-
-/*
-weak_extern (__setjmp)
-weak_extern (_setjmp)
-weak_extern (setjmp)
-*/