2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2003 Free Software Foundation, Inc.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
19 #define EXT_C(sym) sym
20 #define FUNCTION(x) .globl EXT_C(x) ; .type EXT_C(x), "function" ; EXT_C(x):
27 * int setjmp (jmp_buf env)
30 pop %rsi /* Return address, and adjust the stack */
32 movq %rbx, 0(%rdi) /* RBX */
33 movq %rsp, 8(%rdi) /* RSP */
35 movq %rbp, 16(%rdi) /* RBP */
36 movq %r12, 24(%rdi) /* R12 */
37 movq %r13, 32(%rdi) /* R13 */
38 movq %r14, 40(%rdi) /* R14 */
39 movq %r15, 48(%rdi) /* R15 */
40 movq %rsi, 56(%rdi) /* RSI */
44 * int longjmp (jmp_buf env, int val)