summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/v850/setjmp.S
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-10-11 08:29:22 +0000
committerEric Andersen <andersen@codepoet.org>2001-10-11 08:29:22 +0000
commit5c12c8eecd5f2e06c200651e90befe85efcf166f (patch)
treedbaed54145d28357e3b145ad8631529ffd0c2344 /libc/sysdeps/linux/v850/setjmp.S
parenta924265e43cf2fcad97fc9489da482a27b0faf93 (diff)
Patch from Miles Bader <miles@lsi.nec.co.jp> to support the v850.
He sent this patch to me a month ago, but I forgot to apply it...
Diffstat (limited to 'libc/sysdeps/linux/v850/setjmp.S')
-rw-r--r--libc/sysdeps/linux/v850/setjmp.S39
1 files changed, 39 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/v850/setjmp.S b/libc/sysdeps/linux/v850/setjmp.S
new file mode 100644
index 000000000..460706ec6
--- /dev/null
+++ b/libc/sysdeps/linux/v850/setjmp.S
@@ -0,0 +1,39 @@
+/*
+ * libc/sysdeps/linux/v850/setjmp.S -- `setjmp' for v850
+ *
+ * Copyright (C) 2001 NEC Corporation
+ * Copyright (C) 2001 Miles Bader <miles@gnu.org>
+ *
+ * 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.
+ *
+ * Written by Miles Bader <miles@gnu.org>
+ */
+
+#define _SETJMP_H
+#define _ASM
+#include <bits/setjmp.h>
+
+#include <clinkage.h>
+
+ .text
+C_ENTRY(__sigsetjmp):
+ /* Save registers */
+ mov r6, ep
+ sst.w sp, 0[ep]
+ sst.w lp, 4[ep]
+ sst.w r2, 8[ep]
+ sst.w r20, 12[ep]
+ sst.w r21, 16[ep]
+ sst.w r22, 20[ep]
+ sst.w r23, 24[ep]
+ sst.w r24, 28[ep]
+ sst.w r25, 32[ep]
+ sst.w r26, 36[ep]
+ sst.w r27, 40[ep]
+ sst.w r28, 44[ep]
+ sst.w r29, 48[ep]
+ /* Make a tail call to __sigjmp_save; it takes the same args. */
+ jr C_SYMBOL_NAME(__sigjmp_save)
+C_END(__sigsetjmp)