xref: /haiku/src/system/libroot/posix/arch/m68k/sigsetjmp.S (revision 6e927a5fc080cb934e7584454f472cacf4c3e361)
1/*
2 * Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>. All rights
3 * reserved. Distributed under the terms of the Haiku License.
4 */
5
6#include "setjmp_internal.h"
7
8/* int sigsetjmp(jmp_buf buffer, int saveMask) */
9FUNCTION(__sigsetjmp):
10FUNCTION(sigsetjmp):
11	// a0: buffer, d0: saveMask
12	move.l	(4,%a7),%a0
13	move.l	(8,%a7),%d0
14
15	// store non-volatile general purpose registers
16#warning M68K:	 do we want to save a7 there ??
17	movem.l	%d2-%d7/%a2-%a7,(%a0)
18
19	// store special registers (link, condition)
20	clr.l	%d0
21	move	%ccr,%d0
22	move.w	%d0,(JMP_REGS_CCR,%a0)
23	move.l	(%a7),(JMP_REGS_PC,%a0)
24
25#warning M68K: check this.
26
27	jmp		__setjmp_save_sigs
28