From a334319f6530564d22e775935d9c91663623a1b4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 22 Dec 2004 20:10:10 +0000 Subject: (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. --- sysdeps/arm/bits/endian.h | 12 ++++++++++ sysdeps/arm/bits/huge_val.h | 56 +++++++++++++++++++++++++++++++++++++++++++++ sysdeps/arm/bits/link.h | 4 ++++ sysdeps/arm/bits/setjmp.h | 36 +++++++++++++++++++++++++++++ sysdeps/arm/bits/string.h | 31 +++++++++++++++++++++++++ 5 files changed, 139 insertions(+) create mode 100644 sysdeps/arm/bits/endian.h create mode 100644 sysdeps/arm/bits/huge_val.h create mode 100644 sysdeps/arm/bits/link.h create mode 100644 sysdeps/arm/bits/setjmp.h create mode 100644 sysdeps/arm/bits/string.h (limited to 'sysdeps/arm/bits') diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h new file mode 100644 index 0000000000..5e54cc7534 --- /dev/null +++ b/sysdeps/arm/bits/endian.h @@ -0,0 +1,12 @@ +/* ARM is (usually) little-endian but with a big-endian FPU. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#ifdef __ARMEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif +#define __FLOAT_WORD_ORDER __BIG_ENDIAN diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h new file mode 100644 index 0000000000..3339a0d01c --- /dev/null +++ b/sysdeps/arm/bits/huge_val.h @@ -0,0 +1,56 @@ +/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity). + Used by and functions for overflow. + ARM version. + Copyright (C) 1992, 95, 96, 97, 98, 99, 2000, 2004 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _MATH_H +# error "Never use directly; include instead." +#endif + +/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ + +#if __GNUC_PREREQ(3,3) +# define HUGE_VAL (__builtin_huge_val()) +#elif __GNUC_PREREQ(2,96) +# define HUGE_VAL (__extension__ 0x1.0p2047) +#elif defined __GNUC__ + +# define HUGE_VAL \ + (__extension__ \ + ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ + { __l: 0x000000007ff00000ULL }).__d) + +#else /* not GCC */ + +# include + +typedef union { unsigned char __c[8]; double __d; } __huge_val_t; + +# if __BYTE_ORDER == __BIG_ENDIAN +# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0x7f, 0xf0, 0, 0 } +# endif +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define __HUGE_VAL_bytes { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 } +# endif + +static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; +# define HUGE_VAL (__huge_val.__d) + +#endif /* GCC. */ diff --git a/sysdeps/arm/bits/link.h b/sysdeps/arm/bits/link.h new file mode 100644 index 0000000000..648976d7d2 --- /dev/null +++ b/sysdeps/arm/bits/link.h @@ -0,0 +1,4 @@ +struct link_map_machine + { + Elf32_Addr plt; /* Address of .plt */ + }; diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h new file mode 100644 index 0000000000..e0a4657b47 --- /dev/null +++ b/sysdeps/arm/bits/setjmp.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* Define the machine-dependent type `jmp_buf'. ARM version. */ + +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + +#ifndef _ASM +/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not + saved. */ +typedef int __jmp_buf[10]; +#endif + +#define __JMP_BUF_SP 8 + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) diff --git a/sysdeps/arm/bits/string.h b/sysdeps/arm/bits/string.h new file mode 100644 index 0000000000..206f956dfd --- /dev/null +++ b/sysdeps/arm/bits/string.h @@ -0,0 +1,31 @@ +/* Optimized, inlined string functions. ARM version. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _STRING_H +# error "Never use directly; include instead." +#endif + +/* We must defeat the generic optimized versions of these functions in + since they don't work on the ARM. This is because + the games they play with the __STRING2_COPY_ARR# structures fail + when structs are always 32-bit aligned. + XXX Should provide suitably optimal replacements. */ +#define _HAVE_STRING_ARCH_strcpy 1 +#define _HAVE_STRING_ARCH_stpcpy 1 +#define _HAVE_STRING_ARCH_mempcpy 1 -- cgit v1.2.3