Update.
[glibc.git] / sysdeps / vax / setjmp.c
blobc57e914890fe8859148f6e97cd72f609738447fa
1 /* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
4 Copyright (c) 1980 Regents of the University of California.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library 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 GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
21 #include <setjmp.h>
24 /* Save the current program position in ENV and return 0. */
25 int
26 __sigsetjmp (jmp_buf env, int savemask)
28 /* Save our caller's FP and PC. */
29 asm ("movl 12(fp), %0" : "=g" (env[0].__jmpbuf[0].__fp));
30 asm ("movl 16(fp), %0" : "=g" (env[0].__jmpbuf[0].__pc));
32 /* Save the signal mask if requested. */
33 return __sigjmp_save (env, savemask);