3
Copyright (C) 1996 Miguel de Icaza
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21
#define _SV save %sp, -0x40, %sp
23
#define FLUSH_ALL_WINDOWS \
24
_SV; _SV; _SV; _SV; _SV; _SV; _SV; \
25
_RV; _RV; _RV; _RV; _RV; _RV; _RV;
27
/* Save our return PC and SP. */
28
.global _setjmp, setjmp, __sigsetjmp
37
.global __longjmp, longjmp
40
/* Flush register windows.
41
Write all the register windows to their stack slots, and
42
mark them all as invalid (needing to be sucked up from the
43
stack when used). This ensures that all information needed to
44
unwind to these callers is in memory, not in the register
47
ld [%o0], %o7 /* Return PC. */
48
ld [%o0 + 4], %fp /* Saved SP. */
49
sub %fp, 64, %sp /* Allocate a register save area. */
54
/* On the way out, put the return value in %o0. */