diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-08-24 12:38:42 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-08-24 12:38:42 +0000 |
commit | 46454ac2a8a7d693ac135f0d4a9461bbcf24eea9 (patch) | |
tree | 86488784b36537f382ccd448c6684d60f1540527 /lib/libsetjmp | |
parent | 20de4c55a2ddfa802a01cc353884d73a934bf7ba (diff) | |
download | rockbox-46454ac2a8a7d693ac135f0d4a9461bbcf24eea9.tar.gz rockbox-46454ac2a8a7d693ac135f0d4a9461bbcf24eea9.zip |
Move setjmp to lib and add setjmp for sh (imported from newlib) and compile it as separate library.
It's used by both, plugins and codecs, and sh/hwcodec doesn't compile codecs
so it doesn't fit into sources.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27869 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'lib/libsetjmp')
-rw-r--r-- | lib/libsetjmp/LICENSE | 830 | ||||
-rw-r--r-- | lib/libsetjmp/SOURCES | 19 | ||||
-rw-r--r-- | lib/libsetjmp/arm/setjmp.S | 174 | ||||
-rw-r--r-- | lib/libsetjmp/libsetjmp.make | 21 | ||||
-rw-r--r-- | lib/libsetjmp/m68k/setjmp.S | 79 | ||||
-rw-r--r-- | lib/libsetjmp/mips/setjmp.S | 101 | ||||
-rw-r--r-- | lib/libsetjmp/setjmp.h | 64 | ||||
-rw-r--r-- | lib/libsetjmp/sh/asm.h | 42 | ||||
-rw-r--r-- | lib/libsetjmp/sh/setjmp.S | 194 |
9 files changed, 1524 insertions, 0 deletions
diff --git a/lib/libsetjmp/LICENSE b/lib/libsetjmp/LICENSE new file mode 100644 index 0000000000..cf903b5062 --- /dev/null +++ b/lib/libsetjmp/LICENSE | |||
@@ -0,0 +1,830 @@ | |||
1 | The newlib subdirectory is a collection of software from several sources. | ||
2 | |||
3 | Each file may have its own copyright/license that is embedded in the source | ||
4 | file. Unless otherwise noted in the body of the source file(s), the following copyright | ||
5 | notices will apply to the contents of the newlib subdirectory: | ||
6 | |||
7 | (1) Red Hat Incorporated | ||
8 | |||
9 | Copyright (c) 1994-2009 Red Hat, Inc. All rights reserved. | ||
10 | |||
11 | This copyrighted material is made available to anyone wishing to use, | ||
12 | modify, copy, or redistribute it subject to the terms and conditions | ||
13 | of the BSD License. This program is distributed in the hope that | ||
14 | it will be useful, but WITHOUT ANY WARRANTY expressed or implied, | ||
15 | including the implied warranties of MERCHANTABILITY or FITNESS FOR | ||
16 | A PARTICULAR PURPOSE. A copy of this license is available at | ||
17 | http://www.opensource.org/licenses. Any Red Hat trademarks that are | ||
18 | incorporated in the source code or documentation are not subject to | ||
19 | the BSD License and may only be used or replicated with the express | ||
20 | permission of Red Hat, Inc. | ||
21 | |||
22 | (2) University of California, Berkeley | ||
23 | |||
24 | Copyright (c) 1981-2000 The Regents of the University of California. | ||
25 | All rights reserved. | ||
26 | |||
27 | Redistribution and use in source and binary forms, with or without modification, | ||
28 | are permitted provided that the following conditions are met: | ||
29 | |||
30 | * Redistributions of source code must retain the above copyright notice, | ||
31 | this list of conditions and the following disclaimer. | ||
32 | * Redistributions in binary form must reproduce the above copyright notice, | ||
33 | this list of conditions and the following disclaimer in the documentation | ||
34 | and/or other materials provided with the distribution. | ||
35 | * Neither the name of the University nor the names of its contributors | ||
36 | may be used to endorse or promote products derived from this software | ||
37 | without specific prior written permission. | ||
38 | |||
39 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
40 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
41 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
42 | IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | ||
43 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
45 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
46 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
47 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY | ||
48 | OF SUCH DAMAGE. | ||
49 | |||
50 | (3) David M. Gay (AT&T 1991, Lucent 1998) | ||
51 | |||
52 | The author of this software is David M. Gay. | ||
53 | |||
54 | Copyright (c) 1991 by AT&T. | ||
55 | |||
56 | Permission to use, copy, modify, and distribute this software for any | ||
57 | purpose without fee is hereby granted, provided that this entire notice | ||
58 | is included in all copies of any software which is or includes a copy | ||
59 | or modification of this software and in all copies of the supporting | ||
60 | documentation for such software. | ||
61 | |||
62 | THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED | ||
63 | WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY | ||
64 | REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY | ||
65 | OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. | ||
66 | |||
67 | ------------------------------------------------------------------- | ||
68 | |||
69 | The author of this software is David M. Gay. | ||
70 | |||
71 | Copyright (C) 1998-2001 by Lucent Technologies | ||
72 | All Rights Reserved | ||
73 | |||
74 | Permission to use, copy, modify, and distribute this software and | ||
75 | its documentation for any purpose and without fee is hereby | ||
76 | granted, provided that the above copyright notice appear in all | ||
77 | copies and that both that the copyright notice and this | ||
78 | permission notice and warranty disclaimer appear in supporting | ||
79 | documentation, and that the name of Lucent or any of its entities | ||
80 | not be used in advertising or publicity pertaining to | ||
81 | distribution of the software without specific, written prior | ||
82 | permission. | ||
83 | |||
84 | LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, | ||
85 | INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. | ||
86 | IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY | ||
87 | SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
88 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | ||
89 | IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | ||
90 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | ||
91 | THIS SOFTWARE. | ||
92 | |||
93 | |||
94 | (4) Advanced Micro Devices | ||
95 | |||
96 | Copyright 1989, 1990 Advanced Micro Devices, Inc. | ||
97 | |||
98 | This software is the property of Advanced Micro Devices, Inc (AMD) which | ||
99 | specifically grants the user the right to modify, use and distribute this | ||
100 | software provided this notice is not removed or altered. All other rights | ||
101 | are reserved by AMD. | ||
102 | |||
103 | AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS | ||
104 | SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL | ||
105 | DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR | ||
106 | USE OF THIS SOFTWARE. | ||
107 | |||
108 | So that all may benefit from your experience, please report any problems | ||
109 | or suggestions about this software to the 29K Technical Support Center at | ||
110 | 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or | ||
111 | 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118. | ||
112 | |||
113 | Advanced Micro Devices, Inc. | ||
114 | 29K Support Products | ||
115 | Mail Stop 573 | ||
116 | 5900 E. Ben White Blvd. | ||
117 | Austin, TX 78741 | ||
118 | 800-292-9263 | ||
119 | |||
120 | (5) C.W. Sandmann | ||
121 | |||
122 | Copyright (C) 1993 C.W. Sandmann | ||
123 | |||
124 | This file may be freely distributed as long as the author's name remains. | ||
125 | |||
126 | (6) Eric Backus | ||
127 | |||
128 | (C) Copyright 1992 Eric Backus | ||
129 | |||
130 | This software may be used freely so long as this copyright notice is | ||
131 | left intact. There is no warrantee on this software. | ||
132 | |||
133 | (7) Sun Microsystems | ||
134 | |||
135 | Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | ||
136 | |||
137 | Developed at SunPro, a Sun Microsystems, Inc. business. | ||
138 | Permission to use, copy, modify, and distribute this | ||
139 | software is freely granted, provided that this notice is preserved. | ||
140 | |||
141 | (8) Hewlett Packard | ||
142 | |||
143 | (c) Copyright 1986 HEWLETT-PACKARD COMPANY | ||
144 | |||
145 | To anyone who acknowledges that this file is provided "AS IS" | ||
146 | without any express or implied warranty: | ||
147 | permission to use, copy, modify, and distribute this file | ||
148 | for any purpose is hereby granted without fee, provided that | ||
149 | the above copyright notice and this notice appears in all | ||
150 | copies, and that the name of Hewlett-Packard Company not be | ||
151 | used in advertising or publicity pertaining to distribution | ||
152 | of the software without specific, written prior permission. | ||
153 | Hewlett-Packard Company makes no representations about the | ||
154 | suitability of this software for any purpose. | ||
155 | |||
156 | (9) Hans-Peter Nilsson | ||
157 | |||
158 | Copyright (C) 2001 Hans-Peter Nilsson | ||
159 | |||
160 | Permission to use, copy, modify, and distribute this software is | ||
161 | freely granted, provided that the above copyright notice, this notice | ||
162 | and the following disclaimer are preserved with no changes. | ||
163 | |||
164 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | ||
165 | IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | ||
166 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
167 | PURPOSE. | ||
168 | |||
169 | (10) Stephane Carrez (m68hc11-elf/m68hc12-elf targets only) | ||
170 | |||
171 | Copyright (C) 1999, 2000, 2001, 2002 Stephane Carrez (stcarrez@nerim.fr) | ||
172 | |||
173 | The authors hereby grant permission to use, copy, modify, distribute, | ||
174 | and license this software and its documentation for any purpose, provided | ||
175 | that existing copyright notices are retained in all copies and that this | ||
176 | notice is included verbatim in any distributions. No written agreement, | ||
177 | license, or royalty fee is required for any of the authorized uses. | ||
178 | Modifications to this software may be copyrighted by their authors | ||
179 | and need not follow the licensing terms described here, provided that | ||
180 | the new terms are clearly indicated on the first page of each file where | ||
181 | they apply. | ||
182 | |||
183 | (11) Christopher G. Demetriou | ||
184 | |||
185 | Copyright (c) 2001 Christopher G. Demetriou | ||
186 | All rights reserved. | ||
187 | |||
188 | Redistribution and use in source and binary forms, with or without | ||
189 | modification, are permitted provided that the following conditions | ||
190 | are met: | ||
191 | 1. Redistributions of source code must retain the above copyright | ||
192 | notice, this list of conditions and the following disclaimer. | ||
193 | 2. Redistributions in binary form must reproduce the above copyright | ||
194 | notice, this list of conditions and the following disclaimer in the | ||
195 | documentation and/or other materials provided with the distribution. | ||
196 | 3. The name of the author may not be used to endorse or promote products | ||
197 | derived from this software without specific prior written permission. | ||
198 | |||
199 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
200 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
201 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
202 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
203 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
204 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
205 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
206 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
207 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
208 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
209 | |||
210 | (12) SuperH, Inc. | ||
211 | |||
212 | Copyright 2002 SuperH, Inc. All rights reserved | ||
213 | |||
214 | This software is the property of SuperH, Inc (SuperH) which specifically | ||
215 | grants the user the right to modify, use and distribute this software | ||
216 | provided this notice is not removed or altered. All other rights are | ||
217 | reserved by SuperH. | ||
218 | |||
219 | SUPERH MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO | ||
220 | THIS SOFTWARE. IN NO EVENT SHALL SUPERH BE LIABLE FOR INDIRECT, SPECIAL, | ||
221 | INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH OR ARISING FROM | ||
222 | THE FURNISHING, PERFORMANCE, OR USE OF THIS SOFTWARE. | ||
223 | |||
224 | So that all may benefit from your experience, please report any problems | ||
225 | or suggestions about this software to the SuperH Support Center via | ||
226 | e-mail at softwaresupport@superh.com . | ||
227 | |||
228 | SuperH, Inc. | ||
229 | 405 River Oaks Parkway | ||
230 | San Jose | ||
231 | CA 95134 | ||
232 | USA | ||
233 | |||
234 | (13) Royal Institute of Technology | ||
235 | |||
236 | Copyright (c) 1999 Kungliga Tekniska Högskolan | ||
237 | (Royal Institute of Technology, Stockholm, Sweden). | ||
238 | All rights reserved. | ||
239 | |||
240 | Redistribution and use in source and binary forms, with or without | ||
241 | modification, are permitted provided that the following conditions | ||
242 | are met: | ||
243 | |||
244 | 1. Redistributions of source code must retain the above copyright | ||
245 | notice, this list of conditions and the following disclaimer. | ||
246 | |||
247 | 2. Redistributions in binary form must reproduce the above copyright | ||
248 | notice, this list of conditions and the following disclaimer in the | ||
249 | documentation and/or other materials provided with the distribution. | ||
250 | |||
251 | 3. Neither the name of KTH nor the names of its contributors may be | ||
252 | used to endorse or promote products derived from this software without | ||
253 | specific prior written permission. | ||
254 | |||
255 | THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY | ||
256 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
257 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
258 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE | ||
259 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
260 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
261 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
262 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
263 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
264 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
265 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
266 | |||
267 | (14) Alexey Zelkin | ||
268 | |||
269 | Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org> | ||
270 | All rights reserved. | ||
271 | |||
272 | Redistribution and use in source and binary forms, with or without | ||
273 | modification, are permitted provided that the following conditions | ||
274 | are met: | ||
275 | 1. Redistributions of source code must retain the above copyright | ||
276 | notice, this list of conditions and the following disclaimer. | ||
277 | 2. Redistributions in binary form must reproduce the above copyright | ||
278 | notice, this list of conditions and the following disclaimer in the | ||
279 | documentation and/or other materials provided with the distribution. | ||
280 | |||
281 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
282 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
283 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
284 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
285 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
286 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
287 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
288 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
289 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
290 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
291 | SUCH DAMAGE. | ||
292 | |||
293 | (15) Andrey A. Chernov | ||
294 | |||
295 | Copyright (C) 1997 by Andrey A. Chernov, Moscow, Russia. | ||
296 | All rights reserved. | ||
297 | |||
298 | Redistribution and use in source and binary forms, with or without | ||
299 | modification, are permitted provided that the following conditions | ||
300 | are met: | ||
301 | 1. Redistributions of source code must retain the above copyright | ||
302 | notice, this list of conditions and the following disclaimer. | ||
303 | 2. Redistributions in binary form must reproduce the above copyright | ||
304 | notice, this list of conditions and the following disclaimer in the | ||
305 | documentation and/or other materials provided with the distribution. | ||
306 | |||
307 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND | ||
308 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
309 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
310 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
311 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
312 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
313 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
314 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
315 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
316 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
317 | SUCH DAMAGE. | ||
318 | |||
319 | (16) FreeBSD | ||
320 | |||
321 | Copyright (c) 1997-2002 FreeBSD Project. | ||
322 | All rights reserved. | ||
323 | |||
324 | Redistribution and use in source and binary forms, with or without | ||
325 | modification, are permitted provided that the following conditions | ||
326 | are met: | ||
327 | 1. Redistributions of source code must retain the above copyright | ||
328 | notice, this list of conditions and the following disclaimer. | ||
329 | 2. Redistributions in binary form must reproduce the above copyright | ||
330 | notice, this list of conditions and the following disclaimer in the | ||
331 | documentation and/or other materials provided with the distribution. | ||
332 | |||
333 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
334 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
335 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
336 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
337 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
338 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
339 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
340 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
341 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
342 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
343 | SUCH DAMAGE. | ||
344 | |||
345 | (17) S. L. Moshier | ||
346 | |||
347 | Author: S. L. Moshier. | ||
348 | |||
349 | Copyright (c) 1984,2000 S.L. Moshier | ||
350 | |||
351 | Permission to use, copy, modify, and distribute this software for any | ||
352 | purpose without fee is hereby granted, provided that this entire notice | ||
353 | is included in all copies of any software which is or includes a copy | ||
354 | or modification of this software and in all copies of the supporting | ||
355 | documentation for such software. | ||
356 | |||
357 | THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED | ||
358 | WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION | ||
359 | OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS | ||
360 | SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. | ||
361 | |||
362 | (18) Citrus Project | ||
363 | |||
364 | Copyright (c)1999 Citrus Project, | ||
365 | All rights reserved. | ||
366 | |||
367 | Redistribution and use in source and binary forms, with or without | ||
368 | modification, are permitted provided that the following conditions | ||
369 | are met: | ||
370 | 1. Redistributions of source code must retain the above copyright | ||
371 | notice, this list of conditions and the following disclaimer. | ||
372 | 2. Redistributions in binary form must reproduce the above copyright | ||
373 | notice, this list of conditions and the following disclaimer in the | ||
374 | documentation and/or other materials provided with the distribution. | ||
375 | |||
376 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
377 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
378 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
379 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
380 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
381 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
382 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
383 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
384 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
385 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
386 | SUCH DAMAGE. | ||
387 | |||
388 | (19) Todd C. Miller | ||
389 | |||
390 | Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> | ||
391 | All rights reserved. | ||
392 | |||
393 | Redistribution and use in source and binary forms, with or without | ||
394 | modification, are permitted provided that the following conditions | ||
395 | are met: | ||
396 | 1. Redistributions of source code must retain the above copyright | ||
397 | notice, this list of conditions and the following disclaimer. | ||
398 | 2. Redistributions in binary form must reproduce the above copyright | ||
399 | notice, this list of conditions and the following disclaimer in the | ||
400 | documentation and/or other materials provided with the distribution. | ||
401 | 3. The name of the author may not be used to endorse or promote products | ||
402 | derived from this software without specific prior written permission. | ||
403 | |||
404 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
405 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | ||
406 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL | ||
407 | THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
408 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
409 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
410 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
411 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
412 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
413 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
414 | |||
415 | (20) DJ Delorie (i386) | ||
416 | Copyright (C) 1991 DJ Delorie | ||
417 | All rights reserved. | ||
418 | |||
419 | Redistribution and use in source and binary forms is permitted | ||
420 | provided that the above copyright notice and following paragraph are | ||
421 | duplicated in all such forms. | ||
422 | |||
423 | This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||
424 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
425 | |||
426 | (21) Free Software Foundation LGPL License (*-linux* targets only) | ||
427 | |||
428 | Copyright (C) 1990-1999, 2000, 2001 Free Software Foundation, Inc. | ||
429 | This file is part of the GNU C Library. | ||
430 | Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997. | ||
431 | |||
432 | The GNU C Library is free software; you can redistribute it and/or | ||
433 | modify it under the terms of the GNU Lesser General Public | ||
434 | License as published by the Free Software Foundation; either | ||
435 | version 2.1 of the License, or (at your option) any later version. | ||
436 | |||
437 | The GNU C Library is distributed in the hope that it will be useful, | ||
438 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
439 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
440 | Lesser General Public License for more details. | ||
441 | |||
442 | You should have received a copy of the GNU Lesser General Public | ||
443 | License along with the GNU C Library; if not, write to the Free | ||
444 | Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
445 | 02110-1301 USA. | ||
446 | |||
447 | (22) Xavier Leroy LGPL License (i[3456]86-*-linux* targets only) | ||
448 | |||
449 | Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) | ||
450 | |||
451 | This program is free software; you can redistribute it and/or | ||
452 | modify it under the terms of the GNU Library General Public License | ||
453 | as published by the Free Software Foundation; either version 2 | ||
454 | of the License, or (at your option) any later version. | ||
455 | |||
456 | This program is distributed in the hope that it will be useful, | ||
457 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
458 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
459 | GNU Library General Public License for more details. | ||
460 | |||
461 | (23) Intel (i960) | ||
462 | |||
463 | Copyright (c) 1993 Intel Corporation | ||
464 | |||
465 | Intel hereby grants you permission to copy, modify, and distribute this | ||
466 | software and its documentation. Intel grants this permission provided | ||
467 | that the above copyright notice appears in all copies and that both the | ||
468 | copyright notice and this permission notice appear in supporting | ||
469 | documentation. In addition, Intel grants this permission provided that | ||
470 | you prominently mark as "not part of the original" any modifications | ||
471 | made to this software or documentation, and that the name of Intel | ||
472 | Corporation not be used in advertising or publicity pertaining to | ||
473 | distribution of the software or the documentation without specific, | ||
474 | written prior permission. | ||
475 | |||
476 | Intel Corporation provides this AS IS, WITHOUT ANY WARRANTY, EXPRESS OR | ||
477 | IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY | ||
478 | OR FITNESS FOR A PARTICULAR PURPOSE. Intel makes no guarantee or | ||
479 | representations regarding the use of, or the results of the use of, | ||
480 | the software and documentation in terms of correctness, accuracy, | ||
481 | reliability, currentness, or otherwise; and you rely on the software, | ||
482 | documentation and results solely at your own risk. | ||
483 | |||
484 | IN NO EVENT SHALL INTEL BE LIABLE FOR ANY LOSS OF USE, LOSS OF BUSINESS, | ||
485 | LOSS OF PROFITS, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES | ||
486 | OF ANY KIND. IN NO EVENT SHALL INTEL'S TOTAL LIABILITY EXCEED THE SUM | ||
487 | PAID TO INTEL FOR THE PRODUCT LICENSED HEREUNDER. | ||
488 | |||
489 | (24) Hewlett-Packard (hppa targets only) | ||
490 | |||
491 | (c) Copyright 1986 HEWLETT-PACKARD COMPANY | ||
492 | |||
493 | To anyone who acknowledges that this file is provided "AS IS" | ||
494 | without any express or implied warranty: | ||
495 | permission to use, copy, modify, and distribute this file | ||
496 | for any purpose is hereby granted without fee, provided that | ||
497 | the above copyright notice and this notice appears in all | ||
498 | copies, and that the name of Hewlett-Packard Company not be | ||
499 | used in advertising or publicity pertaining to distribution | ||
500 | of the software without specific, written prior permission. | ||
501 | Hewlett-Packard Company makes no representations about the | ||
502 | suitability of this software for any purpose. | ||
503 | |||
504 | (25) Henry Spencer (only *-linux targets) | ||
505 | |||
506 | Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved. | ||
507 | This software is not subject to any license of the American Telephone | ||
508 | and Telegraph Company or of the Regents of the University of California. | ||
509 | |||
510 | Permission is granted to anyone to use this software for any purpose on | ||
511 | any computer system, and to alter it and redistribute it, subject | ||
512 | to the following restrictions: | ||
513 | |||
514 | 1. The author is not responsible for the consequences of use of this | ||
515 | software, no matter how awful, even if they arise from flaws in it. | ||
516 | |||
517 | 2. The origin of this software must not be misrepresented, either by | ||
518 | explicit claim or by omission. Since few users ever read sources, | ||
519 | credits must appear in the documentation. | ||
520 | |||
521 | 3. Altered versions must be plainly marked as such, and must not be | ||
522 | misrepresented as being the original software. Since few users | ||
523 | ever read sources, credits must appear in the documentation. | ||
524 | |||
525 | 4. This notice may not be removed or altered. | ||
526 | |||
527 | (26) Mike Barcroft | ||
528 | |||
529 | Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> | ||
530 | All rights reserved. | ||
531 | |||
532 | Redistribution and use in source and binary forms, with or without | ||
533 | modification, are permitted provided that the following conditions | ||
534 | are met: | ||
535 | 1. Redistributions of source code must retain the above copyright | ||
536 | notice, this list of conditions and the following disclaimer. | ||
537 | 2. Redistributions in binary form must reproduce the above copyright | ||
538 | notice, this list of conditions and the following disclaimer in the | ||
539 | documentation and/or other materials provided with the distribution. | ||
540 | |||
541 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
542 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
543 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
544 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
545 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
546 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
547 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
548 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
549 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
550 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
551 | SUCH DAMAGE. | ||
552 | |||
553 | (27) Konstantin Chuguev (--enable-newlib-iconv) | ||
554 | |||
555 | Copyright (c) 1999, 2000 | ||
556 | Konstantin Chuguev. All rights reserved. | ||
557 | |||
558 | Redistribution and use in source and binary forms, with or without | ||
559 | modification, are permitted provided that the following conditions | ||
560 | are met: | ||
561 | 1. Redistributions of source code must retain the above copyright | ||
562 | notice, this list of conditions and the following disclaimer. | ||
563 | 2. Redistributions in binary form must reproduce the above copyright | ||
564 | notice, this list of conditions and the following disclaimer in the | ||
565 | documentation and/or other materials provided with the distribution. | ||
566 | |||
567 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
568 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
569 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
570 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
571 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
572 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
573 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
574 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
575 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
576 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
577 | SUCH DAMAGE. | ||
578 | |||
579 | iconv (Charset Conversion Library) v2.0 | ||
580 | |||
581 | (28) Artem Bityuckiy (--enable-newlib-iconv) | ||
582 | |||
583 | Copyright (c) 2003, Artem B. Bityuckiy, SoftMine Corporation. | ||
584 | Rights transferred to Franklin Electronic Publishers. | ||
585 | |||
586 | Redistribution and use in source and binary forms, with or without | ||
587 | modification, are permitted provided that the following conditions | ||
588 | are met: | ||
589 | 1. Redistributions of source code must retain the above copyright | ||
590 | notice, this list of conditions and the following disclaimer. | ||
591 | 2. Redistributions in binary form must reproduce the above copyright | ||
592 | notice, this list of conditions and the following disclaimer in the | ||
593 | documentation and/or other materials provided with the distribution. | ||
594 | |||
595 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
596 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
597 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
598 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
599 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
600 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
601 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
602 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
603 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
604 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
605 | SUCH DAMAGE. | ||
606 | |||
607 | (29) IBM, Sony, Toshiba (only spu-* targets) | ||
608 | |||
609 | (C) Copyright 2001,2006, | ||
610 | International Business Machines Corporation, | ||
611 | Sony Computer Entertainment, Incorporated, | ||
612 | Toshiba Corporation, | ||
613 | |||
614 | All rights reserved. | ||
615 | |||
616 | Redistribution and use in source and binary forms, with or without | ||
617 | modification, are permitted provided that the following conditions are met: | ||
618 | |||
619 | * Redistributions of source code must retain the above copyright notice, | ||
620 | this list of conditions and the following disclaimer. | ||
621 | * Redistributions in binary form must reproduce the above copyright | ||
622 | notice, this list of conditions and the following disclaimer in the | ||
623 | documentation and/or other materials provided with the distribution. | ||
624 | * Neither the names of the copyright holders nor the names of their | ||
625 | contributors may be used to endorse or promote products derived from this | ||
626 | software without specific prior written permission. | ||
627 | |||
628 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
629 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
630 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
631 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
632 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
633 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
634 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
635 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
636 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
637 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
638 | POSSIBILITY OF SUCH DAMAGE. | ||
639 | |||
640 | (30) - Alex Tatmanjants (targets using libc/posix) | ||
641 | |||
642 | Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua> | ||
643 | at Electronni Visti IA, Kiev, Ukraine. | ||
644 | All rights reserved. | ||
645 | |||
646 | Redistribution and use in source and binary forms, with or without | ||
647 | modification, are permitted provided that the following conditions | ||
648 | are met: | ||
649 | 1. Redistributions of source code must retain the above copyright | ||
650 | notice, this list of conditions and the following disclaimer. | ||
651 | 2. Redistributions in binary form must reproduce the above copyright | ||
652 | notice, this list of conditions and the following disclaimer in the | ||
653 | documentation and/or other materials provided with the distribution. | ||
654 | |||
655 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND | ||
656 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
657 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
658 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE | ||
659 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
660 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
661 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
662 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
663 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
664 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
665 | SUCH DAMAGE. | ||
666 | |||
667 | (31) - M. Warner Losh (targets using libc/posix) | ||
668 | |||
669 | Copyright (c) 1998, M. Warner Losh <imp@freebsd.org> | ||
670 | All rights reserved. | ||
671 | |||
672 | Redistribution and use in source and binary forms, with or without | ||
673 | modification, are permitted provided that the following conditions | ||
674 | are met: | ||
675 | 1. Redistributions of source code must retain the above copyright | ||
676 | notice, this list of conditions and the following disclaimer. | ||
677 | 2. Redistributions in binary form must reproduce the above copyright | ||
678 | notice, this list of conditions and the following disclaimer in the | ||
679 | documentation and/or other materials provided with the distribution. | ||
680 | |||
681 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
682 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
683 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
684 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
685 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
686 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
687 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
688 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
689 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
690 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
691 | SUCH DAMAGE. | ||
692 | |||
693 | (32) - Andrey A. Chernov (targets using libc/posix) | ||
694 | |||
695 | Copyright (C) 1996 by Andrey A. Chernov, Moscow, Russia. | ||
696 | All rights reserved. | ||
697 | |||
698 | Redistribution and use in source and binary forms, with or without | ||
699 | modification, are permitted provided that the following conditions | ||
700 | are met: | ||
701 | 1. Redistributions of source code must retain the above copyright | ||
702 | notice, this list of conditions and the following disclaimer. | ||
703 | 2. Redistributions in binary form must reproduce the above copyright | ||
704 | notice, this list of conditions and the following disclaimer in the | ||
705 | documentation and/or other materials provided with the distribution. | ||
706 | |||
707 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND | ||
708 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
709 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
710 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
711 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
712 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
713 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
714 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
715 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
716 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
717 | SUCH DAMAGE. | ||
718 | |||
719 | (33) - Daniel Eischen (targets using libc/posix) | ||
720 | |||
721 | Copyright (c) 2001 Daniel Eischen <deischen@FreeBSD.org>. | ||
722 | All rights reserved. | ||
723 | |||
724 | Redistribution and use in source and binary forms, with or without | ||
725 | modification, are permitted provided that the following conditions | ||
726 | are met: | ||
727 | 1. Redistributions of source code must retain the above copyright | ||
728 | notice, this list of conditions and the following disclaimer. | ||
729 | 2. Redistributions in binary form must reproduce the above copyright | ||
730 | notice, this list of conditions and the following disclaimer in the | ||
731 | documentation and/or other materials provided with the distribution. | ||
732 | |||
733 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
734 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
735 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
736 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
737 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
738 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
739 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
740 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
741 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
742 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
743 | SUCH DAMAGE. | ||
744 | |||
745 | |||
746 | (34) - Jon Beniston (only lm32-* targets) | ||
747 | |||
748 | Contributed by Jon Beniston <jon@beniston.com> | ||
749 | |||
750 | Redistribution and use in source and binary forms, with or without | ||
751 | modification, are permitted provided that the following conditions | ||
752 | are met: | ||
753 | 1. Redistributions of source code must retain the above copyright | ||
754 | notice, this list of conditions and the following disclaimer. | ||
755 | 2. Redistributions in binary form must reproduce the above copyright | ||
756 | notice, this list of conditions and the following disclaimer in the | ||
757 | documentation and/or other materials provided with the distribution. | ||
758 | |||
759 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
760 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
761 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
762 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
763 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
764 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
765 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
766 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
767 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
768 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
769 | SUCH DAMAGE. | ||
770 | |||
771 | |||
772 | (35) - ARM Ltd (arm and thumb variant targets only) | ||
773 | |||
774 | Copyright (c) 2009 ARM Ltd | ||
775 | All rights reserved. | ||
776 | |||
777 | Redistribution and use in source and binary forms, with or without | ||
778 | modification, are permitted provided that the following conditions | ||
779 | are met: | ||
780 | 1. Redistributions of source code must retain the above copyright | ||
781 | notice, this list of conditions and the following disclaimer. | ||
782 | 2. Redistributions in binary form must reproduce the above copyright | ||
783 | notice, this list of conditions and the following disclaimer in the | ||
784 | documentation and/or other materials provided with the distribution. | ||
785 | 3. The name of the company may not be used to endorse or promote | ||
786 | products derived from this software without specific prior written | ||
787 | permission. | ||
788 | |||
789 | THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
790 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
791 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
792 | IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
793 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
794 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
795 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
796 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
797 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
798 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
799 | |||
800 | (36) - Xilinx, Inc. (micrroblaze-* and powerpc-* targets) | ||
801 | |||
802 | Copyright (c) 2004, 2009 Xilinx, Inc. All rights reserved. | ||
803 | |||
804 | Redistribution and use in source and binary forms, with or without | ||
805 | modification, are permitted provided that the following conditions are | ||
806 | met: | ||
807 | |||
808 | 1. Redistributions source code must retain the above copyright notice, | ||
809 | this list of conditions and the following disclaimer. | ||
810 | |||
811 | 2. Redistributions in binary form must reproduce the above copyright | ||
812 | notice, this list of conditions and the following disclaimer in the | ||
813 | documentation and/or other materials provided with the distribution. | ||
814 | |||
815 | 3. Neither the name of Xilinx nor the names of its contributors may be | ||
816 | used to endorse or promote products derived from this software without | ||
817 | specific prior written permission. | ||
818 | |||
819 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS | ||
820 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||
821 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
822 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
823 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
824 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
825 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
826 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
827 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
828 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
829 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
830 | |||
diff --git a/lib/libsetjmp/SOURCES b/lib/libsetjmp/SOURCES new file mode 100644 index 0000000000..aa0ac46a23 --- /dev/null +++ b/lib/libsetjmp/SOURCES | |||
@@ -0,0 +1,19 @@ | |||
1 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | ||
2 | |||
3 | #ifdef CPU_ARM | ||
4 | arm/setjmp.S | ||
5 | #endif | ||
6 | |||
7 | #ifdef CPU_COLDFIRE | ||
8 | m68k/setjmp.S | ||
9 | #endif | ||
10 | |||
11 | #ifdef CPU_SH | ||
12 | sh/setjmp.S | ||
13 | #endif | ||
14 | |||
15 | #ifdef CPU_MIPS | ||
16 | mips/setjmp.S | ||
17 | #endif | ||
18 | |||
19 | #endif | ||
diff --git a/lib/libsetjmp/arm/setjmp.S b/lib/libsetjmp/arm/setjmp.S new file mode 100644 index 0000000000..ee5ebd9169 --- /dev/null +++ b/lib/libsetjmp/arm/setjmp.S | |||
@@ -0,0 +1,174 @@ | |||
1 | /* This is a simple version of setjmp and longjmp. | ||
2 | |||
3 | Nick Clifton, Cygnus Solutions, 13 June 1997. */ | ||
4 | |||
5 | /* ANSI concatenation macros. */ | ||
6 | #define CONCAT(a, b) CONCAT2(a, b) | ||
7 | #define CONCAT2(a, b) a##b | ||
8 | |||
9 | #ifndef __USER_LABEL_PREFIX__ | ||
10 | #error __USER_LABEL_PREFIX__ not defined | ||
11 | #endif | ||
12 | |||
13 | #define SYM(x) CONCAT (__USER_LABEL_PREFIX__, x) | ||
14 | |||
15 | #ifdef __ELF__ | ||
16 | #define TYPE(x) .type SYM(x),function | ||
17 | #define SIZE(x) .size SYM(x), . - SYM(x) | ||
18 | #else | ||
19 | #define TYPE(x) | ||
20 | #define SIZE(x) | ||
21 | #endif | ||
22 | |||
23 | /* Arm/Thumb interworking support: | ||
24 | |||
25 | The interworking scheme expects functions to use a BX instruction | ||
26 | to return control to their parent. Since we need this code to work | ||
27 | in both interworked and non-interworked environments as well as with | ||
28 | older processors which do not have the BX instruction we do the | ||
29 | following: | ||
30 | Test the return address. | ||
31 | If the bottom bit is clear perform an "old style" function exit. | ||
32 | (We know that we are in ARM mode and returning to an ARM mode caller). | ||
33 | Otherwise use the BX instruction to perform the function exit. | ||
34 | |||
35 | We know that we will never attempt to perform the BX instruction on | ||
36 | an older processor, because that kind of processor will never be | ||
37 | interworked, and a return address with the bottom bit set will never | ||
38 | be generated. | ||
39 | |||
40 | In addition, we do not actually assemble the BX instruction as this would | ||
41 | require us to tell the assembler that the processor is an ARM7TDMI and | ||
42 | it would store this information in the binary. We want this binary to be | ||
43 | able to be linked with binaries compiled for older processors however, so | ||
44 | we do not want such information stored there. | ||
45 | |||
46 | If we are running using the APCS-26 convention however, then we never | ||
47 | test the bottom bit, because this is part of the processor status. | ||
48 | Instead we just do a normal return, since we know that we cannot be | ||
49 | returning to a Thumb caller - the Thumb does not support APCS-26. | ||
50 | |||
51 | Function entry is much simpler. If we are compiling for the Thumb we | ||
52 | just switch into ARM mode and then drop through into the rest of the | ||
53 | function. The function exit code will take care of the restore to | ||
54 | Thumb mode. | ||
55 | |||
56 | For Thumb-2 do everything in Thumb mode. */ | ||
57 | |||
58 | #ifdef __APCS_26__ | ||
59 | #define RET movs pc, lr | ||
60 | #elif defined(__thumb2__) | ||
61 | #define RET bx lr | ||
62 | #elif !defined(ROCKBOX_SUPPORTS_AN_ARMV4_NON_T_CPU) | ||
63 | #define RET bx lr /* BX exists on v4T, v5 and more recent architectures */ | ||
64 | #else | ||
65 | #define RET tst lr, #1; \ | ||
66 | moveq pc, lr ; \ | ||
67 | .word 0xe12fff1e /* bx lr */ | ||
68 | #endif | ||
69 | |||
70 | #ifdef __thumb2__ | ||
71 | .macro COND where when | ||
72 | i\where \when | ||
73 | .endm | ||
74 | #else | ||
75 | .macro COND where when | ||
76 | .endm | ||
77 | #endif | ||
78 | |||
79 | #if defined(__thumb2__) | ||
80 | .syntax unified | ||
81 | .macro MODE | ||
82 | .thumb | ||
83 | .thumb_func | ||
84 | .endm | ||
85 | .macro PROLOGUE name | ||
86 | .endm | ||
87 | |||
88 | #elif defined(__thumb__) | ||
89 | #define MODE .thumb_func | ||
90 | .macro PROLOGUE name | ||
91 | .code 16 | ||
92 | bx pc | ||
93 | nop | ||
94 | .code 32 | ||
95 | SYM (.arm_start_of.\name): | ||
96 | .endm | ||
97 | #else /* Arm */ | ||
98 | #define MODE .code 32 | ||
99 | .macro PROLOGUE name | ||
100 | .endm | ||
101 | #endif | ||
102 | |||
103 | .macro FUNC_START name | ||
104 | .text | ||
105 | .align 2 | ||
106 | MODE | ||
107 | .globl SYM (\name) | ||
108 | TYPE (\name) | ||
109 | SYM (\name): | ||
110 | PROLOGUE \name | ||
111 | .endm | ||
112 | |||
113 | .macro FUNC_END name | ||
114 | RET | ||
115 | SIZE (\name) | ||
116 | .endm | ||
117 | |||
118 | /* -------------------------------------------------------------------- | ||
119 | int setjmp (jmp_buf); | ||
120 | -------------------------------------------------------------------- */ | ||
121 | |||
122 | FUNC_START setjmp | ||
123 | |||
124 | /* Save all the callee-preserved registers into the jump buffer. */ | ||
125 | #ifdef __thumb2__ | ||
126 | stmea a1!, { v1-v7, fp, ip, lr } | ||
127 | str sp, [a1],#+4 | ||
128 | #else | ||
129 | stmea a1!, { v1-v7, fp, ip, sp, lr } | ||
130 | #endif | ||
131 | |||
132 | #if 0 /* Simulator does not cope with FP instructions yet. */ | ||
133 | #ifndef __SOFTFP__ | ||
134 | /* Save the floating point registers. */ | ||
135 | sfmea f4, 4, [a1] | ||
136 | #endif | ||
137 | #endif | ||
138 | /* When setting up the jump buffer return 0. */ | ||
139 | mov a1, #0 | ||
140 | |||
141 | FUNC_END setjmp | ||
142 | |||
143 | /* -------------------------------------------------------------------- | ||
144 | volatile void longjmp (jmp_buf, int); | ||
145 | -------------------------------------------------------------------- */ | ||
146 | |||
147 | FUNC_START longjmp | ||
148 | |||
149 | /* If we have stack extension code it ought to be handled here. */ | ||
150 | |||
151 | /* Restore the registers, retrieving the state when setjmp() was called. */ | ||
152 | #ifdef __thumb2__ | ||
153 | ldmfd a1!, { v1-v7, fp, ip, lr } | ||
154 | ldr sp, [a1],#+4 | ||
155 | #else | ||
156 | ldmfd a1!, { v1-v7, fp, ip, sp, lr } | ||
157 | #endif | ||
158 | |||
159 | #if 0 /* Simulator does not cope with FP instructions yet. */ | ||
160 | #ifndef __SOFTFP__ | ||
161 | /* Restore floating point registers as well. */ | ||
162 | lfmfd f4, 4, [a1] | ||
163 | #endif | ||
164 | #endif | ||
165 | /* Put the return value into the integer result register. | ||
166 | But if it is zero then return 1 instead. */ | ||
167 | movs a1, a2 | ||
168 | #ifdef __thumb2__ | ||
169 | it eq | ||
170 | #endif | ||
171 | moveq a1, #1 | ||
172 | |||
173 | FUNC_END longjmp | ||
174 | |||
diff --git a/lib/libsetjmp/libsetjmp.make b/lib/libsetjmp/libsetjmp.make new file mode 100644 index 0000000000..b7d4cad25f --- /dev/null +++ b/lib/libsetjmp/libsetjmp.make | |||
@@ -0,0 +1,21 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # | ||
8 | |||
9 | SETJMP_DIR = $(ROOTDIR)/lib/libsetjmp | ||
10 | SETJMP_SRC = $(call preprocess, $(SETJMP_DIR)/SOURCES) | ||
11 | SETJMP_OBJ := $(call c2obj, $(SETJMP_SRC)) | ||
12 | |||
13 | OTHER_SRC += $(SETJMP_SRC) | ||
14 | |||
15 | LIBSETJMP = $(BUILDDIR)/lib/libsetjmp.a | ||
16 | |||
17 | INCLUDES += -I$(SETJMP_DIR) | ||
18 | |||
19 | $(LIBSETJMP): $(SETJMP_OBJ) | ||
20 | $(SILENT)$(shell rm -f $@) | ||
21 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null | ||
diff --git a/lib/libsetjmp/m68k/setjmp.S b/lib/libsetjmp/m68k/setjmp.S new file mode 100644 index 0000000000..86eda8079c --- /dev/null +++ b/lib/libsetjmp/m68k/setjmp.S | |||
@@ -0,0 +1,79 @@ | |||
1 | /* ANSI concatenation macros. */ | ||
2 | |||
3 | #define CONCAT1(a, b) CONCAT2(a, b) | ||
4 | #define CONCAT2(a, b) a ## b | ||
5 | |||
6 | /* Use the right prefix for global labels. */ | ||
7 | |||
8 | #define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) | ||
9 | |||
10 | /* Use the right prefix for registers. */ | ||
11 | |||
12 | #define REG(x) CONCAT1 (__REGISTER_PREFIX__, x) | ||
13 | |||
14 | #define d0 REG (d0) | ||
15 | #define d1 REG (d1) | ||
16 | #define d2 REG (d2) | ||
17 | #define d3 REG (d3) | ||
18 | #define d4 REG (d4) | ||
19 | #define d5 REG (d5) | ||
20 | #define d6 REG (d6) | ||
21 | #define d7 REG (d7) | ||
22 | #define a0 REG (a0) | ||
23 | #define a1 REG (a1) | ||
24 | #define a2 REG (a2) | ||
25 | #define a3 REG (a3) | ||
26 | #define a4 REG (a4) | ||
27 | #define a5 REG (a5) | ||
28 | #define a6 REG (a6) | ||
29 | #define fp REG (fp) | ||
30 | #define sp REG (sp) | ||
31 | |||
32 | |||
33 | .global SYM (setjmp) | ||
34 | .global SYM (longjmp) | ||
35 | |||
36 | SYM (setjmp): | ||
37 | moveal sp@(4),a0 | ||
38 | movel sp@(0),a0@(12) | ||
39 | movel sp,a0@(8) | ||
40 | moveml d2-d7/a2-a6,a0@(20) | ||
41 | clrl d0 | ||
42 | rts | ||
43 | |||
44 | SYM (longjmp): | ||
45 | moveal sp@(4),a0 | ||
46 | movel sp@(8),d0 | ||
47 | bne 1f | ||
48 | movel &1,d0 | ||
49 | 1: | ||
50 | moveml a0@(20),d2-d7/a2-a6 | ||
51 | moveal a0@(8),sp | ||
52 | movel a0@(12),sp@ | ||
53 | rts | ||
54 | |||
55 | #ifdef M68881 | ||
56 | .global SYM (setjmp_68881) | ||
57 | .global SYM (longjmp_68881) | ||
58 | |||
59 | SYM (setjmp_68881): | ||
60 | moveal sp@(4),a0 | ||
61 | movel sp@(0),a0@(12) | ||
62 | movel sp,a0@(8) | ||
63 | moveml d2-d7/a2-a6,a0@(20) | ||
64 | fmovemx fp2-fp7,a0@(64) | ||
65 | clrl d0 | ||
66 | rts | ||
67 | |||
68 | SYM (longjmp_68881): | ||
69 | moveal sp@(4),a0 | ||
70 | fmovemx a0@(64),fp2-fp7 | ||
71 | movel sp@(8),d0 | ||
72 | bne 1f | ||
73 | movel &1,d0 | ||
74 | 1: | ||
75 | moveml a0@(20),d2-d7/a2-a6 | ||
76 | moveal a0@(8),sp | ||
77 | movel a0@(12),sp@ | ||
78 | rts | ||
79 | #endif | ||
diff --git a/lib/libsetjmp/mips/setjmp.S b/lib/libsetjmp/mips/setjmp.S new file mode 100644 index 0000000000..7fa127a7a4 --- /dev/null +++ b/lib/libsetjmp/mips/setjmp.S | |||
@@ -0,0 +1,101 @@ | |||
1 | #include "config.h" | ||
2 | #include "mips.h" | ||
3 | |||
4 | /* This is a simple version of setjmp and longjmp for MIPS 32 and 64. | ||
5 | |||
6 | Ian Lance Taylor, Cygnus Support, 13 May 1993. */ | ||
7 | |||
8 | #ifdef __mips16 | ||
9 | /* This file contains 32 bit assembly code. */ | ||
10 | .set nomips16 | ||
11 | #endif | ||
12 | |||
13 | #define GPR_LAYOUT \ | ||
14 | GPR_OFFSET ($16, 0); \ | ||
15 | GPR_OFFSET ($17, 1); \ | ||
16 | GPR_OFFSET ($18, 2); \ | ||
17 | GPR_OFFSET ($19, 3); \ | ||
18 | GPR_OFFSET ($20, 4); \ | ||
19 | GPR_OFFSET ($21, 5); \ | ||
20 | GPR_OFFSET ($22, 6); \ | ||
21 | GPR_OFFSET ($23, 7); \ | ||
22 | GPR_OFFSET ($29, 8); \ | ||
23 | GPR_OFFSET ($30, 9); \ | ||
24 | GPR_OFFSET ($31, 10) | ||
25 | |||
26 | #define NUM_GPRS_SAVED 11 | ||
27 | |||
28 | #ifdef __mips_hard_float | ||
29 | #define FPR_LAYOUT \ | ||
30 | FPR_OFFSET ($f20, 0); \ | ||
31 | FPR_OFFSET ($f21, 1); \ | ||
32 | FPR_OFFSET ($f22, 2); \ | ||
33 | FPR_OFFSET ($f23, 3); \ | ||
34 | FPR_OFFSET ($f24, 4); \ | ||
35 | FPR_OFFSET ($f25, 5); \ | ||
36 | FPR_OFFSET ($f26, 6); \ | ||
37 | FPR_OFFSET ($f27, 7); \ | ||
38 | FPR_OFFSET ($f28, 8); \ | ||
39 | FPR_OFFSET ($f29, 9); \ | ||
40 | FPR_OFFSET ($f30, 10); \ | ||
41 | FPR_OFFSET ($f31, 11) | ||
42 | #else | ||
43 | #define FPR_LAYOUT | ||
44 | #endif | ||
45 | |||
46 | #if CPU_MIPS == 64 | ||
47 | #define BYTES_PER_WORD 8 | ||
48 | #define LOAD_GPR ld | ||
49 | #define LOAD_FPR ldc1 | ||
50 | #define STORE_GPR sd | ||
51 | #define STORE_FPR sdc1 | ||
52 | #else | ||
53 | #define BYTES_PER_WORD 4 | ||
54 | #define LOAD_GPR lw | ||
55 | #define LOAD_FPR lwc1 | ||
56 | #define STORE_GPR sw | ||
57 | #define STORE_FPR swc1 | ||
58 | #endif | ||
59 | |||
60 | #define GPOFF(INDEX) (INDEX * BYTES_PER_WORD) | ||
61 | #define FPOFF(INDEX) ((INDEX + NUM_GPRS_SAVED) * BYTES_PER_WORD) | ||
62 | |||
63 | /* int setjmp (jmp_buf); */ | ||
64 | .globl setjmp | ||
65 | .ent setjmp | ||
66 | setjmp: | ||
67 | .frame sp, 0, ra | ||
68 | |||
69 | #define GPR_OFFSET(REG, INDEX) STORE_GPR REG,GPOFF(INDEX)(a0) | ||
70 | #define FPR_OFFSET(REG, INDEX) STORE_FPR REG,FPOFF(INDEX)(a0) | ||
71 | GPR_LAYOUT | ||
72 | FPR_LAYOUT | ||
73 | #undef GPR_OFFSET | ||
74 | #undef FPR_OFFSET | ||
75 | |||
76 | move v0, $0 | ||
77 | j ra | ||
78 | |||
79 | .end setjmp | ||
80 | |||
81 | /* volatile void longjmp (jmp_buf, int); */ | ||
82 | .globl longjmp | ||
83 | .ent longjmp | ||
84 | longjmp: | ||
85 | .frame sp, 0, ra | ||
86 | |||
87 | #define GPR_OFFSET(REG, INDEX) LOAD_GPR REG,GPOFF(INDEX)(a0) | ||
88 | #define FPR_OFFSET(REG, INDEX) LOAD_FPR REG,FPOFF(INDEX)(a0) | ||
89 | GPR_LAYOUT | ||
90 | FPR_LAYOUT | ||
91 | #undef GPR_OFFSET | ||
92 | #undef FPR_OFFSET | ||
93 | |||
94 | bne a1, $0, 1f | ||
95 | li a1, 1 | ||
96 | 1: | ||
97 | move v0, a1 | ||
98 | j ra | ||
99 | |||
100 | .end longjmp | ||
101 | |||
diff --git a/lib/libsetjmp/setjmp.h b/lib/libsetjmp/setjmp.h new file mode 100644 index 0000000000..f1f5d6a89e --- /dev/null +++ b/lib/libsetjmp/setjmp.h | |||
@@ -0,0 +1,64 @@ | |||
1 | #ifndef _SETJMP_H_ | ||
2 | #define _SETJMP_H_ | ||
3 | |||
4 | /* Combined parts of include/setjmp.h and include/machine/setjmp.h in | ||
5 | * newlib 1.17.0, with minor changes for Rockbox. | ||
6 | */ | ||
7 | |||
8 | #include "config.h" | ||
9 | #ifdef CPU_ARM | ||
10 | /* | ||
11 | * All callee preserved registers: | ||
12 | * v1 - v7, fp, ip, sp, lr, f4, f5, f6, f7 | ||
13 | */ | ||
14 | #define _JBLEN 23 | ||
15 | #endif | ||
16 | |||
17 | /* necv70 was 9 as well. */ | ||
18 | |||
19 | #ifdef CPU_COLDFIRE | ||
20 | /* | ||
21 | * onsstack,sigmask,sp,pc,psl,d2-d7,a2-a6, | ||
22 | * fp2-fp7 for 68881. | ||
23 | * All else recovered by under/over(flow) handling. | ||
24 | */ | ||
25 | #define _JBLEN 34 | ||
26 | #endif | ||
27 | |||
28 | #ifdef CPU_MIPS | ||
29 | #if CPU_MIPS == 64 | ||
30 | #define _JBTYPE long long | ||
31 | #endif | ||
32 | #ifdef __mips_soft_float | ||
33 | #define _JBLEN 11 | ||
34 | #else | ||
35 | #define _JBLEN 23 | ||
36 | #endif | ||
37 | #endif | ||
38 | |||
39 | #ifdef CPU_SH | ||
40 | #define __SH5__ 0 | ||
41 | #if __SH5__ | ||
42 | #define _JBLEN 50 | ||
43 | #define _JBTYPE long long | ||
44 | #else | ||
45 | /* r8 through r15 (callee saved), pr, fp regs if available */ | ||
46 | #define _JBLEN 20 | ||
47 | #endif /* __SH5__ */ | ||
48 | #endif | ||
49 | |||
50 | #ifdef _JBLEN | ||
51 | #ifdef _JBTYPE | ||
52 | typedef _JBTYPE jmp_buf[_JBLEN]; | ||
53 | #else | ||
54 | typedef int jmp_buf[_JBLEN]; | ||
55 | #endif | ||
56 | #else | ||
57 | typedef int jmp_buf; | ||
58 | #endif | ||
59 | |||
60 | |||
61 | extern void longjmp(jmp_buf __jmpb, int __retval); | ||
62 | extern int setjmp(jmp_buf __jmpb); | ||
63 | |||
64 | #endif // _SETJMP_H_ | ||
diff --git a/lib/libsetjmp/sh/asm.h b/lib/libsetjmp/sh/asm.h new file mode 100644 index 0000000000..db30b149b5 --- /dev/null +++ b/lib/libsetjmp/sh/asm.h | |||
@@ -0,0 +1,42 @@ | |||
1 | #ifdef __STDC__ | ||
2 | # define _C_LABEL(x) _ ## x | ||
3 | #else | ||
4 | # define _C_LABEL(x) _/**/x | ||
5 | #endif | ||
6 | #define _ASM_LABEL(x) x | ||
7 | |||
8 | #if __SH5__ | ||
9 | # if __SH5__ == 32 && __SHMEDIA__ | ||
10 | # define TEXT .section .text..SHmedia32, "ax" | ||
11 | # else | ||
12 | # define TEXT .text | ||
13 | # endif | ||
14 | |||
15 | # define _ENTRY(name) \ | ||
16 | TEXT; .balign 8; .globl name; name: | ||
17 | #else | ||
18 | #define _ENTRY(name) \ | ||
19 | .text; .align 2; .globl name; name: | ||
20 | #endif /* __SH5__ */ | ||
21 | |||
22 | #define ENTRY(name) \ | ||
23 | _ENTRY(_C_LABEL(name)) | ||
24 | |||
25 | #if (defined (__sh2__) || defined (__SH2E__) || defined (__sh3__) || defined (__SH3E__) \ | ||
26 | || defined (__SH4_SINGLE__) || defined (__SH4__)) \ | ||
27 | || defined (__SH4_SINGLE_ONLY__) || defined (__SH5__) || defined (__SH2A__) | ||
28 | #define DELAYED_BRANCHES | ||
29 | #define SL(branch, dest, in_slot, in_slot_arg2) \ | ||
30 | branch##.s dest; in_slot, in_slot_arg2 | ||
31 | #else | ||
32 | #define SL(branch, dest, in_slot, in_slot_arg2) \ | ||
33 | in_slot, in_slot_arg2; branch dest | ||
34 | #endif | ||
35 | |||
36 | #ifdef __LITTLE_ENDIAN__ | ||
37 | #define SHHI shlld | ||
38 | #define SHLO shlrd | ||
39 | #else | ||
40 | #define SHHI shlrd | ||
41 | #define SHLO shlld | ||
42 | #endif | ||
diff --git a/lib/libsetjmp/sh/setjmp.S b/lib/libsetjmp/sh/setjmp.S new file mode 100644 index 0000000000..7df2054531 --- /dev/null +++ b/lib/libsetjmp/sh/setjmp.S | |||
@@ -0,0 +1,194 @@ | |||
1 | #include "config.h" | ||
2 | #ifdef ROCKBOX_LITTLE_ENDIAN | ||
3 | #define __LITTLE_ENDIAN__ | ||
4 | #endif | ||
5 | |||
6 | /* SH7034, the only supported sh target supported by Rockbox is sh1 */ | ||
7 | #define __SH5__ 0 | ||
8 | #define __SHMEDIA__ 0 | ||
9 | |||
10 | /* below is unmodified setjmp.S revision 1.3 from newlib cvs */ | ||
11 | #if __SHMEDIA__ | ||
12 | .mode SHmedia | ||
13 | #endif | ||
14 | |||
15 | #include "asm.h" | ||
16 | |||
17 | ENTRY(setjmp) | ||
18 | #if __SH5__ | ||
19 | ptabs r18, tr0 | ||
20 | gettr tr5, r5 | ||
21 | gettr tr6, r6 | ||
22 | gettr tr7, r7 | ||
23 | st.q r2, 0*8, r18 | ||
24 | st.q r2, 1*8, r10 | ||
25 | st.q r2, 2*8, r11 | ||
26 | st.q r2, 3*8, r12 | ||
27 | st.q r2, 4*8, r13 | ||
28 | st.q r2, 5*8, r14 | ||
29 | st.q r2, 6*8, r15 | ||
30 | st.q r2, 7*8, r28 | ||
31 | st.q r2, 8*8, r29 | ||
32 | st.q r2, 9*8, r30 | ||
33 | st.q r2, 10*8, r31 | ||
34 | st.q r2, 11*8, r32 | ||
35 | st.q r2, 12*8, r33 | ||
36 | st.q r2, 13*8, r34 | ||
37 | st.q r2, 14*8, r35 | ||
38 | st.q r2, 15*8, r44 | ||
39 | st.q r2, 16*8, r45 | ||
40 | st.q r2, 17*8, r46 | ||
41 | st.q r2, 18*8, r47 | ||
42 | st.q r2, 19*8, r48 | ||
43 | st.q r2, 20*8, r49 | ||
44 | st.q r2, 21*8, r50 | ||
45 | st.q r2, 22*8, r51 | ||
46 | st.q r2, 23*8, r52 | ||
47 | st.q r2, 24*8, r53 | ||
48 | st.q r2, 25*8, r54 | ||
49 | st.q r2, 26*8, r55 | ||
50 | st.q r2, 27*8, r56 | ||
51 | st.q r2, 28*8, r57 | ||
52 | st.q r2, 29*8, r58 | ||
53 | st.q r2, 30*8, r59 | ||
54 | st.q r2, 31*8, r5 | ||
55 | st.q r2, 32*8, r6 | ||
56 | st.q r2, 33*8, r7 | ||
57 | #if ! __SH4_NOFPU__ | ||
58 | fst.d r2, 34*8, dr12 | ||
59 | fst.d r2, 35*8, dr14 | ||
60 | fst.d r2, 36*8, dr36 | ||
61 | fst.d r2, 37*8, dr38 | ||
62 | fst.d r2, 38*8, dr40 | ||
63 | fst.d r2, 39*8, dr42 | ||
64 | fst.d r2, 40*8, dr44 | ||
65 | fst.d r2, 41*8, dr46 | ||
66 | fst.d r2, 42*8, dr48 | ||
67 | fst.d r2, 43*8, dr50 | ||
68 | fst.d r2, 44*8, dr52 | ||
69 | fst.d r2, 45*8, dr54 | ||
70 | fst.d r2, 46*8, dr56 | ||
71 | fst.d r2, 47*8, dr58 | ||
72 | fst.d r2, 48*8, dr60 | ||
73 | fst.d r2, 49*8, dr62 | ||
74 | #endif | ||
75 | movi 0, r2 | ||
76 | blink tr0, r63 | ||
77 | #else | ||
78 | #if defined (__SH2E__) || defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) | ||
79 | add #(13*4),r4 | ||
80 | #else | ||
81 | add #(9*4),r4 | ||
82 | #endif | ||
83 | |||
84 | sts.l pr,@-r4 | ||
85 | |||
86 | #if defined (__SH2E__) || defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) | ||
87 | fmov.s fr15,@-r4 ! call saved floating point registers | ||
88 | fmov.s fr14,@-r4 | ||
89 | fmov.s fr13,@-r4 | ||
90 | fmov.s fr12,@-r4 | ||
91 | #endif | ||
92 | |||
93 | mov.l r15,@-r4 ! call saved integer registers | ||
94 | mov.l r14,@-r4 | ||
95 | mov.l r13,@-r4 | ||
96 | mov.l r12,@-r4 | ||
97 | |||
98 | mov.l r11,@-r4 | ||
99 | mov.l r10,@-r4 | ||
100 | mov.l r9,@-r4 | ||
101 | mov.l r8,@-r4 | ||
102 | |||
103 | rts | ||
104 | mov #0,r0 | ||
105 | #endif /* __SH5__ */ | ||
106 | |||
107 | ENTRY(longjmp) | ||
108 | #if __SH5__ | ||
109 | ld.q r2, 0*8, r18 | ||
110 | ptabs r18, tr0 | ||
111 | ld.q r2, 1*8, r10 | ||
112 | ld.q r2, 2*8, r11 | ||
113 | ld.q r2, 3*8, r12 | ||
114 | ld.q r2, 4*8, r13 | ||
115 | ld.q r2, 5*8, r14 | ||
116 | ld.q r2, 6*8, r15 | ||
117 | ld.q r2, 7*8, r28 | ||
118 | ld.q r2, 8*8, r29 | ||
119 | ld.q r2, 9*8, r30 | ||
120 | ld.q r2, 10*8, r31 | ||
121 | ld.q r2, 11*8, r32 | ||
122 | ld.q r2, 12*8, r33 | ||
123 | ld.q r2, 13*8, r34 | ||
124 | ld.q r2, 14*8, r35 | ||
125 | ld.q r2, 15*8, r44 | ||
126 | ld.q r2, 16*8, r45 | ||
127 | ld.q r2, 17*8, r46 | ||
128 | ld.q r2, 18*8, r47 | ||
129 | ld.q r2, 19*8, r48 | ||
130 | ld.q r2, 20*8, r49 | ||
131 | ld.q r2, 21*8, r50 | ||
132 | ld.q r2, 22*8, r51 | ||
133 | ld.q r2, 23*8, r52 | ||
134 | ld.q r2, 24*8, r53 | ||
135 | ld.q r2, 25*8, r54 | ||
136 | ld.q r2, 26*8, r55 | ||
137 | ld.q r2, 27*8, r56 | ||
138 | ld.q r2, 28*8, r57 | ||
139 | ld.q r2, 29*8, r58 | ||
140 | ld.q r2, 30*8, r59 | ||
141 | ld.q r2, 31*8, r5 | ||
142 | ld.q r2, 32*8, r6 | ||
143 | ld.q r2, 33*8, r7 | ||
144 | ptabs r5, tr5 | ||
145 | ptabs r6, tr6 | ||
146 | ptabs r7, tr7 | ||
147 | #if ! __SH4_NOFPU__ | ||
148 | fld.d r2, 34*8, dr12 | ||
149 | fld.d r2, 35*8, dr14 | ||
150 | fld.d r2, 36*8, dr36 | ||
151 | fld.d r2, 37*8, dr38 | ||
152 | fld.d r2, 38*8, dr40 | ||
153 | fld.d r2, 39*8, dr42 | ||
154 | fld.d r2, 40*8, dr44 | ||
155 | fld.d r2, 41*8, dr46 | ||
156 | fld.d r2, 42*8, dr48 | ||
157 | fld.d r2, 43*8, dr50 | ||
158 | fld.d r2, 44*8, dr52 | ||
159 | fld.d r2, 45*8, dr54 | ||
160 | fld.d r2, 46*8, dr56 | ||
161 | fld.d r2, 47*8, dr58 | ||
162 | fld.d r2, 48*8, dr60 | ||
163 | fld.d r2, 49*8, dr62 | ||
164 | #endif | ||
165 | movi 1, r2 | ||
166 | cmvne r3, r3, r2 | ||
167 | blink tr0, r63 | ||
168 | #else | ||
169 | mov.l @r4+,r8 | ||
170 | mov.l @r4+,r9 | ||
171 | mov.l @r4+,r10 | ||
172 | mov.l @r4+,r11 | ||
173 | |||
174 | mov.l @r4+,r12 | ||
175 | mov.l @r4+,r13 | ||
176 | mov.l @r4+,r14 | ||
177 | mov.l @r4+,r15 | ||
178 | |||
179 | #if defined (__SH2E__) || defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) | ||
180 | fmov.s @r4+,fr12 ! call saved floating point registers | ||
181 | fmov.s @r4+,fr13 | ||
182 | fmov.s @r4+,fr14 | ||
183 | fmov.s @r4+,fr15 | ||
184 | #endif | ||
185 | |||
186 | lds.l @r4+,pr | ||
187 | |||
188 | mov r5,r0 | ||
189 | tst r0,r0 | ||
190 | bf retr4 | ||
191 | movt r0 | ||
192 | retr4: rts | ||
193 | nop | ||
194 | #endif /* __SH5__ */ | ||