]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/bfin/__longjmp.S
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / bfin / __longjmp.S
1 /* longjmp for the Blackfin project
2  *
3  * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
4  * Copyright (C) 2004 Metrowerks
5  * Based on code from Analog Devices.
6  *
7  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8  */
9
10 .text
11 .global ___longjmp;
12 .type   ___longjmp,STT_FUNC;
13 .align 4;
14
15 ___longjmp:
16         P0 = R0;
17         R0 = [P0 + 0x00];
18         [--SP] = R0;            /* Put P0 on the stack */
19
20         P1 = [P0 + 0x04];
21         P2 = [P0 + 0x08];
22         P3 = [P0 + 0x0C];
23         P4 = [P0 + 0x10];
24         P5 = [P0 + 0x14];
25
26         FP = [P0 + 0x18];
27         R0 = [SP++];            /* Grab P0 from old stack */
28         SP = [P0 + 0x1C];       /* Update Stack Pointer */
29         [--SP] = R0;            /* Put P0 on new stack */
30         [--SP] = R1;            /* Put VAL arg on new stack */
31
32         R0 = [P0 + 0x20];       /* Data Registers */
33         R1 = [P0 + 0x24];
34         R2 = [P0 + 0x28];
35         R3 = [P0 + 0x2C];
36         R4 = [P0 + 0x30];
37         R5 = [P0 + 0x34];
38         R6 = [P0 + 0x38];
39         R7 = [P0 + 0x3C];
40
41         R0 = [P0 + 0x40];
42         ASTAT = R0;
43
44         R0 = [P0 + 0x44];       /* Loop Counters */
45         LC0 = R0;
46         R0 = [P0 + 0x48];
47         LC1 = R0;
48
49         R0 = [P0 + 0x4C];       /* Accumulators */
50         A0.W = R0;
51         R0 = [P0 + 0x50];
52         A0.X = R0;
53         R0 = [P0 + 0x54];
54         A1.W = R0;
55         R0 = [P0 + 0x58];
56         A1.X = R0;
57
58         R0 = [P0 + 0x5C];       /* Index Registers */
59         I0 = R0;
60         R0 = [P0 + 0x60];
61         I1 = R0;
62         R0 = [P0 + 0x64];
63         I2 = R0;
64         R0 = [P0 + 0x68];
65         I3 = R0;
66
67         R0 = [P0 + 0x6C];       /* Modifier Registers */
68         M0 = R0;
69         R0 = [P0 + 0x70];
70         M1 = R0;
71         R0 = [P0 + 0x74];
72         M2 = R0;
73         R0 = [P0 + 0x78];
74         M3 = R0;
75
76         R0 = [P0 + 0x7C];       /* Length Registers */
77         L0 = R0;
78         R0 = [P0 + 0x80];
79         L1 = R0;
80         R0 = [P0 + 0x84];
81         L2 = R0;
82         R0 = [P0 + 0x88];
83         L3 = R0;
84
85         R0 = [P0 + 0x8C];       /* Base Registers */
86         B0 = R0;
87         R0 = [P0 + 0x90];
88         B1 = R0;
89         R0 = [P0 + 0x94];
90         B2 = R0;
91         R0 = [P0 + 0x98];
92         B3 = R0;
93
94         R0 = [P0 + 0x9C];       /* Return Address (PC) */
95         RETS = R0;
96
97         R0 = [SP++];
98         P0 = [SP++];
99
100         CC = R0 == 0;
101         IF !CC JUMP .Lfinished;
102         R0 = 1;
103 .Lfinished:
104         RTS;
105 .size ___longjmp,.-___longjmp
106
107 libc_hidden_def(__longjmp)
108
109 .section .note.GNU-stack,"",%progbits