1 /* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 see <http://www.gnu.org/licenses/>. */
18 #include <jmpbuf-offsets.h>
19 #include "NM_Macros.S"
21 ;----------------------------------------
23 ; Description: Save the current context so
24 ; a nr_longjmp works later.
25 ; Input: %o0: jmp_buf: (ptr to) array to store context in
26 ; Output: %o0 = 0 the first time we're called, or
27 ; whatever longjmp returns later
28 ; Side Effects: Uses %g0
37 movi %o1,0 ; (Delay slot) Set signal mask to zero
43 MOVIP %o1,1 ; Set signal mask to 1 to save mask
49 pfx jmpbuf_callersret ; present return address
51 pfx jmpbuf_jmpret ; where the longjmp will later execute from
53 pfx jmpbuf_sp ; Save stack pointer
55 pfx jmpbuf_l0 ; Save local register l0
57 pfx jmpbuf_l1 ; Save local register l1
59 pfx jmpbuf_l2 ; Save local register l2
61 pfx jmpbuf_l3 ; Save local register l3
63 pfx jmpbuf_l4 ; Save local register l4
65 pfx jmpbuf_l5 ; Save local register l5
67 pfx jmpbuf_l6 ; Save local register l6
69 pfx jmpbuf_l7 ; Save local register l7
71 pfx jmpbuf_i0 ; Save input register i0
73 pfx jmpbuf_i1 ; Save input register i1
75 pfx jmpbuf_i2 ; Save input register i2
77 pfx jmpbuf_i3 ; Save input register i3
79 pfx jmpbuf_i4 ; Save input register i4
81 pfx jmpbuf_i5 ; Save input register i5
83 pfx %hi(__sigjmp_save@h) ; Load up %g0 with address
84 movi %g0,%lo(__sigjmp_save@h)
85 pfx %xhi(__sigjmp_save@h)
86 movhi %g0,%xlo(__sigjmp_save@h)