2 * Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>. All rights
3 * reserved. Distributed under the terms of the Haiku License.
8 #include "setjmp_internal.h"
10 /* int sigsetjmp(jmp_buf buffer, int saveMask) */
11 FUNCTION(__sigsetjmp):
13 // a0: buffer, d0: saveMask
17 // store non-volatile general purpose registers
18 #warning M68K: do we want to save a7 there ??
19 movem.l %d2-%d7/%a2-%a7,(%a0)
21 // store special registers (link, condition)
24 move.w %d0,(JMP_REGS_CCR,%a0)
25 move.l (%a7),(JMP_REGS_PC,%a0)
27 #warning M68K: check this.
29 jmp __setjmp_save_sigs
30 FUNCTION_END(__sigsetjmp)
31 FUNCTION_END(sigsetjmp)
34 /* int setjmp(jmp_buf buffer) */
39 clr.l -(%a7) /* push 0 as 2nd arg */
42 // call __sigsetjmp with saveMask = 0
46 #pragma weak _setjmp=setjmp