Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/ppc/setjmp.S

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File size: 1155 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 #
2 # arch/ppc/setjmp.S
3 #
4 # Basic setjmp/longjmp implementation
5 # This file was derived from the equivalent file in NetBSD
6 #
7
8 .text
9 .align 4
10 .type setjmp,@function
11 .globl setjmp
12 setjmp:
13 mflr %r11 /* save return address */
14 mfcr %r12 /* save condition register */
15 mr %r10,%r1 /* save stack pointer */
16 mr %r9,%r2 /* save GPR2 (not needed) */
17 stmw %r9,0(%r3) /* save r9..r31 */
18 li %r3,0 /* indicate success */
19 blr /* return */
20
21 .size setjmp,.-setjmp
22
23 .type longjmp,@function
24 .globl longjmp
25 longjmp:
26 lmw %r9,0(%r3) /* save r9..r31 */
27 mtlr %r11 /* restore LR */
28 mtcr %r12 /* restore CR */
29 mr %r2,%r9 /* restore GPR2 (not needed) */
30 mr %r1,%r10 /* restore stack */
31 mr %r3,%r4 /* get return value */
32 blr /* return */
33
34 .size longjmp,.-longjmp