summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid McCullough <davidm@snapgear.com>2001-05-08 13:56:56 +0000
committerDavid McCullough <davidm@snapgear.com>2001-05-08 13:56:56 +0000
commit05669c069b1fd888b930240e9985eee17468fdd4 (patch)
tree620aa75b4f755d8371de9ac8a6114df0db4fa24f
parent59674ac81273444cc2e7f4a956249ff88042ede8 (diff)
Quick fix to setjmp/longjmp/sigsetjmp etc to make them work.
This should really be fixed to fall into line with the other archs.
-rw-r--r--libc/sysdeps/linux/m68k/bits/setjmp.h9
-rw-r--r--libc/sysdeps/linux/m68k/setjmp.S16
2 files changed, 15 insertions, 10 deletions
diff --git a/libc/sysdeps/linux/m68k/bits/setjmp.h b/libc/sysdeps/linux/m68k/bits/setjmp.h
index 83ce200a1..5680ffe04 100644
--- a/libc/sysdeps/linux/m68k/bits/setjmp.h
+++ b/libc/sysdeps/linux/m68k/bits/setjmp.h
@@ -49,11 +49,16 @@ typedef struct
/* Simple version of sigsetjmp and siglongjmp */
+extern int __setjmp(__jmp_buf __buf);
+extern int __longjmp(__jmp_buf __buf, int __val);
+
+#define longjmp(buf, val) __longjmp(buf, val)
+
#define __sigsetjmp(env, savesigs) ((env)->__mask_was_saved = (savesigs), \
sigprocmask(SIG_SETMASK, 0, &(env)->__saved_mask), \
- setjmp(&(env)->__jmpbuf))
+ __setjmp((env)->__jmpbuf))
#define siglongjmp(env, val) (((env)->__mask_was_saved ? \
sigprocmask(SIG_SETMASK, &(env)->__saved_mask, 0) : 0), \
- longjmp(&(env)->__jmpbuf, val))
+ __longjmp((env)->__jmpbuf, val))
diff --git a/libc/sysdeps/linux/m68k/setjmp.S b/libc/sysdeps/linux/m68k/setjmp.S
index 3ff05425f..d104d78ac 100644
--- a/libc/sysdeps/linux/m68k/setjmp.S
+++ b/libc/sysdeps/linux/m68k/setjmp.S
@@ -39,10 +39,10 @@
#define fp REG (fp)
#define sp REG (sp)
-.global SYM (setjmp)
-.global SYM (longjmp)
+.global SYM (__setjmp)
+.global SYM (__longjmp)
-SYM (setjmp):
+SYM (__setjmp):
moveal sp@(4),a0
movel sp@(0),a0@(12)
movel sp,a0@(8)
@@ -50,7 +50,7 @@ SYM (setjmp):
clrl d0
rts
-SYM (longjmp):
+SYM (__longjmp):
moveal sp@(4),a0
movel sp@(8),d0
bne 1f
@@ -62,10 +62,10 @@ SYM (longjmp):
rts
#ifdef M68881
-.global SYM (setjmp_68881)
-.global SYM (longjmp_68881)
+.global SYM (__setjmp_68881)
+.global SYM (__longjmp_68881)
-SYM (setjmp_68881):
+SYM (__setjmp_68881):
moveal sp@(4),a0
movel sp@(0),a0@(12)
movel sp,a0@(8)
@@ -74,7 +74,7 @@ SYM (setjmp_68881):
clrl d0
rts
-SYM (longjmp_68881):
+SYM (__longjmp_68881):
moveal sp@(4),a0
fmovemx a0@(64),fp2-fp7
movel sp@(8),d0