diff options
Diffstat (limited to 'REORG.TODO/sysdeps/aarch64/bits')
-rw-r--r-- | REORG.TODO/sysdeps/aarch64/bits/endian.h | 30 | ||||
-rw-r--r-- | REORG.TODO/sysdeps/aarch64/bits/fenv.h | 82 | ||||
-rw-r--r-- | REORG.TODO/sysdeps/aarch64/bits/fp-fast.h | 34 | ||||
-rw-r--r-- | REORG.TODO/sysdeps/aarch64/bits/link.h | 60 | ||||
-rw-r--r-- | REORG.TODO/sysdeps/aarch64/bits/setjmp.h | 33 | ||||
-rw-r--r-- | REORG.TODO/sysdeps/aarch64/bits/string.h | 24 | ||||
-rw-r--r-- | REORG.TODO/sysdeps/aarch64/bits/wordsize.h | 28 |
7 files changed, 291 insertions, 0 deletions
diff --git a/REORG.TODO/sysdeps/aarch64/bits/endian.h b/REORG.TODO/sysdeps/aarch64/bits/endian.h new file mode 100644 index 0000000000..e86b988355 --- /dev/null +++ b/REORG.TODO/sysdeps/aarch64/bits/endian.h @@ -0,0 +1,30 @@ +/* Copyright (C) 1997-2017 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, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _ENDIAN_H +# error "Never use <bits/endian.h> directly; include <endian.h> instead." +#endif + +/* AArch64 can be either big or little endian. */ +#ifdef __AARCH64EB__ +# define __BYTE_ORDER __BIG_ENDIAN +#else +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#define __FLOAT_WORD_ORDER __BYTE_ORDER diff --git a/REORG.TODO/sysdeps/aarch64/bits/fenv.h b/REORG.TODO/sysdeps/aarch64/bits/fenv.h new file mode 100644 index 0000000000..23177d7c60 --- /dev/null +++ b/REORG.TODO/sysdeps/aarch64/bits/fenv.h @@ -0,0 +1,82 @@ +/* Copyright (C) 2004-2017 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, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _FENV_H +# error "Never use <bits/fenv.h> directly; include <fenv.h> instead." +#endif + +/* Define bits representing exceptions in the FPSR status word. */ +enum + { + FE_INVALID = +#define FE_INVALID 1 + FE_INVALID, + FE_DIVBYZERO = +#define FE_DIVBYZERO 2 + FE_DIVBYZERO, + FE_OVERFLOW = +#define FE_OVERFLOW 4 + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW 8 + FE_UNDERFLOW, + FE_INEXACT = +#define FE_INEXACT 16 + FE_INEXACT, + }; + +/* Amount to shift by to convert an exception bit in FPSR to a an + exception bit mask in FPCR. */ +#define FE_EXCEPT_SHIFT 8 + +/* All supported exceptions. */ +#define FE_ALL_EXCEPT \ + (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) + +/* Define bits representing rounding modes in the FPCR Rmode field. */ +#define FE_TONEAREST 0x000000 +#define FE_UPWARD 0x400000 +#define FE_DOWNWARD 0x800000 +#define FE_TOWARDZERO 0xc00000 + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. */ +typedef struct + { + unsigned int __fpcr; + unsigned int __fpsr; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1l) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif diff --git a/REORG.TODO/sysdeps/aarch64/bits/fp-fast.h b/REORG.TODO/sysdeps/aarch64/bits/fp-fast.h new file mode 100644 index 0000000000..01a00c8e0c --- /dev/null +++ b/REORG.TODO/sysdeps/aarch64/bits/fp-fast.h @@ -0,0 +1,34 @@ +/* Define FP_FAST_* macros. AArch64 version. + Copyright (C) 2016-2017 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, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _MATH_H +# error "Never use <bits/fp-fast.h> directly; include <math.h> instead." +#endif + +#ifdef __USE_ISOC99 + +/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} + builtins are supported. */ +# define FP_FAST_FMA 1 +# define FP_FAST_FMAF 1 + +# ifdef __FP_FAST_FMAL +# define FP_FAST_FMAL 1 +# endif + +#endif diff --git a/REORG.TODO/sysdeps/aarch64/bits/link.h b/REORG.TODO/sysdeps/aarch64/bits/link.h new file mode 100644 index 0000000000..a8829df4a0 --- /dev/null +++ b/REORG.TODO/sysdeps/aarch64/bits/link.h @@ -0,0 +1,60 @@ +/* Copyright (C) 2005-2017 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, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _LINK_H +# error "Never include <bits/link.h> directly; use <link.h> instead." +#endif + +/* Registers for entry into PLT on AArch64. */ +typedef struct La_aarch64_regs +{ + uint64_t lr_xreg[8]; + uint64_t lr_dreg[8]; + uint64_t lr_sp; + uint64_t lr_lr; +} La_aarch64_regs; + +/* Return values for calls from PLT on AArch64. */ +typedef struct La_aarch64_retval +{ + /* Up to two integer registers can be used for a return value. */ + uint64_t lrv_xreg[2]; + /* Up to four D registers can be used for a return value. */ + uint64_t lrv_dreg[4]; + +} La_aarch64_retval; +__BEGIN_DECLS + +extern ElfW(Addr) +la_aarch64_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_aarch64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); + +extern unsigned int +la_aarch64_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_aarch64_regs *__inregs, + La_aarch64_retval *__outregs, + const char *__symname); + +__END_DECLS diff --git a/REORG.TODO/sysdeps/aarch64/bits/setjmp.h b/REORG.TODO/sysdeps/aarch64/bits/setjmp.h new file mode 100644 index 0000000000..f8d15ad399 --- /dev/null +++ b/REORG.TODO/sysdeps/aarch64/bits/setjmp.h @@ -0,0 +1,33 @@ +/* Copyright (C) 1997-2017 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, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." +#endif + +#ifndef _ASM +/* Jump buffer contains: + x19-x28, x29(fp), x30(lr), (x31)sp, d8-d15. Other registers are not + saved. */ +__extension__ typedef unsigned long long __jmp_buf [22]; + +#endif +#endif diff --git a/REORG.TODO/sysdeps/aarch64/bits/string.h b/REORG.TODO/sysdeps/aarch64/bits/string.h new file mode 100644 index 0000000000..295eeb7be9 --- /dev/null +++ b/REORG.TODO/sysdeps/aarch64/bits/string.h @@ -0,0 +1,24 @@ +/* Optimized, inlined string functions. AArch64 version. + Copyright (C) 2015-2017 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, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _STRING_H +# error "Never use <bits/string.h> directly; include <string.h> instead." +#endif + +/* AArch64 uses the aligned string inline ABI. */ +#define _STRING_INLINE_unaligned 0 diff --git a/REORG.TODO/sysdeps/aarch64/bits/wordsize.h b/REORG.TODO/sysdeps/aarch64/bits/wordsize.h new file mode 100644 index 0000000000..ad53d699ca --- /dev/null +++ b/REORG.TODO/sysdeps/aarch64/bits/wordsize.h @@ -0,0 +1,28 @@ +/* Determine the wordsize from the preprocessor defines. + + Copyright (C) 2016-2017 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, see + <http://www.gnu.org/licenses/>. */ + +#ifdef __LP64__ +# define __WORDSIZE 64 +#else +# define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_PTRDIFF_LONG 1 +#endif + +#define __WORDSIZE_TIME64_COMPAT32 0 |