2 * Copyright (c) 1992 Helsinki University of Technology
5 * Permission to use, copy, modify and distribute this software and its
6 * documentation is hereby granted, provided that both the copyright
7 * notice and this permission notice appear in all copies of the
8 * software, derivative works or modified versions, and any portions
9 * thereof, and that both notices appear in supporting documentation.
11 * HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN
12 * ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY
13 * LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
14 * USE OF THIS SOFTWARE.
18 * 29-Apr-92 Johannes Helander (jvh) at Helsinki University of Technology
21 * $Id: setjmp.s,v 1.1 1993/09/17 18:43:46 phil Exp $
24 #include <machine/asm.h>
25 #include <machine/jmpbuf.h>
31 movd
4(sp
), r2 /* jmp_buf */
32 movd
0(sp
), JMP_BUF_PC
(r2) /* pc of caller */
33 movd
r0, JMP_BUF_SIGMASK
(r2) /* save mask */
35 sprd sp
, JMP_BUF_SP
(r2)
36 sprd fp
, JMP_BUF_FP
(r2)
37 sprd sb
, JMP_BUF_SB
(r2)
38 movd
r3, JMP_BUF_R3
(r2) /* save registers r3-r7 */
39 movd
r4, JMP_BUF_R4
(r2)
40 movd
r5, JMP_BUF_R5
(r2)
41 movd
r6, JMP_BUF_R6
(r2)
42 movd
r7, JMP_BUF_R7
(r2)
48 movd
4(sp
),r2 /* jmp_buf */
49 movd JMP_BUF_SIGMASK
(r2), tos
/* restore mask */
52 movd
4(sp
), r2 /* jmp_buf */
53 movd
8(sp
), r0 /* value */
55 lprd sp
, JMP_BUF_SP
(r2)
56 lprd fp
, JMP_BUF_FP
(r2)
57 lprd sb
, JMP_BUF_SB
(r2)
58 movd JMP_BUF_R3
(r2), r3 /* load registers r3-r7 */
59 movd JMP_BUF_R4
(r2), r4
60 movd JMP_BUF_R5
(r2), r5
61 movd JMP_BUF_R6
(r2), r6
62 movd JMP_BUF_R7
(r2), r7
63 movd JMP_BUF_PC
(r2), 0(sp
) /* patch return pc */