1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
{
This file is part of the Free Pascal run time library.
Copyright (c) 2002 by Jonas Maebe and other members of the
Free Pascal development team
SetJmp and LongJmp implementation for exception handling
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
function fpc_setjmp(var S : jmp_buf) : longint;assembler;[Public, alias : 'FPC_SETJMP']; nostackframe; compilerproc;
asm
stw r1,0(r3)
mflr r0
stw r2,4(r3)
stw r14,12(r3)
{$ifndef FPUNONE}
stfd f14,88(r3)
{$endif}
stw r0,8(r3)
stw r15,16(r3)
{$ifndef FPUNONE}
stfd f15,96(r3)
{$endif}
mfcr r0
stw r16,20(r3)
{$ifndef FPUNONE}
stfd f16,104(r3)
{$endif}
stw r0,84(r3)
stw r17,24(r3)
{$ifndef FPUNONE}
stfd f17,112(r3)
{$endif}
stw r18,28(r3)
{$ifndef FPUNONE}
stfd f18,120(r3)
{$endif}
stw r19,32(r3)
{$ifndef FPUNONE}
stfd f19,128(r3)
{$endif}
stw r20,36(r3)
{$ifndef FPUNONE}
stfd f20,136(r3)
{$endif}
stw r21,40(r3)
{$ifndef FPUNONE}
stfd f21,144(r3)
{$endif}
stw r22,44(r3)
{$ifndef FPUNONE}
stfd f22,152(r3)
{$endif}
stw r23,48(r3)
{$ifndef FPUNONE}
stfd f23,160(r3)
{$endif}
stw r24,52(r3)
{$ifndef FPUNONE}
stfd f24,168(r3)
{$endif}
stw r25,56(r3)
{$ifndef FPUNONE}
stfd f25,176(r3)
{$endif}
stw r26,60(r3)
{$ifndef FPUNONE}
stfd f26,184(r3)
{$endif}
stw r27,64(r3)
{$ifndef FPUNONE}
stfd f27,192(r3)
{$endif}
stw r28,68(r3)
{$ifndef FPUNONE}
stfd f28,200(r3)
{$endif}
stw r29,72(r3)
{$ifndef FPUNONE}
stfd f29,208(r3)
{$endif}
stw r30,76(r3)
{$ifndef FPUNONE}
stfd f30,216(r3)
{$endif}
stw r31,80(r3)
{$ifndef FPUNONE}
stfd f31,224(r3)
{$endif}
li r3,0
end;
procedure fpc_longjmp(var S : jmp_buf;value : longint);assembler;[Public, alias : 'FPC_LONGJMP']; nostackframe; compilerproc;
asm
lwz r1,0(r3)
lwz r2,4(r3)
lwz r0,8(r3)
lwz r14,12(r3)
{$ifndef FPUNONE}
lfd f14,88(r3)
{$endif}
lwz r15,16(r3)
{$ifndef FPUNONE}
lfd f15,96(r3)
{$endif}
lwz r16,20(r3)
{$ifndef FPUNONE}
lfd f16,104(r3)
{$endif}
lwz r17,24(r3)
{$ifndef FPUNONE}
lfd f17,112(r3)
{$endif}
lwz r18,28(r3)
{$ifndef FPUNONE}
lfd f18,120(r3)
{$endif}
lwz r19,32(r3)
{$ifndef FPUNONE}
lfd f19,128(r3)
{$endif}
lwz r20,36(r3)
{$ifndef FPUNONE}
lfd f20,136(r3)
{$endif}
mtlr r0
lwz r21,40(r3)
{$ifndef FPUNONE}
lfd f21,144(r3)
{$endif}
lwz r22,44(r3)
{$ifndef FPUNONE}
lfd f22,152(r3)
{$endif}
lwz r0,84(r3)
lwz r23,48(r3)
{$ifndef FPUNONE}
lfd f23,160(r3)
{$endif}
lwz r24,52(r3)
{$ifndef FPUNONE}
lfd f24,168(r3)
{$endif}
lwz r25,56(r3)
{$ifndef FPUNONE}
lfd f25,176(r3)
{$endif}
mtcrf 0xff,r0
lwz r26,60(r3)
{$ifndef FPUNONE}
lfd f26,184(r3)
{$endif}
lwz r27,64(r3)
{$ifndef FPUNONE}
lfd f27,192(r3)
{$endif}
lwz r28,68(r3)
{$ifndef FPUNONE}
lfd f28,200(r3)
{$endif}
lwz r29,72(r3)
{$ifndef FPUNONE}
lfd f29,208(r3)
{$endif}
lwz r30,76(r3)
{$ifndef FPUNONE}
lfd f30,216(r3)
{$endif}
lwz r31,80(r3)
{$ifndef FPUNONE}
lfd f31,224(r3)
{$endif}
mr r3,r4
end;
|