Upgraded GRUB2 to 2.00 release.
[AROS.git] / arch / all-pc / boot / grub2-aros / grub-core / lib / powerpc / setjmp.S
blobc301a7b07656fde73f63b0fd0e26dcf09ac2320c
1 /*
2  *  GRUB  --  GRand Unified Bootloader
3  *  Copyright (C) 2004,2007  Free Software Foundation, Inc.
4  *
5  *  GRUB 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 3 of the License, or
8  *  (at your option) any later version.
9  *
10  *  GRUB 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.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
17  */
19 #include <grub/symbol.h>
20 #include <grub/dl.h>
22         .file   "setjmp.S"
24 GRUB_MOD_LICENSE "GPLv3+"
26         .text
29  * int grub_setjmp (grub_jmp_buf env)
30  */
31 FUNCTION(grub_setjmp)
32         stw     1, 0(3)
33         stw     14, 4(3)
34         stw     15, 8(3)
35         stw     16, 12(3)
36         stw     17, 16(3)
37         stw     18, 20(3)
38         stw     19, 24(3)
39         stw     20, 28(3)
40         stw     21, 32(3)
41         stw     22, 36(3)
42         stw     23, 40(3)
43         stw     24, 44(3)
44         stw     25, 48(3)
45         stw     26, 52(3)
46         stw     27, 56(3)
47         stw     28, 60(3)
48         stw     29, 64(3)
49         stw     30, 68(3)
50         mflr    4
51         stw     4, 72(3)
52         mfcr    4
53         stw     4, 76(3)
54         li      3, 0
55         blr
58  * int grub_longjmp (grub_jmp_buf env, int val)
59  */
60 FUNCTION(grub_longjmp)
61         lwz     1, 0(3)
62         lwz     14, 4(3)
63         lwz     15, 8(3)
64         lwz     16, 12(3)
65         lwz     17, 16(3)
66         lwz     18, 20(3)
67         lwz     19, 24(3)
68         lwz     20, 28(3)
69         lwz     21, 32(3)
70         lwz     22, 36(3)
71         lwz     23, 40(3)
72         lwz     24, 44(3)
73         lwz     25, 48(3)
74         lwz     26, 52(3)
75         lwz     27, 56(3)
76         lwz     28, 60(3)
77         lwz     29, 64(3)
78         lwz     30, 68(3)
79         lwz     5, 72(3)
80         mtlr    5
81         lwz     5, 76(3)
82         mtcr    5
83         mr.     3, 4
84         bne     1f
85         li      3, 1
86 1:      blr