1 From libc-alpha-return-17231-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 17:39:38 2005
2 Return-Path: <libc-alpha-return-17231-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
3 Delivered-To: listarch-libc-alpha at sources dot redhat dot com
4 Received: (qmail 15063 invoked by alias); 22 Mar 2005 17:39:38 -0000
5 Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
7 List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
8 List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
9 List-Post: <mailto:libc-alpha at sources dot redhat dot com>
10 List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11 Sender: libc-alpha-owner at sources dot redhat dot com
12 Delivered-To: mailing list libc-alpha at sources dot redhat dot com
13 Received: (qmail 13714 invoked from network); 22 Mar 2005 17:38:53 -0000
14 Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
15 by sourceware dot org with SMTP; 22 Mar 2005 17:38:53 -0000
16 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
17 id 1DDnLP-00007R-0B; Tue, 22 Mar 2005 12:39:07 -0500
18 Date: Tue, 22 Mar 2005 12:39:06 -0500
19 From: Daniel Jacobowitz <drow at false dot org>
20 To: libc-alpha at sources dot redhat dot com, Phil Blundell <pb at reciva dot com>
21 Subject: Re: Remainder of ARM EABI support
22 Message-ID: <20050322173906.GA316@nevyn.them.org>
23 Mail-Followup-To: libc-alpha at sources dot redhat dot com,
24 Phil Blundell <pb at reciva dot com>
25 References: <20050322162137.GA26662@nevyn.them.org>
27 Content-Type: text/plain; charset=us-ascii
28 Content-Disposition: inline
29 In-Reply-To: <20050322162137 dot GA26662 at nevyn dot them dot org>
30 User-Agent: Mutt/1.5.6+20040907i
32 On Tue, Mar 22, 2005 at 11:21:37AM -0500, Daniel Jacobowitz wrote:
33 > This patch is the remaining pieces of ARM EABI support, the
34 > arm*-*-linux-gnueabi target.
36 > Highlights of the new ABI compared to the old one:
37 > - Eight byte stack alignment instead of four.
38 > - VFP floating point support instead of FPA; there's actually hardware
39 > which supports VFP...
40 > - More standard structure layout. The old ABI (APCS) always rounded
41 > structures up to 32-bit alignment even if they contained only chars;
42 > it also aligned 64-bit fields to four bytes.
43 > - Some types have been grown to accomodate modern ARM cores, particularly
46 > The EABI also defines some additional symbols that a C library has to
47 > define, which allow "portable" ARM objects to be linked to multiple C
48 > libraries even if certain implementation-defined constants differ.
49 > They're added to ARM-specific files in libc_nonshared.a.
51 > Most of the contents of sysdeps/unix/sysv/linux/arm/eabi are wrappers for
52 > syscalls whose types have changed between the old and new ABI. The kernel
53 > developers are discussing an EABI syscall interface, but for now the swi
54 > based syscalls take the same argument types they used to for APCS. Only
55 > a handful of syscalls are affected.
57 My track record is not very good this morning; I apologize. I sent the
58 wrong version of the patch. This one includes a couple of VFP fixes
59 left out of the last posting, and a complete changelog.
65 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
66 Mark Mitchell <mark@codesourcery.com>
67 Paul Brook <paul@codesourcery.com>
69 * sysdeps/arm/eabi/Makefile, sysdeps/arm/eabi/Versions,
70 sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c,
71 sysdeps/arm/eabi/aeabi_errno_addr.c, sysdeps/arm/eabi/aeabi_lcsts.c,
72 sysdeps/arm/eabi/aeabi_localeconv.c, sysdeps/arm/eabi/aeabi_math.c,
73 sysdeps/arm/eabi/aeabi_mb_cur_max.c,
74 sysdeps/arm/eabi/aeabi_sighandlers.S,
75 sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c,
76 sysdeps/arm/eabi/bits/huge_val.h, sysdeps/arm/eabi/bits/setjmp.h,
77 sysdeps/arm/eabi/find_exidx.c, sysdeps/arm/eabi/fpu/__longjmp.S,
78 sysdeps/arm/eabi/fpu/bits/fenv.h, sysdeps/arm/eabi/fpu/fclrexcpt.c,
79 sysdeps/arm/eabi/fpu/fegetround.c, sysdeps/arm/eabi/fpu/fesetenv.c,
80 sysdeps/arm/eabi/fpu/fesetround.c, sysdeps/arm/eabi/fpu/fpu_control.h,
81 sysdeps/arm/eabi/fpu/feholdexcpt.c,
82 sysdeps/arm/eabi/fpu/fraiseexcpt.c,
83 sysdeps/arm/eabi/fpu/setjmp.S,
84 sysdeps/unix/sysv/linux/arm/eabi/configure,
85 sysdeps/unix/sysv/linux/arm/eabi/configure.in,
86 sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c,
87 sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c,
88 sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c,
89 sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c,
90 sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h,
91 sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c,
92 sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c,
93 sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c,
94 sysdeps/unix/sysv/linux/arm/eabi/semop.c,
95 sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c,
96 sysdeps/unix/sysv/linux/arm/eabi/statfs64.c,
97 sysdeps/unix/sysv/linux/arm/eabi/uname.c,
98 sysdeps/unix/sysv/linux/arm/eabi/xstat64.c,
99 sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c,
100 sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: New files.
103 Index: glibc/sysdeps/arm/eabi/Makefile
104 ===================================================================
105 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
106 +++ glibc/sysdeps/arm/eabi/Makefile 2005-03-22 11:53:10.049703870 -0500
108 +ifeq ($(subdir),csu)
109 +aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
110 +aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
111 + aeabi_mb_cur_max aeabi_atexit
113 +sysdep_routines += $(aeabi_constants) $(aeabi_routines)
114 +static-only-routines += $(aeabi_constants) $(aeabi_routines)
117 +ifeq ($(subdir),elf)
118 +sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
119 +shared-only-routines += aeabi_unwind_cpp_pr1
120 +sysdep-rtld-routines += aeabi_unwind_cpp_pr1
123 Index: glibc/sysdeps/arm/eabi/Versions
124 ===================================================================
125 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
126 +++ glibc/sysdeps/arm/eabi/Versions 2005-03-22 11:53:10.049703870 -0500
131 + __gnu_Unwind_Find_exidx;
134 Index: glibc/sysdeps/arm/eabi/aeabi_assert.c
135 ===================================================================
136 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
137 +++ glibc/sysdeps/arm/eabi/aeabi_assert.c 2005-03-22 11:53:10.049703870 -0500
139 +/* Copyright (C) 2004 Free Software Foundation, Inc.
140 + This file is part of the GNU C Library.
142 + The GNU C Library is free software; you can redistribute it and/or
143 + modify it under the terms of the GNU Lesser General Public
144 + License as published by the Free Software Foundation; either
145 + version 2.1 of the License, or (at your option) any later version.
147 + The GNU C Library is distributed in the hope that it will be useful,
148 + but WITHOUT ANY WARRANTY; without even the implied warranty of
149 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
150 + Lesser General Public License for more details.
152 + You should have received a copy of the GNU Lesser General Public
153 + License along with the GNU C Library; if not, write to the Free
154 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
160 +void attribute_hidden
161 +__aeabi_assert (const char *assertion, const char *file,
164 + __assert_fail (assertion, file, line, NULL);
166 Index: glibc/sysdeps/arm/eabi/aeabi_atexit.c
167 ===================================================================
168 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
169 +++ glibc/sysdeps/arm/eabi/aeabi_atexit.c 2005-03-22 11:53:10.050703627 -0500
171 +/* Copyright (C) 2005 Free Software Foundation, Inc.
172 + This file is part of the GNU C Library.
174 + The GNU C Library is free software; you can redistribute it and/or
175 + modify it under the terms of the GNU Lesser General Public
176 + License as published by the Free Software Foundation; either
177 + version 2.1 of the License, or (at your option) any later version.
179 + The GNU C Library is distributed in the hope that it will be useful,
180 + but WITHOUT ANY WARRANTY; without even the implied warranty of
181 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
182 + Lesser General Public License for more details.
184 + You should have received a copy of the GNU Lesser General Public
185 + License along with the GNU C Library; if not, write to the Free
186 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
191 +/* Register a function to be called by exit or when a shared library
192 + is unloaded. This routine is like __cxa_atexit, but uses the
193 + calling sequence required by the ARM EABI. */
194 +int attribute_hidden
195 +__aeabi_atexit (void *arg, void (*func) (void *), void *d)
197 + return __cxa_atexit (func, arg, d);
199 Index: glibc/sysdeps/arm/eabi/aeabi_errno_addr.c
200 ===================================================================
201 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
202 +++ glibc/sysdeps/arm/eabi/aeabi_errno_addr.c 2005-03-22 11:53:10.050703627 -0500
204 +/* Copyright (C) 2004 Free Software Foundation, Inc.
205 + This file is part of the GNU C Library.
207 + The GNU C Library is free software; you can redistribute it and/or
208 + modify it under the terms of the GNU Lesser General Public
209 + License as published by the Free Software Foundation; either
210 + version 2.1 of the License, or (at your option) any later version.
212 + The GNU C Library is distributed in the hope that it will be useful,
213 + but WITHOUT ANY WARRANTY; without even the implied warranty of
214 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
215 + Lesser General Public License for more details.
217 + You should have received a copy of the GNU Lesser General Public
218 + License along with the GNU C Library; if not, write to the Free
219 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
226 +__aeabi_errno_addr (void)
230 Index: glibc/sysdeps/arm/eabi/aeabi_lcsts.c
231 ===================================================================
232 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
233 +++ glibc/sysdeps/arm/eabi/aeabi_lcsts.c 2005-03-22 11:53:10.050703627 -0500
235 +/* Link-time constants for ARM EABI.
236 + Copyright (C) 2005 Free Software Foundation, Inc.
237 + This file is part of the GNU C Library.
239 + The GNU C Library is free software; you can redistribute it and/or
240 + modify it under the terms of the GNU Lesser General Public
241 + License as published by the Free Software Foundation; either
242 + version 2.1 of the License, or (at your option) any later version.
244 + The GNU C Library is distributed in the hope that it will be useful,
245 + but WITHOUT ANY WARRANTY; without even the implied warranty of
246 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
247 + Lesser General Public License for more details.
249 + You should have received a copy of the GNU Lesser General Public
250 + License along with the GNU C Library; if not, write to the Free
251 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
254 +/* The ARM EABI requires that we provide ISO compile-time constants as
255 + link-time constants. Some portable applications may reference these. */
265 +#define eabi_constant2(X,Y) const int __aeabi_##X attribute_hidden = Y
266 +#define eabi_constant(X) const int __aeabi_##X attribute_hidden = X
268 +eabi_constant (EDOM);
269 +eabi_constant (ERANGE);
270 +eabi_constant (EILSEQ);
272 +eabi_constant (MB_LEN_MAX);
274 +eabi_constant (LC_COLLATE);
275 +eabi_constant (LC_CTYPE);
276 +eabi_constant (LC_MONETARY);
277 +eabi_constant (LC_NUMERIC);
278 +eabi_constant (LC_TIME);
279 +eabi_constant (LC_ALL);
281 +/* The value of __aeabi_JMP_BUF_SIZE is the number of doublewords in a
283 +eabi_constant2 (JMP_BUF_SIZE, sizeof (jmp_buf) / 8);
285 +eabi_constant (SIGABRT);
286 +eabi_constant (SIGFPE);
287 +eabi_constant (SIGILL);
288 +eabi_constant (SIGINT);
289 +eabi_constant (SIGSEGV);
290 +eabi_constant (SIGTERM);
292 +eabi_constant2 (IOFBF, _IOFBF);
293 +eabi_constant2 (IOLBF, _IOLBF);
294 +eabi_constant2 (IONBF, _IONBF);
295 +eabi_constant (BUFSIZ);
296 +eabi_constant (FOPEN_MAX);
297 +eabi_constant (TMP_MAX);
298 +eabi_constant (FILENAME_MAX);
299 +eabi_constant (L_tmpnam);
301 +eabi_constant (CLOCKS_PER_SEC);
302 Index: glibc/sysdeps/arm/eabi/aeabi_localeconv.c
303 ===================================================================
304 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
305 +++ glibc/sysdeps/arm/eabi/aeabi_localeconv.c 2005-03-22 11:53:10.050703627 -0500
307 +/* Copyright (C) 2004 Free Software Foundation, Inc.
308 + This file is part of the GNU C Library.
310 + The GNU C Library is free software; you can redistribute it and/or
311 + modify it under the terms of the GNU Lesser General Public
312 + License as published by the Free Software Foundation; either
313 + version 2.1 of the License, or (at your option) any later version.
315 + The GNU C Library is distributed in the hope that it will be useful,
316 + but WITHOUT ANY WARRANTY; without even the implied warranty of
317 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
318 + Lesser General Public License for more details.
320 + You should have received a copy of the GNU Lesser General Public
321 + License along with the GNU C Library; if not, write to the Free
322 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
329 +__aeabi_localeconv (void)
331 + return localeconv ();
333 Index: glibc/sysdeps/arm/eabi/aeabi_math.c
334 ===================================================================
335 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
336 +++ glibc/sysdeps/arm/eabi/aeabi_math.c 2005-03-22 11:53:10.050703627 -0500
338 +/* Copyright (C) 2004 Free Software Foundation, Inc.
339 + This file is part of the GNU C Library.
341 + The GNU C Library is free software; you can redistribute it and/or
342 + modify it under the terms of the GNU Lesser General Public
343 + License as published by the Free Software Foundation; either
344 + version 2.1 of the License, or (at your option) any later version.
346 + The GNU C Library is distributed in the hope that it will be useful,
347 + but WITHOUT ANY WARRANTY; without even the implied warranty of
348 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
349 + Lesser General Public License for more details.
351 + You should have received a copy of the GNU Lesser General Public
352 + License along with the GNU C Library; if not, write to the Free
353 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
358 +const double __aeabi_HUGE_VAL attribute_hidden = HUGE_VAL;
359 +const long double __aeabi_HUGE_VALL attribute_hidden = HUGE_VALL;
360 +const float __aeabi_HUGE_VALF attribute_hidden = HUGE_VALF;
361 +const float __aeabi_INFINITY attribute_hidden = INFINITY;
362 +const float __aeabi_NAN attribute_hidden = NAN;
363 Index: glibc/sysdeps/arm/eabi/aeabi_mb_cur_max.c
364 ===================================================================
365 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
366 +++ glibc/sysdeps/arm/eabi/aeabi_mb_cur_max.c 2005-03-22 11:53:10.051703385 -0500
368 +/* Copyright (C) 2004 Free Software Foundation, Inc.
369 + This file is part of the GNU C Library.
371 + The GNU C Library is free software; you can redistribute it and/or
372 + modify it under the terms of the GNU Lesser General Public
373 + License as published by the Free Software Foundation; either
374 + version 2.1 of the License, or (at your option) any later version.
376 + The GNU C Library is distributed in the hope that it will be useful,
377 + but WITHOUT ANY WARRANTY; without even the implied warranty of
378 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
379 + Lesser General Public License for more details.
381 + You should have received a copy of the GNU Lesser General Public
382 + License along with the GNU C Library; if not, write to the Free
383 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
386 +#include <langinfo.h>
389 +#include <locale/localeinfo.h>
391 +int attribute_hidden
392 +__aeabi_MB_CUR_MAX (void)
396 Index: glibc/sysdeps/arm/eabi/aeabi_sighandlers.S
397 ===================================================================
398 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
399 +++ glibc/sysdeps/arm/eabi/aeabi_sighandlers.S 2005-03-22 11:53:10.051703385 -0500
401 +/* Link-time constants for ARM EABI - signal handlers.
402 + Copyright (C) 2005 Free Software Foundation, Inc.
403 + This file is part of the GNU C Library.
405 + The GNU C Library is free software; you can redistribute it and/or
406 + modify it under the terms of the GNU Lesser General Public
407 + License as published by the Free Software Foundation; either
408 + version 2.1 of the License, or (at your option) any later version.
410 + The GNU C Library is distributed in the hope that it will be useful,
411 + but WITHOUT ANY WARRANTY; without even the implied warranty of
412 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
413 + Lesser General Public License for more details.
415 + You should have received a copy of the GNU Lesser General Public
416 + License along with the GNU C Library; if not, write to the Free
417 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
420 +/* The ARM EABI defines these as "functions". */
424 + .global __aeabi_SIG_DFL
425 + .hidden __aeabi_SIG_DFL
426 + .type __aeabi_SIG_DFL, %function
427 + .set __aeabi_SIG_DFL, 0
429 + .global __aeabi_SIG_IGN
430 + .hidden __aeabi_SIG_IGN
431 + .type __aeabi_SIG_IGN, %function
432 + .set __aeabi_SIG_IGN, 1
434 + .global __aeabi_SIG_ERR
435 + .hidden __aeabi_SIG_ERR
436 + .type __aeabi_SIG_ERR, %function
437 + .set __aeabi_SIG_ERR, -1
438 Index: glibc/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c
439 ===================================================================
440 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
441 +++ glibc/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c 2005-03-22 11:53:10.051703385 -0500
443 +/* Copyright (C) 2005 Free Software Foundation, Inc.
444 + This file is part of the GNU C Library.
446 + The GNU C Library is free software; you can redistribute it and/or
447 + modify it under the terms of the GNU Lesser General Public
448 + License as published by the Free Software Foundation; either
449 + version 2.1 of the License, or (at your option) any later version.
451 + The GNU C Library is distributed in the hope that it will be useful,
452 + but WITHOUT ANY WARRANTY; without even the implied warranty of
453 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
454 + Lesser General Public License for more details.
456 + You should have received a copy of the GNU Lesser General Public
457 + License along with the GNU C Library; if not, write to the Free
458 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
461 +/* Because some objects in ld.so and libc.so are built with
462 + -fexceptions, we end up with references to this personality
463 + routine. However, these libraries are not linked against
464 + libgcc_eh.a, so we need a dummy definition. This routine will
465 + never actually be called. */
468 +__aeabi_unwind_cpp_pr1 (void)
471 Index: glibc/sysdeps/arm/eabi/bits/huge_val.h
472 ===================================================================
473 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
474 +++ glibc/sysdeps/arm/eabi/bits/huge_val.h 2005-03-22 11:53:10.051703385 -0500
476 +/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity).
477 + Used by <stdlib.h> and <math.h> functions for overflow.
478 + Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
479 + Free Software Foundation, Inc.
480 + This file is part of the GNU C Library.
482 + The GNU C Library is free software; you can redistribute it and/or
483 + modify it under the terms of the GNU Lesser General Public
484 + License as published by the Free Software Foundation; either
485 + version 2.1 of the License, or (at your option) any later version.
487 + The GNU C Library is distributed in the hope that it will be useful,
488 + but WITHOUT ANY WARRANTY; without even the implied warranty of
489 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
490 + Lesser General Public License for more details.
492 + You should have received a copy of the GNU Lesser General Public
493 + License along with the GNU C Library; if not, write to the Free
494 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
498 +# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
501 +/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
503 +#if __GNUC_PREREQ(3,3)
504 +# define HUGE_VAL (__builtin_huge_val())
505 +#elif __GNUC_PREREQ(2,96)
506 +# define HUGE_VAL (__extension__ 0x1.0p2047)
507 +#elif defined __GNUC__
511 + ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
512 + { __l: 0x7ff0000000000000ULL }).__d)
516 +# include <endian.h>
518 +typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
520 +# if __BYTE_ORDER == __BIG_ENDIAN
521 +# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
523 +# if __BYTE_ORDER == __LITTLE_ENDIAN
524 +# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
527 +static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
528 +# define HUGE_VAL (__huge_val.__d)
531 Index: glibc/sysdeps/arm/eabi/bits/setjmp.h
532 ===================================================================
533 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
534 +++ glibc/sysdeps/arm/eabi/bits/setjmp.h 2005-03-22 11:53:10.052703143 -0500
536 +/* Copyright (C) 2004 Free Software Foundation, Inc.
537 + This file is part of the GNU C Library.
539 + The GNU C Library is free software; you can redistribute it and/or
540 + modify it under the terms of the GNU Lesser General Public
541 + License as published by the Free Software Foundation; either
542 + version 2.1 of the License, or (at your option) any later version.
544 + The GNU C Library is distributed in the hope that it will be useful,
545 + but WITHOUT ANY WARRANTY; without even the implied warranty of
546 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
547 + Lesser General Public License for more details.
549 + You should have received a copy of the GNU Lesser General Public
550 + License along with the GNU C Library; if not, write to the Free
551 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
554 +/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */
556 +#ifndef _BITS_SETJMP_H
557 +#define _BITS_SETJMP_H 1
559 +#if !defined _SETJMP_H && !defined _PTHREAD_H
560 +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
564 +/* The exact set of registers saved may depend on the particular core
565 + in use, as some coprocessor registers may need to be saved. The C
566 + Library ABI requires that the buffer be 8-byte aligned, and
567 + recommends that the buffer contain 64 words. The first 28 words
568 + are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr. (Note
569 + that d8-15 require 17 words, due to the use of fstmx.) */
570 +typedef int __jmp_buf[64] __attribute__((aligned (8)));
573 +#define __JMP_BUF_SP 8
575 +/* Test if longjmp to JMPBUF would unwind the frame
576 + containing a local variable at ADDRESS. */
577 +#define _JMPBUF_UNWINDS(jmpbuf, address) \
578 + ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
581 Index: glibc/sysdeps/arm/eabi/find_exidx.c
582 ===================================================================
583 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
584 +++ glibc/sysdeps/arm/eabi/find_exidx.c 2005-03-22 11:53:10.052703143 -0500
586 +/* Copyright (C) 2005 Free Software Foundation, Inc.
587 + This file is part of the GNU C Library.
589 + The GNU C Library is free software; you can redistribute it and/or
590 + modify it under the terms of the GNU Lesser General Public
591 + License as published by the Free Software Foundation; either
592 + version 2.1 of the License, or (at your option) any later version.
594 + The GNU C Library is distributed in the hope that it will be useful,
595 + but WITHOUT ANY WARRANTY; without even the implied warranty of
596 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
597 + Lesser General Public License for more details.
599 + You should have received a copy of the GNU Lesser General Public
600 + License along with the GNU C Library; if not, write to the Free
601 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
607 +struct unw_eh_callback_data
610 + _Unwind_Ptr exidx_start;
615 +/* Callback to determins if the PC lies within an object, and remember the
616 + location of the exception index table if it does. */
619 +find_exidx_callback (struct dl_phdr_info * info, size_t size, void * ptr)
621 + struct unw_eh_callback_data * data;
622 + const ElfW(Phdr) *phdr;
625 + _Unwind_Ptr load_base;
627 + data = (struct unw_eh_callback_data *) ptr;
628 + load_base = info->dlpi_addr;
629 + phdr = info->dlpi_phdr;
632 + for (i = info->dlpi_phnum; i > 0; i--, phdr++)
634 + if (phdr->p_type == PT_LOAD)
636 + _Unwind_Ptr vaddr = phdr->p_vaddr + load_base;
637 + if (data->pc >= vaddr && data->pc < vaddr + phdr->p_memsz)
640 + else if (phdr->p_type == PT_ARM_EXIDX)
642 + data->exidx_start = (_Unwind_Ptr) (phdr->p_vaddr + load_base);
643 + data->exidx_len = phdr->p_memsz;
651 +/* Find the exception index table containing PC. */
654 +__gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount)
656 + struct unw_eh_callback_data data;
659 + data.exidx_start = 0;
660 + if (dl_iterate_phdr (find_exidx_callback, &data) <= 0)
663 + *pcount = data.exidx_len / 8;
664 + return data.exidx_start;
666 Index: glibc/sysdeps/arm/eabi/fpu/__longjmp.S
667 ===================================================================
668 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
669 +++ glibc/sysdeps/arm/eabi/fpu/__longjmp.S 2005-03-22 11:53:10.052703143 -0500
672 + Copyright (C) 2004 Free Software Foundation, Inc.
673 + This file is part of the GNU C Library.
675 + The GNU C Library is free software; you can redistribute it and/or
676 + modify it under the terms of the GNU Lesser General Public
677 + License as published by the Free Software Foundation; either
678 + version 2.1 of the License, or (at your option) any later version.
680 + The GNU C Library is distributed in the hope that it will be useful,
681 + but WITHOUT ANY WARRANTY; without even the implied warranty of
682 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
683 + Lesser General Public License for more details.
685 + You should have received a copy of the GNU Lesser General Public
686 + License along with the GNU C Library; if not, write to the Free
687 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
693 +#include <bits/setjmp.h>
695 +/* __longjmp(jmpbuf, val) */
698 + mov ip, r0 /* save jmp_buf pointer */
700 + movs r0, r1 /* get the return value in place */
701 + moveq r0, #1 /* can't let setjmp() return zero! */
703 + /* Restore the integer registers. */
704 + LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
706 + /* Restore the VFP registers. */
707 + fldmiax ip!, {d8-d15}
708 + /* Restore the floating-point status register. */
714 Index: glibc/sysdeps/arm/eabi/fpu/bits/fenv.h
715 ===================================================================
716 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
717 +++ glibc/sysdeps/arm/eabi/fpu/bits/fenv.h 2005-03-22 12:34:55.511467536 -0500
719 +/* Copyright (C) 2004 Free Software Foundation, Inc.
720 + This file is part of the GNU C Library.
722 + The GNU C Library is free software; you can redistribute it and/or
723 + modify it under the terms of the GNU Lesser General Public
724 + License as published by the Free Software Foundation; either
725 + version 2.1 of the License, or (at your option) any later version.
727 + The GNU C Library is distributed in the hope that it will be useful,
728 + but WITHOUT ANY WARRANTY; without even the implied warranty of
729 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
730 + Lesser General Public License for more details.
732 + You should have received a copy of the GNU Lesser General Public
733 + License along with the GNU C Library; if not, write to the Free
734 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
738 +# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
741 +/* Define bits representing exceptions in the FPU status word. */
745 +#define FE_INVALID FE_INVALID
747 +#define FE_DIVBYZERO FE_DIVBYZERO
749 +#define FE_OVERFLOW FE_OVERFLOW
751 +#define FE_UNDERFLOW FE_UNDERFLOW
753 +#define FE_INEXACT FE_INEXACT
756 +/* Amount to shift by to convert an exception to a mask bit. */
757 +#define FE_EXCEPT_SHIFT 8
759 +/* All supported exceptions. */
760 +#define FE_ALL_EXCEPT \
761 + (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
763 +/* VFP supports all of the four defined rounding modes. */
767 +#define FE_TONEAREST FE_TONEAREST
768 + FE_UPWARD = 0x400000,
769 +#define FE_UPWARD FE_UPWARD
770 + FE_DOWNWARD = 0x800000,
771 +#define FE_DOWNWARD FE_DOWNWARD
772 + FE_TOWARDZERO = 0xc00000
773 +#define FE_TOWARDZERO FE_TOWARDZERO
776 +/* Type representing exception flags. */
777 +typedef unsigned int fexcept_t;
779 +/* Type representing floating-point environment. */
786 +/* If the default argument is used we use this value. */
787 +#define FE_DFL_ENV ((fenv_t *) -1l)
790 +/* Floating-point environment where none of the exceptions are masked. */
791 +# define FE_NOMASK_ENV ((__const fenv_t *) -2)
793 Index: glibc/sysdeps/arm/eabi/fpu/fclrexcpt.c
794 ===================================================================
795 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
796 +++ glibc/sysdeps/arm/eabi/fpu/fclrexcpt.c 2005-03-22 11:53:10.053702900 -0500
798 +/* Clear given exceptions in current floating-point environment.
799 + Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
800 + This file is part of the GNU C Library.
802 + The GNU C Library is free software; you can redistribute it and/or
803 + modify it under the terms of the GNU Lesser General Public
804 + License as published by the Free Software Foundation; either
805 + version 2.1 of the License, or (at your option) any later version.
807 + The GNU C Library is distributed in the hope that it will be useful,
808 + but WITHOUT ANY WARRANTY; without even the implied warranty of
809 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
810 + Lesser General Public License for more details.
812 + You should have received a copy of the GNU Lesser General Public
813 + License along with the GNU C Library; if not, write to the Free
814 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
818 +#include <fpu_control.h>
821 +__feclearexcept (int excepts)
823 + unsigned long int temp;
825 + /* Mask out unsupported bits/exceptions. */
826 + excepts &= FE_ALL_EXCEPT;
828 + /* Get the current floating point status. */
831 + /* Clear the relevant bits. */
832 + temp = (temp & ~FE_ALL_EXCEPT) | (temp & FE_ALL_EXCEPT & ~excepts);
834 + /* Put the new data in effect. */
841 +#include <shlib-compat.h>
842 +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
843 +strong_alias (__feclearexcept, __old_feclearexcept)
844 +compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
847 +versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
848 Index: glibc/sysdeps/arm/eabi/fpu/fegetround.c
849 ===================================================================
850 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
851 +++ glibc/sysdeps/arm/eabi/fpu/fegetround.c 2005-03-22 11:53:10.053702900 -0500
853 +/* Return current rounding direction.
854 + Copyright (C) 2004 Free Software Foundation, Inc.
855 + This file is part of the GNU C Library.
857 + The GNU C Library is free software; you can redistribute it and/or
858 + modify it under the terms of the GNU Lesser General Public
859 + License as published by the Free Software Foundation; either
860 + version 2.1 of the License, or (at your option) any later version.
862 + The GNU C Library is distributed in the hope that it will be useful,
863 + but WITHOUT ANY WARRANTY; without even the implied warranty of
864 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
865 + Lesser General Public License for more details.
867 + You should have received a copy of the GNU Lesser General Public
868 + License along with the GNU C Library; if not, write to the Free
869 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
873 +#include <fpu_control.h>
880 + /* Get the current environment. */
883 + return temp & FE_TOWARDZERO;
885 Index: glibc/sysdeps/arm/eabi/fpu/fesetenv.c
886 ===================================================================
887 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
888 +++ glibc/sysdeps/arm/eabi/fpu/fesetenv.c 2005-03-22 12:34:55.521465156 -0500
890 +/* Install given floating-point environment.
891 + Copyright (C) 2004 Free Software Foundation, Inc.
892 + This file is part of the GNU C Library.
894 + The GNU C Library is free software; you can redistribute it and/or
895 + modify it under the terms of the GNU Lesser General Public
896 + License as published by the Free Software Foundation; either
897 + version 2.1 of the License, or (at your option) any later version.
899 + The GNU C Library is distributed in the hope that it will be useful,
900 + but WITHOUT ANY WARRANTY; without even the implied warranty of
901 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
902 + Lesser General Public License for more details.
904 + You should have received a copy of the GNU Lesser General Public
905 + License along with the GNU C Library; if not, write to the Free
906 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
910 +#include <fpu_control.h>
913 +__fesetenv (const fenv_t *envp)
918 + temp &= _FPU_RESERVED;
920 + if (envp == FE_DFL_ENV)
921 + temp |= _FPU_DEFAULT;
922 + else if (envp == FE_NOMASK_ENV)
925 + temp |= envp->__cw & ~_FPU_RESERVED;
933 +#include <shlib-compat.h>
934 +libm_hidden_ver (__fesetenv, fesetenv)
935 +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
936 Index: glibc/sysdeps/arm/eabi/fpu/fesetround.c
937 ===================================================================
938 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
939 +++ glibc/sysdeps/arm/eabi/fpu/fesetround.c 2005-03-22 11:53:10.053702900 -0500
941 +/* Set current rounding direction.
942 + Copyright (C) 2004 Free Software Foundation, Inc.
943 + This file is part of the GNU C Library.
945 + The GNU C Library is free software; you can redistribute it and/or
946 + modify it under the terms of the GNU Lesser General Public
947 + License as published by the Free Software Foundation; either
948 + version 2.1 of the License, or (at your option) any later version.
950 + The GNU C Library is distributed in the hope that it will be useful,
951 + but WITHOUT ANY WARRANTY; without even the implied warranty of
952 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
953 + Lesser General Public License for more details.
955 + You should have received a copy of the GNU Lesser General Public
956 + License along with the GNU C Library; if not, write to the Free
957 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
961 +#include <fpu_control.h>
964 +fesetround (int round)
966 + fpu_control_t temp;
973 + case FE_TOWARDZERO:
975 + temp = (temp & ~FE_TOWARDZERO) | round;
982 Index: glibc/sysdeps/arm/eabi/fpu/fpu_control.h
983 ===================================================================
984 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
985 +++ glibc/sysdeps/arm/eabi/fpu/fpu_control.h 2005-03-22 12:34:55.521465156 -0500
987 +/* FPU control word definitions. ARM VFP version.
988 + Copyright (C) 2004 Free Software Foundation, Inc.
989 + This file is part of the GNU C Library.
991 + The GNU C Library is free software; you can redistribute it and/or
992 + modify it under the terms of the GNU Lesser General Public
993 + License as published by the Free Software Foundation; either
994 + version 2.1 of the License, or (at your option) any later version.
996 + The GNU C Library is distributed in the hope that it will be useful,
997 + but WITHOUT ANY WARRANTY; without even the implied warranty of
998 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
999 + Lesser General Public License for more details.
1001 + You should have received a copy of the GNU Lesser General Public
1002 + License along with the GNU C Library; if not, write to the Free
1003 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1004 + 02111-1307 USA. */
1006 +#ifndef _FPU_CONTROL_H
1007 +#define _FPU_CONTROL_H
1009 +/* masking of interrupts */
1010 +#define _FPU_MASK_IM 0x00000100 /* invalid operation */
1011 +#define _FPU_MASK_ZM 0x00000200 /* divide by zero */
1012 +#define _FPU_MASK_OM 0x00000400 /* overflow */
1013 +#define _FPU_MASK_UM 0x00000800 /* underflow */
1014 +#define _FPU_MASK_PM 0x00001000 /* inexact */
1016 +/* Some bits in the FPSCR are not yet defined. They must be preserved when
1017 + modifying the contents. */
1018 +#define _FPU_RESERVED 0x0e08e0e0
1019 +#define _FPU_DEFAULT 0x00000000
1020 +/* Default + exceptions enabled. */
1021 +#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00)
1023 +/* Type of the control word. */
1024 +typedef unsigned int fpu_control_t;
1026 +/* Macros for accessing the hardware control word. */
1027 +#define _FPU_GETCW(cw) __asm__ __volatile__ ("fmrx %0, fpscr" : "=r" (cw))
1028 +#define _FPU_SETCW(cw) __asm__ __volatile__ ("fmxr fpscr, %0" : : "r" (cw))
1030 +/* Default control word set at startup. */
1031 +extern fpu_control_t __fpu_control;
1033 +#endif /* _FPU_CONTROL_H */
1034 Index: glibc/sysdeps/arm/eabi/fpu/setjmp.S
1035 ===================================================================
1036 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1037 +++ glibc/sysdeps/arm/eabi/fpu/setjmp.S 2005-03-22 11:53:10.054702658 -0500
1040 + Copyright (C) 2004 Free Software Foundation, Inc.
1041 + This file is part of the GNU C Library.
1043 + The GNU C Library is free software; you can redistribute it and/or
1044 + modify it under the terms of the GNU Lesser General Public
1045 + License as published by the Free Software Foundation; either
1046 + version 2.1 of the License, or (at your option) any later version.
1048 + The GNU C Library is distributed in the hope that it will be useful,
1049 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1050 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1051 + Lesser General Public License for more details.
1053 + You should have received a copy of the GNU Lesser General Public
1054 + License along with the GNU C Library; if not, write to the Free
1055 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1056 + 02111-1307 USA. */
1058 +#include <sysdep.h>
1061 +#include <bits/setjmp.h>
1063 +ENTRY (__sigsetjmp)
1066 + /* Store the integer registers. */
1067 + stmia ip!, {v1-v6, sl, fp, sp, lr}
1069 + /* Store the VFP registers. */
1070 + fstmiax ip!, {d8-d15}
1071 + /* Store the floating-point status register. */
1075 + /* Make a tail call to __sigjmp_save; it takes the same args. */
1076 + B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
1078 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/configure
1079 ===================================================================
1080 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1081 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/configure 2005-03-22 11:53:10.054702658 -0500
1083 +# This file is generated from configure.in by Autoconf. DO NOT EDIT!
1084 + # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
1086 +arch_minimum_kernel=2.4.17
1087 +libc_cv_gcc_unwind_find_fde=no
1088 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/configure.in
1089 ===================================================================
1090 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1091 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/configure.in 2005-03-22 11:53:10.054702658 -0500
1093 +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
1094 +# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
1096 +arch_minimum_kernel=2.4.17
1097 +libc_cv_gcc_unwind_find_fde=no
1098 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c
1099 ===================================================================
1100 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1101 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c 2005-03-22 11:53:10.054702658 -0500
1103 +/* epoll_ctl wrapper for ARM EABI.
1104 + Copyright (C) 2005 Free Software Foundation, Inc.
1105 + This file is part of the GNU C Library.
1107 + The GNU C Library is free software; you can redistribute it and/or
1108 + modify it under the terms of the GNU Lesser General Public
1109 + License as published by the Free Software Foundation; either
1110 + version 2.1 of the License, or (at your option) any later version.
1112 + The GNU C Library is distributed in the hope that it will be useful,
1113 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1114 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1115 + Lesser General Public License for more details.
1117 + You should have received a copy of the GNU Lesser General Public
1118 + License along with the GNU C Library; if not, write to the Free
1119 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1120 + 02111-1307 USA. */
1122 +#include <sysdep.h>
1124 +#include <sys/epoll.h>
1126 +#include <kernel_epoll.h>
1129 +epoll_ctl (int __epfd, int __op, int __fd, struct epoll_event *__event)
1131 + struct kernel_epoll_event k_event;
1133 + k_event.events = __event->events;
1134 + memcpy (&k_event.data, &__event->data, sizeof (k_event.data));
1136 + return INLINE_SYSCALL (epoll_ctl, 4, __epfd, __op, __fd, &k_event);
1139 +libc_hidden_def (epoll_ctl)
1140 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c
1141 ===================================================================
1142 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1143 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c 2005-03-22 11:53:10.055702416 -0500
1145 +/* epoll_ctl wrapper for ARM EABI.
1146 + Copyright (C) 2005 Free Software Foundation, Inc.
1147 + This file is part of the GNU C Library.
1149 + The GNU C Library is free software; you can redistribute it and/or
1150 + modify it under the terms of the GNU Lesser General Public
1151 + License as published by the Free Software Foundation; either
1152 + version 2.1 of the License, or (at your option) any later version.
1154 + The GNU C Library is distributed in the hope that it will be useful,
1155 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1156 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1157 + Lesser General Public License for more details.
1159 + You should have received a copy of the GNU Lesser General Public
1160 + License along with the GNU C Library; if not, write to the Free
1161 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1162 + 02111-1307 USA. */
1164 +#include <sysdep.h>
1166 +#include <sys/epoll.h>
1167 +#include <stdlib.h>
1169 +#include <kernel_epoll.h>
1172 +epoll_wait (int __epfd, struct epoll_event *__events,
1173 + int __maxevents, int __timeout);
1175 + struct kernel_epoll_event *k_events;
1178 + k_events = malloc (sizeof (struct kernel_epoll_event) * __maxevents);
1179 + if (k_events == NULL)
1181 + __set_errno (ENOMEM);
1185 + result = INLINE_SYSCALL (epoll_wait, 4, __epfd, __events, k_events,
1188 + for (i = 0; i < result; i++)
1190 + __events[i].events = k_events[i].events;
1191 + memcpy (&__events[i].data, &k_events[i].data, sizeof (k_events[i].data));
1198 +libc_hidden_def (epoll_wait)
1199 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c
1200 ===================================================================
1201 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1202 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c 2005-03-22 11:53:10.055702416 -0500
1204 +/* Return information about the filesystem on which FD resides.
1205 + Copyright (C) 1996,1997,1998,1999,2000,2003,2005
1206 + Free Software Foundation, Inc.
1207 + This file is part of the GNU C Library.
1209 + The GNU C Library is free software; you can redistribute it and/or
1210 + modify it under the terms of the GNU Lesser General Public
1211 + License as published by the Free Software Foundation; either
1212 + version 2.1 of the License, or (at your option) any later version.
1214 + The GNU C Library is distributed in the hope that it will be useful,
1215 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1216 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1217 + Lesser General Public License for more details.
1219 + You should have received a copy of the GNU Lesser General Public
1220 + License along with the GNU C Library; if not, write to the Free
1221 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1222 + 02111-1307 USA. */
1225 +#include <string.h>
1226 +#include <sys/statfs.h>
1227 +#include <stddef.h>
1228 +#include <sysdep.h>
1230 +/* Defined in statfs64.c. */
1231 +extern int __no_statfs64 attribute_hidden;
1233 +/* Return information about the filesystem on which FD resides. */
1235 +__fstatfs64 (int fd, struct statfs64 *buf)
1237 +#ifdef __NR_fstatfs64
1238 +# if __ASSUME_STATFS64 == 0
1239 + if (! __no_statfs64)
1242 + /* The EABI structure is the same as the old ABI structure, except
1243 + that it has four additional bytes of padding - at the end. We can
1245 + int result = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf) - 4, buf);
1247 +# if __ASSUME_STATFS64 == 0
1248 + if (result == 0 || errno != ENOSYS)
1252 +# if __ASSUME_STATFS64 == 0
1253 + __no_statfs64 = 1;
1258 +#if __ASSUME_STATFS64 == 0
1259 + struct statfs buf32;
1261 + if (__fstatfs (fd, &buf32) < 0)
1264 + buf->f_type = buf32.f_type;
1265 + buf->f_bsize = buf32.f_bsize;
1266 + buf->f_blocks = buf32.f_blocks;
1267 + buf->f_bfree = buf32.f_bfree;
1268 + buf->f_bavail = buf32.f_bavail;
1269 + buf->f_files = buf32.f_files;
1270 + buf->f_ffree = buf32.f_ffree;
1271 + buf->f_fsid = buf32.f_fsid;
1272 + buf->f_namelen = buf32.f_namelen;
1273 + buf->f_frsize = buf32.f_frsize;
1274 + memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
1279 +weak_alias (__fstatfs64, fstatfs64)
1280 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c
1281 ===================================================================
1282 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1283 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c 2005-03-22 11:53:10.055702416 -0500
1285 +/* fxstat64 using old-style Unix fstat system call.
1286 + Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
1287 + This file is part of the GNU C Library.
1289 + The GNU C Library is free software; you can redistribute it and/or
1290 + modify it under the terms of the GNU Lesser General Public
1291 + License as published by the Free Software Foundation; either
1292 + version 2.1 of the License, or (at your option) any later version.
1294 + The GNU C Library is distributed in the hope that it will be useful,
1295 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1296 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1297 + Lesser General Public License for more details.
1299 + You should have received a copy of the GNU Lesser General Public
1300 + License along with the GNU C Library; if not, write to the Free
1301 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1302 + 02111-1307 USA. */
1305 +#include <stddef.h>
1306 +#include <sys/stat.h>
1307 +#include <kernel_stat.h>
1309 +#include <sysdep.h>
1310 +#include <sys/syscall.h>
1311 +#include <bp-checks.h>
1313 +#include "kernel-features.h"
1315 +#if __ASSUME_STAT64_SYSCALL == 0
1316 +# include <xstatconv.h>
1319 +#ifdef __NR_fstat64
1320 +# if __ASSUME_STAT64_SYSCALL == 0
1321 +/* The variable is shared between all wrappers around *stat64 calls. */
1322 +extern int __have_no_stat64;
1326 +/* Get information about the file FD in BUF. */
1329 +___fxstat64 (int vers, int fd, struct stat64 *buf)
1332 + struct kernel_stat64 kbuf64;
1334 +#if __ASSUME_STAT64_SYSCALL > 0
1335 + result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
1337 + result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1338 +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1339 + if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
1340 + buf->st_ino = buf->__st_ino;
1344 + struct kernel_stat kbuf;
1345 +# if defined __NR_fstat64
1346 + if (! __have_no_stat64)
1348 + int saved_errno = errno;
1349 + result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
1351 + if (result != -1 || errno != ENOSYS)
1354 + result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1355 +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1356 + if (!result && buf->__st_ino != (__ino_t)buf->st_ino)
1357 + buf->st_ino = buf->__st_ino;
1362 + __set_errno (saved_errno);
1363 + __have_no_stat64 = 1;
1366 + result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf));
1368 + result = __xstat64_conv (vers, &kbuf, buf);
1374 +#include <shlib-compat.h>
1376 +#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
1377 +versioned_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
1378 +strong_alias (___fxstat64, __old__fxstat64)
1379 +compat_symbol (libc, __old__fxstat64, __fxstat64, GLIBC_2_1);
1380 +hidden_ver (___fxstat64, __fxstat64)
1382 +strong_alias (___fxstat64, __fxstat64)
1383 +hidden_def (__fxstat64)
1385 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h
1386 ===================================================================
1387 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1388 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h 2005-03-22 11:53:10.056702174 -0500
1390 +/* Copyright (C) 2005 Free Software Foundation, Inc.
1391 + This file is part of the GNU C Library.
1393 + The GNU C Library is free software; you can redistribute it and/or
1394 + modify it under the terms of the GNU Lesser General Public
1395 + License as published by the Free Software Foundation; either
1396 + version 2.1 of the License, or (at your option) any later version.
1398 + The GNU C Library is distributed in the hope that it will be useful,
1399 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1400 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1401 + Lesser General Public License for more details.
1403 + You should have received a copy of the GNU Lesser General Public
1404 + License along with the GNU C Library; if not, write to the Free
1405 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1406 + 02111-1307 USA. */
1408 +#include <sysdeps/unix/sysv/linux/kernel_stat.h>
1410 +/* kernel_stat64 is just like stat64, except packed. The EABI aligns
1411 + st_size to an eight byte boundary but the old ABI only aligns it to
1412 + four. Similarly st_blocks. */
1413 +struct kernel_stat64
1415 + __dev_t st_dev; /* Device. */
1416 + unsigned int __pad1;
1418 + __ino_t __st_ino; /* 32bit file serial number. */
1419 + __mode_t st_mode; /* File mode. */
1420 + __nlink_t st_nlink; /* Link count. */
1421 + __uid_t st_uid; /* User ID of the file's owner. */
1422 + __gid_t st_gid; /* Group ID of the file's group.*/
1423 + __dev_t st_rdev; /* Device number, if device. */
1424 + unsigned int __pad2;
1425 + __off64_t st_size; /* Size of file, in bytes. */
1426 + __blksize_t st_blksize; /* Optimal block size for I/O. */
1428 + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
1430 + /* Nanosecond resolution timestamps are stored in a format
1431 + equivalent to 'struct timespec'. This is the type used
1432 + whenever possible but the Unix namespace rules do not allow the
1433 + identifier 'timespec' to appear in the <sys/stat.h> header.
1434 + Therefore we have to handle the use of this header in strictly
1435 + standard-compliant sources special. */
1436 + struct timespec st_atim; /* Time of last access. */
1437 + struct timespec st_mtim; /* Time of last modification. */
1438 + struct timespec st_ctim; /* Time of last status change. */
1440 + __time_t st_atime; /* Time of last access. */
1441 + unsigned long int st_atimensec; /* Nscecs of last access. */
1442 + __time_t st_mtime; /* Time of last modification. */
1443 + unsigned long int st_mtimensec; /* Nsecs of last modification. */
1444 + __time_t st_ctime; /* Time of last status change. */
1445 + unsigned long int st_ctimensec; /* Nsecs of last status change. */
1447 + __ino64_t st_ino; /* File serial number. */
1448 + } __attribute__ ((packed,aligned(4)));
1449 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c
1450 ===================================================================
1451 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1452 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c 2005-03-22 11:53:10.056702174 -0500
1454 +/* lxstat64 using old-style Unix lstat system call.
1455 + Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
1456 + This file is part of the GNU C Library.
1458 + The GNU C Library is free software; you can redistribute it and/or
1459 + modify it under the terms of the GNU Lesser General Public
1460 + License as published by the Free Software Foundation; either
1461 + version 2.1 of the License, or (at your option) any later version.
1463 + The GNU C Library is distributed in the hope that it will be useful,
1464 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1465 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1466 + Lesser General Public License for more details.
1468 + You should have received a copy of the GNU Lesser General Public
1469 + License along with the GNU C Library; if not, write to the Free
1470 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1471 + 02111-1307 USA. */
1474 +#include <stddef.h>
1475 +#include <sys/stat.h>
1476 +#include <kernel_stat.h>
1478 +#include <sysdep.h>
1479 +#include <sys/syscall.h>
1480 +#include <bp-checks.h>
1482 +#include "kernel-features.h"
1484 +#if __ASSUME_STAT64_SYSCALL == 0
1485 +# include <xstatconv.h>
1488 +#ifdef __NR_lstat64
1489 +# if __ASSUME_STAT64_SYSCALL == 0
1490 +/* The variable is shared between all wrappers around *stat64 calls. */
1491 +extern int __have_no_stat64;
1495 +/* Get information about the file NAME in BUF. */
1497 +___lxstat64 (int vers, const char *name, struct stat64 *buf)
1500 + struct kernel_stat64 kbuf64;
1502 +#ifdef __ASSUME_STAT64_SYSCALL
1503 + result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1505 + result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1506 +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1507 + if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
1508 + buf->st_ino = buf->__st_ino;
1512 + struct kernel_stat kbuf;
1513 +# ifdef __NR_lstat64
1514 + if (! __have_no_stat64)
1516 + int saved_errno = errno;
1517 + result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1519 + if (result != -1 || errno != ENOSYS)
1522 + result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1523 +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1524 + if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
1525 + buf->st_ino = buf->__st_ino;
1530 + __set_errno (saved_errno);
1531 + __have_no_stat64 = 1;
1534 + result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
1536 + result = __xstat64_conv (vers, &kbuf, buf);
1542 +#include <shlib-compat.h>
1544 +#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
1545 +versioned_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
1546 +strong_alias (___lxstat64, __old__lxstat64)
1547 +compat_symbol (libc, __old__lxstat64, __lxstat64, GLIBC_2_1);
1548 +hidden_ver (___lxstat64, __lxstat64)
1550 +strong_alias (___lxstat64, __lxstat64);
1551 +hidden_def (__lxstat64)
1553 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c
1554 ===================================================================
1555 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1556 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c 2005-03-22 11:53:10.056702174 -0500
1559 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c
1560 ===================================================================
1561 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1562 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c 2005-03-22 11:53:10.056702174 -0500
1565 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/semop.c
1566 ===================================================================
1567 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1568 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/semop.c 2005-03-22 11:53:10.056702174 -0500
1570 +/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
1571 + Free Software Foundation, Inc.
1572 + This file is part of the GNU C Library.
1573 + Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
1575 + The GNU C Library is free software; you can redistribute it and/or
1576 + modify it under the terms of the GNU Lesser General Public
1577 + License as published by the Free Software Foundation; either
1578 + version 2.1 of the License, or (at your option) any later version.
1580 + The GNU C Library is distributed in the hope that it will be useful,
1581 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1582 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1583 + Lesser General Public License for more details.
1585 + You should have received a copy of the GNU Lesser General Public
1586 + License along with the GNU C Library; if not, write to the Free
1587 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1588 + 02111-1307 USA. */
1591 +#include <sys/sem.h>
1592 +#include <ipc_priv.h>
1593 +#include <alloca.h>
1594 +#include <sysdep.h>
1595 +#include <sys/syscall.h>
1596 +#include <bp-checks.h>
1598 +struct kernel_sembuf
1600 + unsigned short int sem_num; /* semaphore number */
1601 + short int sem_op; /* semaphore operation */
1602 + short int sem_flg; /* operation flag */
1606 +/* Perform user-defined atomical operation of array of semaphores. */
1609 +semop (semid, sops, nsops)
1611 + struct sembuf *sops;
1614 + struct kernel_sembuf *ksops = alloca (sizeof (sops[0]) * nsops);
1618 + for (i = 0; i < nsops; i++)
1620 + ksops[i].sem_num = sops[i].sem_num;
1621 + ksops[i].sem_op = sops[i].sem_op;
1622 + ksops[i].sem_flg = sops[i].sem_flg;
1625 + result = INLINE_SYSCALL (ipc, 5, IPCOP_semop,
1626 + semid, (int) nsops, 0, CHECK_N (ksops, nsops));
1628 + for (i = 0; i < nsops; i++)
1630 + sops[i].sem_num = ksops[i].sem_num;
1631 + sops[i].sem_op = ksops[i].sem_op;
1632 + sops[i].sem_flg = ksops[i].sem_flg;
1637 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c
1638 ===================================================================
1639 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1640 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c 2005-03-22 11:53:10.057701931 -0500
1642 +/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
1643 + Free Software Foundation, Inc.
1644 + This file is part of the GNU C Library.
1645 + Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
1647 + The GNU C Library is free software; you can redistribute it and/or
1648 + modify it under the terms of the GNU Lesser General Public
1649 + License as published by the Free Software Foundation; either
1650 + version 2.1 of the License, or (at your option) any later version.
1652 + The GNU C Library is distributed in the hope that it will be useful,
1653 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1654 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1655 + Lesser General Public License for more details.
1657 + You should have received a copy of the GNU Lesser General Public
1658 + License along with the GNU C Library; if not, write to the Free
1659 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1660 + 02111-1307 USA. */
1663 +#include <sys/sem.h>
1664 +#include <ipc_priv.h>
1665 +#include <alloca.h>
1666 +#include <sysdep.h>
1667 +#include <sys/syscall.h>
1668 +#include <bp-checks.h>
1670 +struct kernel_sembuf
1672 + unsigned short int sem_num; /* semaphore number */
1673 + short int sem_op; /* semaphore operation */
1674 + short int sem_flg; /* operation flag */
1678 +/* Perform user-defined atomical operation of array of semaphores. */
1681 +semtimedop (semid, sops, nsops, timeout)
1683 + struct sembuf *sops;
1685 + const struct timespec *timeout;
1687 + struct kernel_sembuf *ksops = alloca (sizeof (sops[0]) * nsops);
1691 + for (i = 0; i < nsops; i++)
1693 + ksops[i].sem_num = sops[i].sem_num;
1694 + ksops[i].sem_op = sops[i].sem_op;
1695 + ksops[i].sem_flg = sops[i].sem_flg;
1698 + result = INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop,
1699 + semid, (int) nsops, 0, CHECK_N (sops, nsops),
1702 + for (i = 0; i < nsops; i++)
1704 + sops[i].sem_num = ksops[i].sem_num;
1705 + sops[i].sem_op = ksops[i].sem_op;
1706 + sops[i].sem_flg = ksops[i].sem_flg;
1711 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c
1712 ===================================================================
1713 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1714 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c 2005-03-22 11:53:10.057701931 -0500
1716 +/* Return information about the filesystem on which FILE resides.
1717 + Copyright (C) 1996-2000,2003,2004,2005 Free Software Foundation, Inc.
1718 + This file is part of the GNU C Library.
1720 + The GNU C Library is free software; you can redistribute it and/or
1721 + modify it under the terms of the GNU Lesser General Public
1722 + License as published by the Free Software Foundation; either
1723 + version 2.1 of the License, or (at your option) any later version.
1725 + The GNU C Library is distributed in the hope that it will be useful,
1726 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1727 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1728 + Lesser General Public License for more details.
1730 + You should have received a copy of the GNU Lesser General Public
1731 + License along with the GNU C Library; if not, write to the Free
1732 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1733 + 02111-1307 USA. */
1736 +#include <string.h>
1737 +#include <sys/statfs.h>
1738 +#include <stddef.h>
1739 +#include <sysdep.h>
1742 +# if __ASSUME_STATFS64 == 0
1743 +int __no_statfs64 attribute_hidden;
1746 +/* Return information about the filesystem on which FILE resides. */
1748 +__statfs64 (const char *file, struct statfs64 *buf)
1750 +#ifdef __NR_statfs64
1751 +# if __ASSUME_STATFS64 == 0
1752 + if (! __no_statfs64)
1755 + /* The EABI structure is the same as the old ABI structure, except
1756 + that it has four additional bytes of padding - at the end. We can
1758 + int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf) - 4, buf);
1760 +# if __ASSUME_STATFS64 == 0
1761 + if (result == 0 || errno != ENOSYS)
1765 +# if __ASSUME_STATFS64 == 0
1766 + __no_statfs64 = 1;
1771 +#if __ASSUME_STATFS64 == 0
1772 + struct statfs buf32;
1774 + if (__statfs (file, &buf32) < 0)
1777 + buf->f_type = buf32.f_type;
1778 + buf->f_bsize = buf32.f_bsize;
1779 + buf->f_blocks = buf32.f_blocks;
1780 + buf->f_bfree = buf32.f_bfree;
1781 + buf->f_bavail = buf32.f_bavail;
1782 + buf->f_files = buf32.f_files;
1783 + buf->f_ffree = buf32.f_ffree;
1784 + buf->f_fsid = buf32.f_fsid;
1785 + buf->f_namelen = buf32.f_namelen;
1786 + buf->f_frsize = buf32.f_frsize;
1787 + memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
1792 +weak_alias (__statfs64, statfs64)
1793 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/uname.c
1794 ===================================================================
1795 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1796 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/uname.c 2005-03-22 11:53:10.057701931 -0500
1798 +/* Copyright (C) 2005
1799 + Free Software Foundation, Inc.
1800 + This file is part of the GNU C Library.
1802 + The GNU C Library is free software; you can redistribute it and/or
1803 + modify it under the terms of the GNU Lesser General Public
1804 + License as published by the Free Software Foundation; either
1805 + version 2.1 of the License, or (at your option) any later version.
1807 + The GNU C Library is distributed in the hope that it will be useful,
1808 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1809 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1810 + Lesser General Public License for more details.
1812 + You should have received a copy of the GNU Lesser General Public
1813 + License along with the GNU C Library; if not, write to the Free
1814 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1815 + 02111-1307 USA. */
1818 +#include <sysdep.h>
1819 +#include <sys/syscall.h>
1820 +#include <string.h>
1821 +#include <sys/utsname.h>
1823 +/* The kernel's struct utsname is two bytes larger than a userland struct
1824 + utsname due to the APCS structure size boundary. */
1827 +__uname (struct utsname *__name)
1829 + char buf[sizeof (struct utsname) + 2];
1830 + int result = INLINE_SYSCALL (uname, 1, buf);
1833 + memcpy (__name, buf, sizeof (struct utsname));
1838 +libc_hidden_def (__uname)
1839 +strong_alias (__uname, uname)
1840 +libc_hidden_weak (uname)
1841 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c
1842 ===================================================================
1843 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1844 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c 2005-03-22 11:53:10.058701689 -0500
1846 +/* xstat64 using old-style Unix stat system call.
1847 + Copyright (C) 1991, 1995-2002, 2003, 2005 Free Software Foundation, Inc.
1848 + This file is part of the GNU C Library.
1850 + The GNU C Library is free software; you can redistribute it and/or
1851 + modify it under the terms of the GNU Lesser General Public
1852 + License as published by the Free Software Foundation; either
1853 + version 2.1 of the License, or (at your option) any later version.
1855 + The GNU C Library is distributed in the hope that it will be useful,
1856 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1857 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1858 + Lesser General Public License for more details.
1860 + You should have received a copy of the GNU Lesser General Public
1861 + License along with the GNU C Library; if not, write to the Free
1862 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1863 + 02111-1307 USA. */
1866 +#include <stddef.h>
1867 +#include <sys/stat.h>
1868 +#include <kernel_stat.h>
1870 +#include <sysdep.h>
1871 +#include <sys/syscall.h>
1872 +#include <bp-checks.h>
1874 +#include "kernel-features.h"
1876 +#if __ASSUME_STAT64_SYSCALL == 0
1877 +# include <xstatconv.h>
1881 +# if __ASSUME_STAT64_SYSCALL == 0
1882 +/* The variable is shared between all wrappers around *stat64 calls.
1883 + This is the definition. */
1884 +int __have_no_stat64;
1888 +/* Get information about the file NAME in BUF. */
1891 +___xstat64 (int vers, const char *name, struct stat64 *buf)
1894 + struct kernel_stat64 kbuf64;
1896 +#if __ASSUME_STAT64_SYSCALL > 0
1897 + result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1899 + result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1900 +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1901 + if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
1902 + buf->st_ino = buf->__st_ino;
1906 + struct kernel_stat kbuf;
1907 +# if defined __NR_stat64
1908 + if (! __have_no_stat64)
1910 + int saved_errno = errno;
1911 + result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1913 + if (result != -1 || errno != ENOSYS)
1916 + result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1917 +# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1918 + if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
1919 + buf->st_ino = buf->__st_ino;
1924 + __set_errno (saved_errno);
1925 + __have_no_stat64 = 1;
1929 + result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
1931 + result = __xstat64_conv (vers, &kbuf, buf);
1938 +#include <shlib-compat.h>
1940 +#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
1941 +versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
1942 +strong_alias (___xstat64, __old__xstat64)
1943 +compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1);
1944 +hidden_ver (___xstat64, __xstat64)
1946 +strong_alias (___xstat64, __xstat64)
1947 +hidden_def (__xstat64)
1949 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c
1950 ===================================================================
1951 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1952 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c 2005-03-22 11:53:10.058701689 -0500
1954 +/* Convert between the kernel's `struct stat' format, and libc's.
1955 + Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
1956 + This file is part of the GNU C Library.
1958 + The GNU C Library is free software; you can redistribute it and/or
1959 + modify it under the terms of the GNU Lesser General Public
1960 + License as published by the Free Software Foundation; either
1961 + version 2.1 of the License, or (at your option) any later version.
1963 + The GNU C Library is distributed in the hope that it will be useful,
1964 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1965 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1966 + Lesser General Public License for more details.
1968 + You should have received a copy of the GNU Lesser General Public
1969 + License along with the GNU C Library; if not, write to the Free
1970 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1971 + 02111-1307 USA. */
1974 +#include <sys/stat.h>
1975 +#include <kernel_stat.h>
1977 +#ifdef STAT_IS_KERNEL_STAT
1980 +struct kernel_stat;
1984 +#include <string.h>
1987 +#if !defined __ASSUME_STAT64_SYSCALL || defined XSTAT_IS_XSTAT64
1989 +__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
1993 + case _STAT_VER_KERNEL:
1994 + /* Nothing to do. The struct is in the form the kernel expects.
1995 + We should have short-circuted before we got here, but for
1996 + completeness... */
1997 + *(struct kernel_stat *) ubuf = *kbuf;
2000 + case _STAT_VER_LINUX:
2002 + struct stat *buf = ubuf;
2004 + /* Convert to current kernel version of `struct stat'. */
2005 + buf->st_dev = kbuf->st_dev;
2006 +#ifdef _HAVE_STAT___PAD1
2009 + buf->st_ino = kbuf->st_ino;
2010 + buf->st_mode = kbuf->st_mode;
2011 + buf->st_nlink = kbuf->st_nlink;
2012 + buf->st_uid = kbuf->st_uid;
2013 + buf->st_gid = kbuf->st_gid;
2014 + buf->st_rdev = kbuf->st_rdev;
2015 +#ifdef _HAVE_STAT___PAD2
2018 + buf->st_size = kbuf->st_size;
2019 + buf->st_blksize = kbuf->st_blksize;
2020 + buf->st_blocks = kbuf->st_blocks;
2021 +#ifdef _HAVE_STAT_NSEC
2022 + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2023 + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2024 + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2025 + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2026 + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2027 + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2029 + buf->st_atime = kbuf->st_atime;
2030 + buf->st_mtime = kbuf->st_mtime;
2031 + buf->st_ctime = kbuf->st_ctime;
2033 +#ifdef _HAVE_STAT___UNUSED1
2034 + buf->__unused1 = 0;
2036 +#ifdef _HAVE_STAT___UNUSED2
2037 + buf->__unused2 = 0;
2039 +#ifdef _HAVE_STAT___UNUSED3
2040 + buf->__unused3 = 0;
2042 +#ifdef _HAVE_STAT___UNUSED4
2043 + buf->__unused4 = 0;
2045 +#ifdef _HAVE_STAT___UNUSED5
2046 + buf->__unused5 = 0;
2052 + __set_errno (EINVAL);
2061 +__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
2063 +#ifdef XSTAT_IS_XSTAT64
2064 + return __xstat_conv (vers, kbuf, ubuf);
2068 + case _STAT_VER_LINUX:
2070 + struct stat64 *buf = ubuf;
2072 + /* Convert to current kernel version of `struct stat64'. */
2073 + buf->st_dev = kbuf->st_dev;
2074 +#ifdef _HAVE_STAT64___PAD1
2077 + buf->st_ino = kbuf->st_ino;
2078 +#ifdef _HAVE_STAT64___ST_INO
2079 + buf->__st_ino = kbuf->st_ino;
2081 + buf->st_mode = kbuf->st_mode;
2082 + buf->st_nlink = kbuf->st_nlink;
2083 + buf->st_uid = kbuf->st_uid;
2084 + buf->st_gid = kbuf->st_gid;
2085 + buf->st_rdev = kbuf->st_rdev;
2086 +#ifdef _HAVE_STAT64___PAD2
2089 + buf->st_size = kbuf->st_size;
2090 + buf->st_blksize = kbuf->st_blksize;
2091 + buf->st_blocks = kbuf->st_blocks;
2092 +#ifdef _HAVE_STAT64_NSEC
2093 + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2094 + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2095 + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2096 + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2097 + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2098 + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2100 + buf->st_atime = kbuf->st_atime;
2101 + buf->st_mtime = kbuf->st_mtime;
2102 + buf->st_ctime = kbuf->st_ctime;
2104 +#ifdef _HAVE_STAT64___UNUSED1
2105 + buf->__unused1 = 0;
2107 +#ifdef _HAVE_STAT64___UNUSED2
2108 + buf->__unused2 = 0;
2110 +#ifdef _HAVE_STAT64___UNUSED3
2111 + buf->__unused3 = 0;
2113 +#ifdef _HAVE_STAT64___UNUSED4
2114 + buf->__unused4 = 0;
2116 +#ifdef _HAVE_STAT64___UNUSED5
2117 + buf->__unused5 = 0;
2122 + /* If struct stat64 is different from struct stat then
2123 + _STAT_VER_KERNEL does not make sense. */
2124 + case _STAT_VER_KERNEL:
2126 + __set_errno (EINVAL);
2135 +__xstat32_conv (int vers, void *kbuf_, struct stat *buf)
2137 + struct kernel_stat64 *kbuf = kbuf_;
2141 + case _STAT_VER_LINUX:
2143 + /* Convert current kernel version of `struct stat64' to
2145 + buf->st_dev = kbuf->st_dev;
2146 +#ifdef _HAVE_STAT___PAD1
2149 +#ifdef _HAVE_STAT64___ST_INO
2150 +# if __ASSUME_ST_INO_64_BIT == 0
2151 + if (kbuf->st_ino == 0)
2152 + buf->st_ino = kbuf->__st_ino;
2156 + buf->st_ino = kbuf->st_ino;
2157 + if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
2158 + && buf->st_ino != kbuf->st_ino)
2160 + __set_errno (EOVERFLOW);
2165 + buf->st_ino = kbuf->st_ino;
2166 + if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
2167 + && buf->st_ino != kbuf->st_ino)
2169 + __set_errno (EOVERFLOW);
2173 + buf->st_mode = kbuf->st_mode;
2174 + buf->st_nlink = kbuf->st_nlink;
2175 + buf->st_uid = kbuf->st_uid;
2176 + buf->st_gid = kbuf->st_gid;
2177 + buf->st_rdev = kbuf->st_rdev;
2178 +#ifdef _HAVE_STAT___PAD2
2181 + buf->st_size = kbuf->st_size;
2182 + /* Check for overflow. */
2183 + if (sizeof (buf->st_size) != sizeof (kbuf->st_size)
2184 + && buf->st_size != kbuf->st_size)
2186 + __set_errno (EOVERFLOW);
2189 + buf->st_blksize = kbuf->st_blksize;
2190 + buf->st_blocks = kbuf->st_blocks;
2191 + /* Check for overflow. */
2192 + if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks)
2193 + && buf->st_blocks != kbuf->st_blocks)
2195 + __set_errno (EOVERFLOW);
2198 +#ifdef _HAVE_STAT_NSEC
2199 + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2200 + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2201 + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2202 + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2203 + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2204 + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2206 + buf->st_atime = kbuf->st_atime;
2207 + buf->st_mtime = kbuf->st_mtime;
2208 + buf->st_ctime = kbuf->st_ctime;
2211 +#ifdef _HAVE_STAT___UNUSED1
2212 + buf->__unused1 = 0;
2214 +#ifdef _HAVE_STAT___UNUSED2
2215 + buf->__unused2 = 0;
2217 +#ifdef _HAVE_STAT___UNUSED3
2218 + buf->__unused3 = 0;
2220 +#ifdef _HAVE_STAT___UNUSED4
2221 + buf->__unused4 = 0;
2223 +#ifdef _HAVE_STAT___UNUSED5
2224 + buf->__unused5 = 0;
2229 + /* If struct stat64 is different from struct stat then
2230 + _STAT_VER_KERNEL does not make sense. */
2231 + case _STAT_VER_KERNEL:
2233 + __set_errno (EINVAL);
2241 +__xstat64_kernel64_conv (int vers, void *kbuf_, struct stat64 *buf)
2243 + struct kernel_stat64 *kbuf = kbuf_;
2247 + case _STAT_VER_LINUX:
2249 + /* Convert current kernel version of `struct stat64' to
2250 + user version of `struct stat64'. */
2251 + buf->st_dev = kbuf->st_dev;
2252 +#ifdef _HAVE_STAT64___PAD1
2253 + buf->__pad1 = kbuf->__pad1;
2255 +#ifdef _HAVE_STAT64___ST_INO
2256 + buf->__st_ino = kbuf->__st_ino;
2258 + buf->st_mode = kbuf->st_mode;
2259 + buf->st_nlink = kbuf->st_nlink;
2260 + buf->st_uid = kbuf->st_uid;
2261 + buf->st_gid = kbuf->st_gid;
2262 + buf->st_rdev = kbuf->st_rdev;
2263 +#ifdef _HAVE_STAT64___PAD2
2264 + buf->__pad2 = kbuf->__pad2;
2266 + buf->st_size = kbuf->st_size;
2267 + buf->st_blksize = kbuf->st_blksize;
2268 + buf->st_blocks = kbuf->st_blocks;
2269 +#ifdef _HAVE_STAT64_NSEC
2270 + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2271 + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2272 + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2273 + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2274 + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2275 + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2277 + buf->st_atime = kbuf->st_atime;
2278 + buf->st_mtime = kbuf->st_mtime;
2279 + buf->st_ctime = kbuf->st_ctime;
2281 + buf->st_ino = kbuf->st_ino;
2285 + case _STAT_VER_KERNEL:
2287 + __set_errno (EINVAL);
2295 Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h
2296 ===================================================================
2297 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
2298 +++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h 2005-03-22 11:53:10.058701689 -0500
2300 +/* Convert between the kernel's `struct stat' format, and libc's.
2301 + Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
2302 + This file is part of the GNU C Library.
2304 + The GNU C Library is free software; you can redistribute it and/or
2305 + modify it under the terms of the GNU Lesser General Public
2306 + License as published by the Free Software Foundation; either
2307 + version 2.1 of the License, or (at your option) any later version.
2309 + The GNU C Library is distributed in the hope that it will be useful,
2310 + but WITHOUT ANY WARRANTY; without even the implied warranty of
2311 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2312 + Lesser General Public License for more details.
2314 + You should have received a copy of the GNU Lesser General Public
2315 + License along with the GNU C Library; if not, write to the Free
2316 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2317 + 02111-1307 USA. */
2319 +#include "kernel-features.h"
2321 +#ifndef STAT_IS_KERNEL_STAT
2322 +extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
2323 +extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
2325 +extern int __xstat32_conv (int vers, void *kbuf, struct stat *buf);
2326 +extern int __xstat64_kernel64_conv (int vers, struct kernel_stat64 *kbuf,
2327 + struct stat64 *buf);
2328 Index: glibc/sysdeps/arm/eabi/fpu/fraiseexcpt.c
2329 ===================================================================
2330 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
2331 +++ glibc/sysdeps/arm/eabi/fpu/fraiseexcpt.c 2005-03-22 12:34:55.522464918 -0500
2333 +/* Raise given exceptions.
2334 + Copyright (C) 2004 Free Software Foundation, Inc.
2335 + This file is part of the GNU C Library.
2337 + The GNU C Library is free software; you can redistribute it and/or
2338 + modify it under the terms of the GNU Lesser General Public
2339 + License as published by the Free Software Foundation; either
2340 + version 2.1 of the License, or (at your option) any later version.
2342 + The GNU C Library is distributed in the hope that it will be useful,
2343 + but WITHOUT ANY WARRANTY; without even the implied warranty of
2344 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2345 + Lesser General Public License for more details.
2347 + You should have received a copy of the GNU Lesser General Public
2348 + License along with the GNU C Library; if not, write to the Free
2349 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2350 + 02111-1307 USA. */
2352 +#include <fpu_control.h>
2357 +feraiseexcept (int excepts)
2362 + /* Raise exceptions represented by EXPECTS. But we must raise only
2363 + one signal at a time. It is important that if the overflow/underflow
2364 + exception and the inexact exception are given at the same time,
2365 + the overflow/underflow exception follows the inexact exception. After
2366 + each exception we read from the fpscr, to force the exception to be
2367 + raised immediately. */
2369 + /* First: invalid exception. */
2370 + if (FE_INVALID & excepts)
2371 + __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2372 + : "=w" (dummy), "=r" (fpscr) : "w" (0.0f), "w" (0.0f) );
2374 + /* Next: division by zero. */
2375 + if (FE_DIVBYZERO & excepts)
2376 + __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2377 + : "=w" (dummy), "=r" (fpscr) : "w" (1.0f), "w" (0.0f) );
2379 + /* Next: overflow. */
2380 + if (FE_OVERFLOW & excepts)
2381 + /* There's no way to raise overflow without also raising inexact. */
2382 + __asm__ __volatile__ ("fadds %0,%2,%3\n\tfmrx %1, fpscr"
2383 + : "=w" (dummy), "=r" (fpscr) : "w" (FLT_MAX), "w" (1.0e32f) );
2385 + /* Next: underflow. */
2386 + if (FE_UNDERFLOW & excepts)
2387 + __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2388 + : "=w" (dummy), "=r" (fpscr) : "w" (FLT_MIN), "w" (3.0f) );
2390 + /* Last: inexact. */
2391 + if (FE_INEXACT & excepts)
2392 + __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2393 + : "=w" (dummy), "=r" (fpscr) : "w" (2.0f), "w" (3.0f) );
2399 +libm_hidden_def (feraiseexcept)
2400 Index: glibc/sysdeps/arm/eabi/fpu/feholdexcpt.c
2401 ===================================================================
2402 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
2403 +++ glibc/sysdeps/arm/eabi/fpu/feholdexcpt.c 2005-03-22 12:34:55.521465156 -0500
2405 +/* Store current floating-point environment and clear exceptions.
2406 + Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
2407 + This file is part of the GNU C Library.
2409 + The GNU C Library is free software; you can redistribute it and/or
2410 + modify it under the terms of the GNU Lesser General Public
2411 + License as published by the Free Software Foundation; either
2412 + version 2.1 of the License, or (at your option) any later version.
2414 + The GNU C Library is distributed in the hope that it will be useful,
2415 + but WITHOUT ANY WARRANTY; without even the implied warranty of
2416 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2417 + Lesser General Public License for more details.
2419 + You should have received a copy of the GNU Lesser General Public
2420 + License along with the GNU C Library; if not, write to the Free
2421 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2422 + 02111-1307 USA. */
2425 +#include <fpu_control.h>
2428 +feholdexcept (fenv_t *envp)
2430 + unsigned long int temp;
2432 + /* Store the environment. */
2434 + envp->__cw = temp;
2436 + /* Now set all exceptions to non-stop. */
2437 + temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
2439 + /* And clear all exception flags. */
2440 + temp &= ~FE_ALL_EXCEPT;