3 * Copyright (C) 1998, 1999, Jonathan S. Shapiro.
5 * This file is part of the EROS Operating System.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2,
10 * or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 /* #include <eros/i486/asm.h> */
27 * unsigned long ebx, esi, edi;
35 * On entry, the stack to setjmp looks like:
47 movl 0x8(%ebp),%eax /* address of jmp_buf to eax */
48 movl %ebx,(%eax) /* save %ebx */
49 movl %esi,4(%eax) /* save %esi */
50 movl %edi,8(%eax) /* save %edi */
51 leal 8(%ebp),%edx /* calling proc's esp, not ours! */
53 movl 4(%ebp), %edx /* save return PC */
55 movl 0(%ebp),%edx /* calling proc's ebp, not ours! */
58 xorl %eax,%eax /* return 0 the first time */