summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/cris/__longjmp.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/cris/__longjmp.S')
-rw-r--r--libc/sysdeps/linux/cris/__longjmp.S33
1 files changed, 28 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/cris/__longjmp.S b/libc/sysdeps/linux/cris/__longjmp.S
index 8c7ca6eaa..52a986fd9 100644
--- a/libc/sysdeps/linux/cris/__longjmp.S
+++ b/libc/sysdeps/linux/cris/__longjmp.S
@@ -1,5 +1,5 @@
/* longjmp for CRIS.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 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
@@ -23,17 +23,40 @@
#define _ASM
#include <bits/setjmp.h>
+ .syntax no_register_prefix
+
/* Saving and restoring CCR is meaningless, so we don't do it. */
ENTRY (__longjmp)
/* Note that r10 = jmp_buf, r11 = retval. */
- move [$r10+16*4],$srp
- test.d $r11
+#ifdef __arch_v32
+
+ /* We don't restore the call-clobbered registers for v32;
+ their space (corresponding to v10) is now defined as
+ reserved. */
+ movem [r10],r9
+ addq 14*4,r10
+ cmpq 0,r11
+ beq 0f
+ move.d [r10+],sp
+
+ move.d r11,r9
+0:
+ move.d [r10+],acr
+ jump acr
+ move [r10],srp
+
+#else
+
+ move [r10+16*4],srp
+ test.d r11
beq 0f /* Already a 1 in place. */
nop
/* Offset for r9, the return value (see setjmp). */
- move.d $r11,[$r10+6*4]
+ move.d r11,[r10+6*4]
0:
- movem [$r10],$pc
+ movem [r10],pc
+
+#endif
END (__longjmp)
libc_hidden_def(__longjmp)