1 /* This is a simple version of setjmp and longjmp for the PowerPC.
2 Ian Lance Taylor, Cygnus Support, 9 Feb 1994.
3 Modified by Jeff Johnston, Red Hat Inc. 2 Oct 2001. */
9 addi 3,3,15 # align Altivec to 16 byte boundary
12 addi 3,3,7 # align to 8 byte boundary
16 stwu 2,4(3) # offset 4
17 stwu 13,4(3) # offset 8
18 stwu 14,4(3) # offset 12
19 stwu 15,4(3) # offset 16
20 stwu 16,4(3) # offset 20
21 stwu 17,4(3) # offset 24
22 stwu 18,4(3) # offset 28
23 stwu 19,4(3) # offset 32
24 stwu 20,4(3) # offset 36
25 stwu 21,4(3) # offset 40
26 stwu 22,4(3) # offset 44
27 stwu 23,4(3) # offset 48
28 stwu 24,4(3) # offset 52
29 stwu 25,4(3) # offset 56
30 stwu 26,4(3) # offset 60
31 stwu 27,4(3) # offset 64
32 stwu 28,4(3) # offset 68
33 stwu 29,4(3) # offset 72
34 stwu 30,4(3) # offset 76
35 stwu 31,4(3) # offset 80
37 stwu 4,4(3) # offset 84
39 stwu 4,4(3) # offset 88
40 # one word pad to get floating point aligned on 8 byte boundary
42 stfdu 14,8(3) # offset 96
43 stfdu 15,8(3) # offset 104
44 stfdu 16,8(3) # offset 112
45 stfdu 17,8(3) # offset 120
46 stfdu 18,8(3) # offset 128
47 stfdu 19,8(3) # offset 136
48 stfdu 20,8(3) # offset 144
49 stfdu 21,8(3) # offset 152
50 stfdu 22,8(3) # offset 160
51 stfdu 23,8(3) # offset 168
52 stfdu 24,8(3) # offset 176
53 stfdu 25,8(3) # offset 184
54 stfdu 26,8(3) # offset 192
55 stfdu 27,8(3) # offset 200
56 stfdu 28,8(3) # offset 208
57 stfdu 29,8(3) # offset 216
58 stfdu 30,8(3) # offset 224
59 stfdu 31,8(3) # offset 232
62 /* This requires a total of 21 * 4 + 18 * 8 + 4 + 4 + 4
63 bytes == 60 * 4 bytes == 240 bytes. */
66 /* save Altivec vrsave and vr20-vr31 registers */
67 mfspr 4,256 # vrsave register
68 stwu 4,16(3) # offset 248
70 stvx 20,0,3 # offset 256
72 stvx 21,0,3 # offset 272
74 stvx 22,0,3 # offset 288
76 stvx 23,0,3 # offset 304
78 stvx 24,0,3 # offset 320
80 stvx 25,0,3 # offset 336
82 stvx 26,0,3 # offset 352
84 stvx 27,0,3 # offset 368
86 stvx 28,0,3 # offset 384
88 stvx 29,0,3 # offset 400
90 stvx 30,0,3 # offset 416
92 stvx 31,0,3 # offset 432
94 /* This requires a total of 240 + 8 + 8 + 12 * 16 == 448 bytes. */
103 addi 3,3,15 # align Altivec to 16 byte boundary
106 addi 3,3,7 # align to 8 byte boundary
109 lwz 1,0(3) # offset 0
110 lwzu 2,4(3) # offset 4
111 lwzu 13,4(3) # offset 8
112 lwzu 14,4(3) # offset 12
113 lwzu 15,4(3) # offset 16
114 lwzu 16,4(3) # offset 20
115 lwzu 17,4(3) # offset 24
116 lwzu 18,4(3) # offset 28
117 lwzu 19,4(3) # offset 32
118 lwzu 20,4(3) # offset 36
119 lwzu 21,4(3) # offset 40
120 lwzu 22,4(3) # offset 44
121 lwzu 23,4(3) # offset 48
122 lwzu 24,4(3) # offset 52
123 lwzu 25,4(3) # offset 56
124 lwzu 26,4(3) # offset 60
125 lwzu 27,4(3) # offset 64
126 lwzu 28,4(3) # offset 68
127 lwzu 29,4(3) # offset 72
128 lwzu 30,4(3) # offset 76
129 lwzu 31,4(3) # offset 80
130 lwzu 5,4(3) # offset 84
132 lwzu 5,4(3) # offset 88
134 # one word pad to get floating point aligned on 8 byte boundary
136 lfdu 14,8(3) # offset 96
137 lfdu 15,8(3) # offset 104
138 lfdu 16,8(3) # offset 112
139 lfdu 17,8(3) # offset 120
140 lfdu 18,8(3) # offset 128
141 lfdu 19,8(3) # offset 136
142 lfdu 20,8(3) # offset 144
143 lfdu 21,8(3) # offset 152
144 lfdu 22,8(3) # offset 160
145 lfdu 23,8(3) # offset 168
146 lfdu 24,8(3) # offset 176
147 lfdu 25,8(3) # offset 184
148 lfdu 26,8(3) # offset 192
149 lfdu 27,8(3) # offset 200
150 lfdu 28,8(3) # offset 208
151 lfdu 29,8(3) # offset 216
152 lfdu 30,8(3) # offset 224
153 lfdu 31,8(3) # offset 232
157 /* restore Altivec vrsave and v20-v31 registers */
158 lwzu 5,16(3) # offset 248
161 lvx 20,0,3 # offset 256
163 lvx 21,0,3 # offset 272
165 lvx 22,0,3 # offset 288
167 lvx 23,0,3 # offset 304
169 lvx 24,0,3 # offset 320
171 lvx 25,0,3 # offset 336
173 lvx 26,0,3 # offset 352
175 lvx 27,0,3 # offset 368
177 lvx 28,0,3 # offset 384
179 lvx 29,0,3 # offset 400
181 lvx 30,0,3 # offset 416
183 lvx 31,0,3 # offset 432