diff options
Diffstat (limited to 'libc/sysdeps/linux/arm/bits')
| -rw-r--r-- | libc/sysdeps/linux/arm/bits/elf-fdpic.h | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/arm/bits/fcntl.h | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/arm/bits/fenv.h | 107 | ||||
| -rw-r--r-- | libc/sysdeps/linux/arm/bits/hwcap.h | 50 | ||||
| -rw-r--r-- | libc/sysdeps/linux/arm/bits/kernel_stat.h | 1 | ||||
| -rw-r--r-- | libc/sysdeps/linux/arm/bits/shm.h | 6 | ||||
| -rw-r--r-- | libc/sysdeps/linux/arm/bits/uClibc_arch_features.h | 3 | 
7 files changed, 107 insertions, 64 deletions
| diff --git a/libc/sysdeps/linux/arm/bits/elf-fdpic.h b/libc/sysdeps/linux/arm/bits/elf-fdpic.h index 3d6db54af..f2ef9aeca 100644 --- a/libc/sysdeps/linux/arm/bits/elf-fdpic.h +++ b/libc/sysdeps/linux/arm/bits/elf-fdpic.h @@ -91,7 +91,7 @@ __reloc_pointer (void *p,        /* This should be computed as part of the pointer comparison  	 above, but we want to use the carry in the comparison, so we  	 can't convert it to an integer type beforehand.  */ -      unsigned long offset = p - (void*)map->segs[c].p_vaddr; +      unsigned long offset = (char*)p - (char*)map->segs[c].p_vaddr;        /* We only check for one-past-the-end for the last segment,  	 assumed to be the data segment, because other cases are  	 ambiguous in the absence of padding between segments, and diff --git a/libc/sysdeps/linux/arm/bits/fcntl.h b/libc/sysdeps/linux/arm/bits/fcntl.h index 823660648..52dee4287 100644 --- a/libc/sysdeps/linux/arm/bits/fcntl.h +++ b/libc/sysdeps/linux/arm/bits/fcntl.h @@ -244,3 +244,5 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,  #endif  __END_DECLS +/* Include generic Linux declarations.  */ +#include <bits/fcntl-linux.h> diff --git a/libc/sysdeps/linux/arm/bits/fenv.h b/libc/sysdeps/linux/arm/bits/fenv.h index 106bf36c2..ab60b9e70 100644 --- a/libc/sysdeps/linux/arm/bits/fenv.h +++ b/libc/sysdeps/linux/arm/bits/fenv.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. -   This file is part of the GNU C Library. +/* Copyright (C) 2004-2025 Free Software Foundation, Inc.     The GNU C Library is free software; you can redistribute it and/or     modify it under the terms of the GNU Lesser General Public @@ -12,87 +11,77 @@     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/>.  */ +   License along with the GNU C Library.  If not, see +   <https://www.gnu.org/licenses/>.  */  #ifndef _FENV_H  # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."  #endif -#ifdef __MAVERICK__ -  /* Define bits representing exceptions in the FPU status word.  */  enum    { -    FE_INVALID = 1, -#define FE_INVALID FE_INVALID -    FE_OVERFLOW = 4, -#define FE_OVERFLOW FE_OVERFLOW -    FE_UNDERFLOW = 8, -#define FE_UNDERFLOW FE_UNDERFLOW -    FE_INEXACT = 16, -#define FE_INEXACT FE_INEXACT +    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 to a mask bit.  */ -#define FE_EXCEPT_SHIFT    5 +#define FE_EXCEPT_SHIFT	8  /* All supported exceptions.  */ -#define FE_ALL_EXCEPT  \ -	(FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) - -/* IEEE rounding modes.  */ -enum -  { -    FE_TONEAREST = 0, -#define FE_TONEAREST    FE_TONEAREST -    FE_TOWARDZERO = 0x400, -#define FE_TOWARDZERO   FE_TOWARDZERO -    FE_DOWNWARD = 0x800, -#define FE_DOWNWARD     FE_DOWNWARD -    FE_UPWARD = 0xc00, -#define FE_UPWARD       FE_UPWARD -  }; - -#define FE_ROUND_MASK (FE_UPWARD) - -#else /* !__MAVERICK__ */ +#define FE_ALL_EXCEPT	\ +	(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) -/* Define bits representing exceptions in the FPU status word.  */ +/* VFP supports all of the four defined rounding modes.  */  enum    { -    FE_INVALID = 1, -#define FE_INVALID FE_INVALID -    FE_DIVBYZERO = 2, -#define FE_DIVBYZERO FE_DIVBYZERO -    FE_OVERFLOW = 4, -#define FE_OVERFLOW FE_OVERFLOW -    FE_UNDERFLOW = 8, -#define FE_UNDERFLOW FE_UNDERFLOW -  }; - -/* Amount to shift by to convert an exception to a mask bit.  */ -#define FE_EXCEPT_SHIFT	16 - -/* All supported exceptions.  */ -#define FE_ALL_EXCEPT	\ -	(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) - -/* The ARM FPU basically only supports round-to-nearest.  Other rounding -   modes exist, but you have to encode them in the actual instruction.  */ +    FE_TONEAREST =  #define FE_TONEAREST	0 - -#endif /* __MAVERICK__ */ +      FE_TONEAREST, +    FE_UPWARD = +#define FE_UPWARD	0x400000 +      FE_UPWARD, +    FE_DOWNWARD = +#define FE_DOWNWARD	0x800000 +      FE_DOWNWARD, +    FE_TOWARDZERO = +#define FE_TOWARDZERO	0xc00000 +      FE_TOWARDZERO +  };  /* Type representing exception flags. */ -typedef unsigned long int fexcept_t; +typedef unsigned int fexcept_t;  /* Type representing floating-point environment.  */  typedef struct    { -    unsigned long int __cw; +    unsigned int __cw;    }  fenv_t;  /* If the default argument is used we use this value.  */ -#define FE_DFL_ENV	((fenv_t *) -1l) +#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 + +/* Type representing floating-point control modes.  */ +typedef unsigned int femode_t; + +/* Default floating-point control modes.  */ +# define FE_DFL_MODE	((const femode_t *) -1L) diff --git a/libc/sysdeps/linux/arm/bits/hwcap.h b/libc/sysdeps/linux/arm/bits/hwcap.h new file mode 100644 index 000000000..0a741b469 --- /dev/null +++ b/libc/sysdeps/linux/arm/bits/hwcap.h @@ -0,0 +1,50 @@ +/* Defines for bits in AT_HWCAP.  ARM Linux version. +   Copyright (C) 2012-2023 Free Software Foundation, Inc. + +   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 +   <https://www.gnu.org/licenses/>.  */ + +#if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H) +# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." +#endif + +/* The following must match the kernel's <asm/hwcap.h>.  */ +#define HWCAP_ARM_SWP		1 +#define HWCAP_ARM_HALF		2 +#define HWCAP_ARM_THUMB		4 +#define HWCAP_ARM_26BIT		8 +#define HWCAP_ARM_FAST_MULT	16 +#define HWCAP_ARM_FPA		32 +#define HWCAP_ARM_VFP		64 +#define HWCAP_ARM_EDSP		128 +#define HWCAP_ARM_JAVA		256 +#define HWCAP_ARM_IWMMXT	512 +#define HWCAP_ARM_CRUNCH	1024 +#define HWCAP_ARM_THUMBEE	2048 +#define HWCAP_ARM_NEON		4096 +#define HWCAP_ARM_VFPv3		8192 +#define HWCAP_ARM_VFPv3D16	16384 +#define HWCAP_ARM_TLS		32768 +#define HWCAP_ARM_VFPv4		65536 +#define HWCAP_ARM_IDIVA		131072 +#define HWCAP_ARM_IDIVT		262144 +#define HWCAP_ARM_VFPD32	524288 +#define HWCAP_ARM_LPAE		1048576 +#define HWCAP_ARM_EVTSTRM	2097152 +#define HWCAP_FPHP		4194304 +#define HWCAP_ASIMDHP		8388608 +#define HWCAP_ASIMDDP		16777216 +#define HWCAP_ASIMDFHM		33554432 +#define HWCAP_ASIMDBF16		67108864 +#define HWCAP_I8MM		134217728 diff --git a/libc/sysdeps/linux/arm/bits/kernel_stat.h b/libc/sysdeps/linux/arm/bits/kernel_stat.h index b293dfc05..cdbeeb4de 100644 --- a/libc/sysdeps/linux/arm/bits/kernel_stat.h +++ b/libc/sysdeps/linux/arm/bits/kernel_stat.h @@ -50,7 +50,6 @@ struct kernel_stat64 {  	long long          st_size;  	unsigned long      st_blksize;  	unsigned long long st_blocks;  /* Number 512-byte blocks allocated. */ -  	struct timespec    st_atim;  	struct timespec    st_mtim;  	struct timespec    st_ctim; diff --git a/libc/sysdeps/linux/arm/bits/shm.h b/libc/sysdeps/linux/arm/bits/shm.h index 86245faff..aa1a72e54 100644 --- a/libc/sysdeps/linux/arm/bits/shm.h +++ b/libc/sysdeps/linux/arm/bits/shm.h @@ -49,12 +49,18 @@ struct shmid_ds    {      struct ipc_perm shm_perm;		/* operation permission struct */      size_t shm_segsz;			/* size of segment in bytes */ +#if defined(__UCLIBC_USE_TIME64__) +    __time_t shm_atime; +    __time_t shm_dtime; +    __time_t shm_ctime; +#else      __time_t shm_atime;			/* time of last shmat() */      unsigned long int __uclibc_unused1;      __time_t shm_dtime;			/* time of last shmdt() */      unsigned long int __uclibc_unused2;      __time_t shm_ctime;			/* time of last change by shmctl() */      unsigned long int __uclibc_unused3; +#endif      __pid_t shm_cpid;			/* pid of creator */      __pid_t shm_lpid;			/* pid of last shmop */      shmatt_t shm_nattch;		/* number of current attaches */ diff --git a/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h b/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h index b0b093c99..671afd3ac 100644 --- a/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h @@ -11,9 +11,6 @@  /* can your target use syscall6() for mmap ? */  #undef __UCLIBC_MMAP_HAS_6_ARGS__ -/* does your target use statx */ -#undef __UCLIBC_HAVE_STATX__ -  /* does your target align 64bit values in register pairs ? (32bit arches only) */  #ifdef __ARM_EABI__  #define __UCLIBC_SYSCALL_ALIGN_64BIT__ | 
