mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
libc: Merge header directories for glibc and NetBSD libc where applicable.
Manual patches:
* lib/libc/include/csky-linux-gnu/gnu/{lib-names,stubs}.h
* lib/libc/include/powerpc-linux-gnu/bits/long-double.h
Takes lib/libc/include from 115.5 MB to 113.4 MB.
Closes #21258.
This commit is contained in:
parent
7c7627b18a
commit
63a9048baf
@ -1,15 +0,0 @@
|
||||
#ifndef _BITS_ENDIANNESS_H
|
||||
#define _BITS_ENDIANNESS_H 1
|
||||
|
||||
#ifndef _BITS_ENDIAN_H
|
||||
# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
|
||||
#endif
|
||||
|
||||
/* AArch64 has selectable endianness. */
|
||||
#ifdef __AARCH64EB__
|
||||
# define __BYTE_ORDER __BIG_ENDIAN
|
||||
#else
|
||||
# define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#endif /* bits/endianness.h */
|
||||
@ -1,61 +0,0 @@
|
||||
/* O_*, F_*, FD_* bit values for the AArch64 Linux ABI.
|
||||
Copyright (C) 2011-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _FCNTL_H
|
||||
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
|
||||
#endif
|
||||
|
||||
#define __O_DIRECTORY 040000
|
||||
#define __O_NOFOLLOW 0100000
|
||||
#define __O_DIRECT 0200000
|
||||
|
||||
#ifdef __ILP32__
|
||||
# define __O_LARGEFILE 0400000
|
||||
#else
|
||||
# define __O_LARGEFILE 0
|
||||
#endif
|
||||
|
||||
#ifdef __LP64__
|
||||
# define F_GETLK64 5
|
||||
# define F_SETLK64 6
|
||||
# define F_SETLKW64 7
|
||||
#endif
|
||||
|
||||
struct flock
|
||||
{
|
||||
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
|
||||
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
|
||||
__off_t l_start; /* Offset where the lock begins. */
|
||||
__off_t l_len; /* Size of the locked area; zero means until EOF. */
|
||||
__pid_t l_pid; /* Process holding the lock. */
|
||||
};
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct flock64
|
||||
{
|
||||
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
|
||||
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
|
||||
__off64_t l_start; /* Offset where the lock begins. */
|
||||
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
|
||||
__pid_t l_pid; /* Process holding the lock. */
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Include generic Linux declarations. */
|
||||
#include <bits/fcntl-linux.h>
|
||||
@ -1,82 +0,0 @@
|
||||
/* Copyright (C) 2004-2025 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
|
||||
<https://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_C23)
|
||||
/* 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
|
||||
@ -1,34 +0,0 @@
|
||||
/* Define FP_FAST_* macros. AArch64 version.
|
||||
Copyright (C) 2016-2025 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
|
||||
<https://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
|
||||
122
lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h
vendored
122
lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h
vendored
@ -1,122 +0,0 @@
|
||||
/* Defines for bits in AT_HWCAP. AArch64 Linux version.
|
||||
Copyright (C) 2016-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#if !defined (_SYS_AUXV_H)
|
||||
# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
|
||||
#endif
|
||||
|
||||
/* The following must match the kernel's <asm/hwcap.h> and update the
|
||||
list together with sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c. */
|
||||
#define HWCAP_FP (1 << 0)
|
||||
#define HWCAP_ASIMD (1 << 1)
|
||||
#define HWCAP_EVTSTRM (1 << 2)
|
||||
#define HWCAP_AES (1 << 3)
|
||||
#define HWCAP_PMULL (1 << 4)
|
||||
#define HWCAP_SHA1 (1 << 5)
|
||||
#define HWCAP_SHA2 (1 << 6)
|
||||
#define HWCAP_CRC32 (1 << 7)
|
||||
#define HWCAP_ATOMICS (1 << 8)
|
||||
#define HWCAP_FPHP (1 << 9)
|
||||
#define HWCAP_ASIMDHP (1 << 10)
|
||||
#define HWCAP_CPUID (1 << 11)
|
||||
#define HWCAP_ASIMDRDM (1 << 12)
|
||||
#define HWCAP_JSCVT (1 << 13)
|
||||
#define HWCAP_FCMA (1 << 14)
|
||||
#define HWCAP_LRCPC (1 << 15)
|
||||
#define HWCAP_DCPOP (1 << 16)
|
||||
#define HWCAP_SHA3 (1 << 17)
|
||||
#define HWCAP_SM3 (1 << 18)
|
||||
#define HWCAP_SM4 (1 << 19)
|
||||
#define HWCAP_ASIMDDP (1 << 20)
|
||||
#define HWCAP_SHA512 (1 << 21)
|
||||
#define HWCAP_SVE (1 << 22)
|
||||
#define HWCAP_ASIMDFHM (1 << 23)
|
||||
#define HWCAP_DIT (1 << 24)
|
||||
#define HWCAP_USCAT (1 << 25)
|
||||
#define HWCAP_ILRCPC (1 << 26)
|
||||
#define HWCAP_FLAGM (1 << 27)
|
||||
#define HWCAP_SSBS (1 << 28)
|
||||
#define HWCAP_SB (1 << 29)
|
||||
#define HWCAP_PACA (1 << 30)
|
||||
#define HWCAP_PACG (1UL << 31)
|
||||
#define HWCAP_GCS (1UL << 32)
|
||||
|
||||
#define HWCAP2_DCPODP (1 << 0)
|
||||
#define HWCAP2_SVE2 (1 << 1)
|
||||
#define HWCAP2_SVEAES (1 << 2)
|
||||
#define HWCAP2_SVEPMULL (1 << 3)
|
||||
#define HWCAP2_SVEBITPERM (1 << 4)
|
||||
#define HWCAP2_SVESHA3 (1 << 5)
|
||||
#define HWCAP2_SVESM4 (1 << 6)
|
||||
#define HWCAP2_FLAGM2 (1 << 7)
|
||||
#define HWCAP2_FRINT (1 << 8)
|
||||
#define HWCAP2_SVEI8MM (1 << 9)
|
||||
#define HWCAP2_SVEF32MM (1 << 10)
|
||||
#define HWCAP2_SVEF64MM (1 << 11)
|
||||
#define HWCAP2_SVEBF16 (1 << 12)
|
||||
#define HWCAP2_I8MM (1 << 13)
|
||||
#define HWCAP2_BF16 (1 << 14)
|
||||
#define HWCAP2_DGH (1 << 15)
|
||||
#define HWCAP2_RNG (1 << 16)
|
||||
#define HWCAP2_BTI (1 << 17)
|
||||
#define HWCAP2_MTE (1 << 18)
|
||||
#define HWCAP2_ECV (1 << 19)
|
||||
#define HWCAP2_AFP (1 << 20)
|
||||
#define HWCAP2_RPRES (1 << 21)
|
||||
#define HWCAP2_MTE3 (1 << 22)
|
||||
#define HWCAP2_SME (1 << 23)
|
||||
#define HWCAP2_SME_I16I64 (1 << 24)
|
||||
#define HWCAP2_SME_F64F64 (1 << 25)
|
||||
#define HWCAP2_SME_I8I32 (1 << 26)
|
||||
#define HWCAP2_SME_F16F32 (1 << 27)
|
||||
#define HWCAP2_SME_B16F32 (1 << 28)
|
||||
#define HWCAP2_SME_F32F32 (1 << 29)
|
||||
#define HWCAP2_SME_FA64 (1 << 30)
|
||||
#define HWCAP2_WFXT (1UL << 31)
|
||||
#define HWCAP2_EBF16 (1UL << 32)
|
||||
#define HWCAP2_SVE_EBF16 (1UL << 33)
|
||||
#define HWCAP2_CSSC (1UL << 34)
|
||||
#define HWCAP2_RPRFM (1UL << 35)
|
||||
#define HWCAP2_SVE2P1 (1UL << 36)
|
||||
#define HWCAP2_SME2 (1UL << 37)
|
||||
#define HWCAP2_SME2P1 (1UL << 38)
|
||||
#define HWCAP2_SME_I16I32 (1UL << 39)
|
||||
#define HWCAP2_SME_BI32I32 (1UL << 40)
|
||||
#define HWCAP2_SME_B16B16 (1UL << 41)
|
||||
#define HWCAP2_SME_F16F16 (1UL << 42)
|
||||
#define HWCAP2_MOPS (1UL << 43)
|
||||
#define HWCAP2_HBC (1UL << 44)
|
||||
#define HWCAP2_SVE_B16B16 (1UL << 45)
|
||||
#define HWCAP2_LRCPC3 (1UL << 46)
|
||||
#define HWCAP2_LSE128 (1UL << 47)
|
||||
#define HWCAP2_FPMR (1UL << 48)
|
||||
#define HWCAP2_LUT (1UL << 49)
|
||||
#define HWCAP2_FAMINMAX (1UL << 50)
|
||||
#define HWCAP2_F8CVT (1UL << 51)
|
||||
#define HWCAP2_F8FMA (1UL << 52)
|
||||
#define HWCAP2_F8DP4 (1UL << 53)
|
||||
#define HWCAP2_F8DP2 (1UL << 54)
|
||||
#define HWCAP2_F8E4M3 (1UL << 55)
|
||||
#define HWCAP2_F8E5M2 (1UL << 56)
|
||||
#define HWCAP2_SME_LUTV2 (1UL << 57)
|
||||
#define HWCAP2_SME_F8F16 (1UL << 58)
|
||||
#define HWCAP2_SME_F8F32 (1UL << 59)
|
||||
#define HWCAP2_SME_SF8FMA (1UL << 60)
|
||||
#define HWCAP2_SME_SF8DP4 (1UL << 61)
|
||||
#define HWCAP2_SME_SF8DP2 (1UL << 62)
|
||||
#define HWCAP2_POE (1UL << 63)
|
||||
@ -1,36 +0,0 @@
|
||||
/* Definition of __INDIRECT_RETURN. AArch64 version.
|
||||
Copyright (C) 2024-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _UCONTEXT_H
|
||||
# error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead."
|
||||
#endif
|
||||
|
||||
/* __INDIRECT_RETURN indicates that swapcontext may return via
|
||||
an indirect branch. This happens when GCS is enabled, so
|
||||
add the attribute if available, otherwise returns_twice has
|
||||
a similar effect, but it prevents some code transformations
|
||||
that can cause build failures in some rare cases so it is
|
||||
only used when GCS is enabled. */
|
||||
#if __glibc_has_attribute (__indirect_return__)
|
||||
# define __INDIRECT_RETURN __attribute__ ((__indirect_return__))
|
||||
#elif __glibc_has_attribute (__returns_twice__) \
|
||||
&& defined __ARM_FEATURE_GCS_DEFAULT
|
||||
# define __INDIRECT_RETURN __attribute__ ((__returns_twice__))
|
||||
#else
|
||||
# define __INDIRECT_RETURN
|
||||
#endif
|
||||
@ -1,68 +0,0 @@
|
||||
/* Copyright (C) 2005-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _LINK_H
|
||||
# error "Never include <bits/link.h> directly; use <link.h> instead."
|
||||
#endif
|
||||
|
||||
typedef union
|
||||
{
|
||||
float s;
|
||||
double d;
|
||||
long double q;
|
||||
} La_aarch64_vector;
|
||||
|
||||
/* Registers for entry into PLT on AArch64. */
|
||||
typedef struct La_aarch64_regs
|
||||
{
|
||||
uint64_t lr_xreg[9];
|
||||
La_aarch64_vector lr_vreg[8];
|
||||
uint64_t lr_sp;
|
||||
uint64_t lr_lr;
|
||||
void *lr_vpcs;
|
||||
} La_aarch64_regs;
|
||||
|
||||
/* Return values for calls from PLT on AArch64. */
|
||||
typedef struct La_aarch64_retval
|
||||
{
|
||||
/* Up to eight integer registers can be used for a return value. */
|
||||
uint64_t lrv_xreg[8];
|
||||
/* Up to eight V registers can be used for a return value. */
|
||||
La_aarch64_vector lrv_vreg[8];
|
||||
void *lrv_vpcs;
|
||||
} 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
|
||||
@ -1,308 +0,0 @@
|
||||
/* Platform-specific SIMD declarations of math functions.
|
||||
|
||||
Copyright (C) 2023-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _MATH_H
|
||||
# error "Never include <bits/math-vector.h> directly;\
|
||||
include <math.h> instead."
|
||||
#endif
|
||||
|
||||
/* Get default empty definitions for simd declarations. */
|
||||
#include <bits/libm-simd-decl-stubs.h>
|
||||
|
||||
#if defined __aarch64__ && defined __FAST_MATH__ && __GNUC_PREREQ (6, 0)
|
||||
/* Requires GCC >= 6 for __attribute__ ((__simd__)). */
|
||||
# define __DECL_SIMD_aarch64 __attribute__ ((__simd__ ("notinbranch"), const))
|
||||
|
||||
# undef __DECL_SIMD_acos
|
||||
# define __DECL_SIMD_acos __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acosf
|
||||
# define __DECL_SIMD_acosf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acosh
|
||||
# define __DECL_SIMD_acosh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acoshf
|
||||
# define __DECL_SIMD_acoshf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asin
|
||||
# define __DECL_SIMD_asin __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinf
|
||||
# define __DECL_SIMD_asinf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinh
|
||||
# define __DECL_SIMD_asinh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinhf
|
||||
# define __DECL_SIMD_asinhf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atan
|
||||
# define __DECL_SIMD_atan __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanf
|
||||
# define __DECL_SIMD_atanf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanh
|
||||
# define __DECL_SIMD_atanh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanhf
|
||||
# define __DECL_SIMD_atanhf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atan2
|
||||
# define __DECL_SIMD_atan2 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atan2f
|
||||
# define __DECL_SIMD_atan2f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cbrt
|
||||
# define __DECL_SIMD_cbrt __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cbrtf
|
||||
# define __DECL_SIMD_cbrtf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cos
|
||||
# define __DECL_SIMD_cos __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cosf
|
||||
# define __DECL_SIMD_cosf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cosh
|
||||
# define __DECL_SIMD_cosh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_coshf
|
||||
# define __DECL_SIMD_coshf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cospi
|
||||
# define __DECL_SIMD_cospi __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cospif
|
||||
# define __DECL_SIMD_cospif __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erf
|
||||
# define __DECL_SIMD_erf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erff
|
||||
# define __DECL_SIMD_erff __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erfc
|
||||
# define __DECL_SIMD_erfc __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erfcf
|
||||
# define __DECL_SIMD_erfcf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_exp
|
||||
# define __DECL_SIMD_exp __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_expf
|
||||
# define __DECL_SIMD_expf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_exp10
|
||||
# define __DECL_SIMD_exp10 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_exp10f
|
||||
# define __DECL_SIMD_exp10f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_exp2
|
||||
# define __DECL_SIMD_exp2 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_exp2f
|
||||
# define __DECL_SIMD_exp2f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_expm1
|
||||
# define __DECL_SIMD_expm1 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_expm1f
|
||||
# define __DECL_SIMD_expm1f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_hypot
|
||||
# define __DECL_SIMD_hypot __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_hypotf
|
||||
# define __DECL_SIMD_hypotf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_log
|
||||
# define __DECL_SIMD_log __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_logf
|
||||
# define __DECL_SIMD_logf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_log10
|
||||
# define __DECL_SIMD_log10 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_log10f
|
||||
# define __DECL_SIMD_log10f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_log1p
|
||||
# define __DECL_SIMD_log1p __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_log1pf
|
||||
# define __DECL_SIMD_log1pf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_log2
|
||||
# define __DECL_SIMD_log2 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_log2f
|
||||
# define __DECL_SIMD_log2f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_logp1
|
||||
# define __DECL_SIMD_logp1 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_logp1f
|
||||
# define __DECL_SIMD_logp1f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_pow
|
||||
# define __DECL_SIMD_pow __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_powf
|
||||
# define __DECL_SIMD_powf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sin
|
||||
# define __DECL_SIMD_sin __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sinf
|
||||
# define __DECL_SIMD_sinf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sinh
|
||||
# define __DECL_SIMD_sinh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sinhf
|
||||
# define __DECL_SIMD_sinhf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sinpi
|
||||
# define __DECL_SIMD_sinpi __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sinpif
|
||||
# define __DECL_SIMD_sinpif __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tan
|
||||
# define __DECL_SIMD_tan __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tanf
|
||||
# define __DECL_SIMD_tanf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tanh
|
||||
# define __DECL_SIMD_tanh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tanhf
|
||||
# define __DECL_SIMD_tanhf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tanpi
|
||||
# define __DECL_SIMD_tanpi __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tanpif
|
||||
# define __DECL_SIMD_tanpif __DECL_SIMD_aarch64
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ(9, 0)
|
||||
# define __ADVSIMD_VEC_MATH_SUPPORTED
|
||||
typedef __Float32x4_t __f32x4_t;
|
||||
typedef __Float64x2_t __f64x2_t;
|
||||
#elif __glibc_clang_prereq(8, 0)
|
||||
# define __ADVSIMD_VEC_MATH_SUPPORTED
|
||||
typedef __attribute__ ((__neon_vector_type__ (4))) float __f32x4_t;
|
||||
typedef __attribute__ ((__neon_vector_type__ (2))) double __f64x2_t;
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ(10, 0) || __glibc_clang_prereq(11, 0)
|
||||
# define __SVE_VEC_MATH_SUPPORTED
|
||||
typedef __SVFloat32_t __sv_f32_t;
|
||||
typedef __SVFloat64_t __sv_f64_t;
|
||||
typedef __SVBool_t __sv_bool_t;
|
||||
#endif
|
||||
|
||||
/* If vector types and vector PCS are unsupported in the working
|
||||
compiler, no choice but to omit vector math declarations. */
|
||||
|
||||
#ifdef __ADVSIMD_VEC_MATH_SUPPORTED
|
||||
|
||||
# define __vpcs __attribute__ ((__aarch64_vector_pcs__))
|
||||
|
||||
__vpcs __f32x4_t _ZGVnN4vv_atan2f (__f32x4_t, __f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_acosf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_acoshf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_asinf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_asinhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_atanf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_atanhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_cbrtf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_cosf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_coshf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_cospif (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_erff (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_erfcf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_expf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_exp10f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_exp2f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_expm1f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4vv_hypotf (__f32x4_t, __f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_logf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_log10f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_log1pf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_log2f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_logp1f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4vv_powf (__f32x4_t, __f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_sinf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_sinhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_sinpif (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_tanf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_tanhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_tanpif (__f32x4_t);
|
||||
|
||||
__vpcs __f64x2_t _ZGVnN2vv_atan2 (__f64x2_t, __f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_acos (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_acosh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_asin (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_asinh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_atan (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_atanh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cbrt (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cos (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cosh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cospi (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_erf (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_erfc (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_exp (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_exp10 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_exp2 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_expm1 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2vv_hypot (__f64x2_t, __f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log10 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log1p (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log2 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_logp1 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2vv_pow (__f64x2_t, __f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_sin (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_sinh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_sinpi (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_tan (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_tanh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_tanpi (__f64x2_t);
|
||||
|
||||
# undef __ADVSIMD_VEC_MATH_SUPPORTED
|
||||
#endif /* __ADVSIMD_VEC_MATH_SUPPORTED */
|
||||
|
||||
#ifdef __SVE_VEC_MATH_SUPPORTED
|
||||
|
||||
__sv_f32_t _ZGVsMxvv_atan2f (__sv_f32_t, __sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_acosf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_acoshf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_asinf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_asinhf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_atanf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_atanhf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_cbrtf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_cosf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_coshf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_cospif (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_erff (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_erfcf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_expf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_exp10f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_exp2f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_expm1f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxvv_hypotf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_logf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_log10f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_log1pf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_log2f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_logp1f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxvv_powf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_sinf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_sinhf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_sinpif (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_tanf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_tanhf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_tanpif (__sv_f32_t, __sv_bool_t);
|
||||
|
||||
__sv_f64_t _ZGVsMxvv_atan2 (__sv_f64_t, __sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_acos (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_acosh (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_asin (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_asinh (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_atan (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_atanh (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_cbrt (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_cos (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_cosh (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_cospi (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_erf (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_erfc (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_exp (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_exp10 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_exp2 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_expm1 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxvv_hypot (__sv_f64_t, __sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log10 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log1p (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log2 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_logp1 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxvv_pow (__sv_f64_t, __sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_sin (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_sinh (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_sinpi (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_tan (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_tanh (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_tanpi (__sv_f64_t, __sv_bool_t);
|
||||
|
||||
# undef __SVE_VEC_MATH_SUPPORTED
|
||||
#endif /* __SVE_VEC_MATH_SUPPORTED */
|
||||
@ -1,40 +0,0 @@
|
||||
/* Definitions for POSIX memory map interface. Linux/AArch64 version.
|
||||
Copyright (C) 2020-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_MMAN_H
|
||||
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
|
||||
#endif
|
||||
|
||||
/* AArch64 specific definitions, should be in sync with
|
||||
arch/arm64/include/uapi/asm/mman.h. */
|
||||
|
||||
#define PROT_BTI 0x10
|
||||
#define PROT_MTE 0x20
|
||||
|
||||
#ifdef __USE_GNU
|
||||
# define PKEY_UNRESTRICTED 0x0
|
||||
# define PKEY_DISABLE_ACCESS 0x1
|
||||
# define PKEY_DISABLE_WRITE 0x2
|
||||
# define PKEY_DISABLE_EXECUTE 0x4
|
||||
# define PKEY_DISABLE_READ 0x8
|
||||
#endif
|
||||
|
||||
#include <bits/mman-map-flags-generic.h>
|
||||
|
||||
/* Include generic Linux declarations. */
|
||||
#include <bits/mman-linux.h>
|
||||
@ -1,35 +0,0 @@
|
||||
/* Types for registers for sys/procfs.h. AArch64 version.
|
||||
Copyright (C) 1996-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_PROCFS_H
|
||||
# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
|
||||
#endif
|
||||
|
||||
/* Type for a general-purpose register. */
|
||||
typedef __uint64_t elf_greg_t;
|
||||
|
||||
/* And the whole bunch of them. We could have used `struct
|
||||
pt_regs' directly in the typedef, but tradition says that
|
||||
the register set is an array, which does have some peculiar
|
||||
semantics, so leave it that way. */
|
||||
#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
|
||||
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
|
||||
|
||||
/* Register set for the floating-point registers. */
|
||||
typedef struct user_fpsimd_struct elf_fpregset_t;
|
||||
@ -1,22 +0,0 @@
|
||||
/* Definition of PTHREAD_STACK_MIN. Linux/aarch64 version.
|
||||
Copyright (C) 2021-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Minimum size for a thread. At least two pages for systems with 64k
|
||||
pages. */
|
||||
#define PTHREAD_STACK_MIN 131072
|
||||
@ -1,47 +0,0 @@
|
||||
/* Copyright (C) 2002-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_PTHREADTYPES_ARCH_H
|
||||
#define _BITS_PTHREADTYPES_ARCH_H 1
|
||||
|
||||
#include <bits/endian.h>
|
||||
|
||||
#ifdef __ILP32__
|
||||
# define __SIZEOF_PTHREAD_ATTR_T 32
|
||||
# define __SIZEOF_PTHREAD_MUTEX_T 32
|
||||
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
|
||||
# define __SIZEOF_PTHREAD_CONDATTR_T 4
|
||||
# define __SIZEOF_PTHREAD_RWLOCK_T 48
|
||||
# define __SIZEOF_PTHREAD_BARRIER_T 20
|
||||
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
|
||||
#else
|
||||
# define __SIZEOF_PTHREAD_ATTR_T 64
|
||||
# define __SIZEOF_PTHREAD_MUTEX_T 48
|
||||
# define __SIZEOF_PTHREAD_MUTEXATTR_T 8
|
||||
# define __SIZEOF_PTHREAD_CONDATTR_T 8
|
||||
# define __SIZEOF_PTHREAD_RWLOCK_T 56
|
||||
# define __SIZEOF_PTHREAD_BARRIER_T 32
|
||||
# define __SIZEOF_PTHREAD_BARRIERATTR_T 8
|
||||
#endif
|
||||
#define __SIZEOF_PTHREAD_COND_T 48
|
||||
#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
|
||||
|
||||
#define __LOCK_ALIGNMENT
|
||||
#define __ONCE_ALIGNMENT
|
||||
|
||||
#endif /* bits/pthreadtypes.h */
|
||||
@ -1,43 +0,0 @@
|
||||
/* Restartable Sequences Linux aarch64 architecture header.
|
||||
Copyright (C) 2021-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
|
||||
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/>. */
|
||||
|
||||
#ifndef _SYS_RSEQ_H
|
||||
# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
|
||||
#endif
|
||||
|
||||
/* RSEQ_SIG is a signature required before each abort handler code.
|
||||
|
||||
It is a 32-bit value that maps to actual architecture code compiled
|
||||
into applications and libraries. It needs to be defined for each
|
||||
architecture. When choosing this value, it needs to be taken into
|
||||
account that generating invalid instructions may have ill effects on
|
||||
tools like objdump, and may also have impact on the CPU speculative
|
||||
execution efficiency in some cases.
|
||||
|
||||
aarch64 -mbig-endian generates mixed endianness code vs data:
|
||||
little-endian code and big-endian data. Ensure the RSEQ_SIG signature
|
||||
matches code endianness. */
|
||||
|
||||
#define RSEQ_SIG_CODE 0xd428bc00 /* BRK #0x45E0. */
|
||||
|
||||
#ifdef __AARCH64EB__
|
||||
# define RSEQ_SIG_DATA 0x00bc28d4 /* BRK #0x45E0. */
|
||||
#else
|
||||
# define RSEQ_SIG_DATA RSEQ_SIG_CODE
|
||||
#endif
|
||||
|
||||
#define RSEQ_SIG RSEQ_SIG_DATA
|
||||
@ -1,39 +0,0 @@
|
||||
/* Copyright (C) 2002-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SEMAPHORE_H
|
||||
# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __ILP32__
|
||||
# define __SIZEOF_SEM_T 16
|
||||
#else
|
||||
# define __SIZEOF_SEM_T 32
|
||||
#endif
|
||||
|
||||
|
||||
/* Value returned if `sem_open' failed. */
|
||||
#define SEM_FAILED ((sem_t *) 0)
|
||||
|
||||
|
||||
typedef union
|
||||
{
|
||||
char __size[__SIZEOF_SEM_T];
|
||||
long long int __align;
|
||||
} sem_t;
|
||||
@ -1,33 +0,0 @@
|
||||
/* Copyright (C) 1997-2025 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
|
||||
<https://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
|
||||
@ -1,32 +0,0 @@
|
||||
/* sigstack, sigaltstack definitions.
|
||||
Copyright (C) 2015-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_SIGSTACK_H
|
||||
#define _BITS_SIGSTACK_H 1
|
||||
|
||||
#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
|
||||
# error "Never include this file directly. Use <signal.h> instead"
|
||||
#endif
|
||||
|
||||
/* Minimum stack size for a signal handler. */
|
||||
#define MINSIGSTKSZ 5120
|
||||
|
||||
/* System default stack size. */
|
||||
#define SIGSTKSZ 16384
|
||||
|
||||
#endif /* bits/sigstack.h */
|
||||
@ -1,41 +0,0 @@
|
||||
/* AArch64 internal rwlock struct definitions.
|
||||
Copyright (C) 2019-2025 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 _RWLOCK_INTERNAL_H
|
||||
#define _RWLOCK_INTERNAL_H
|
||||
|
||||
struct __pthread_rwlock_arch_t
|
||||
{
|
||||
unsigned int __readers;
|
||||
unsigned int __writers;
|
||||
unsigned int __wrphase_futex;
|
||||
unsigned int __writers_futex;
|
||||
unsigned int __pad3;
|
||||
unsigned int __pad4;
|
||||
int __cur_writer;
|
||||
int __shared;
|
||||
unsigned long int __pad1;
|
||||
unsigned long int __pad2;
|
||||
unsigned int __flags;
|
||||
};
|
||||
|
||||
#define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
|
||||
|
||||
#endif
|
||||
@ -1,28 +0,0 @@
|
||||
/* Determine the wordsize from the preprocessor defines.
|
||||
|
||||
Copyright (C) 2016-2025 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
|
||||
<https://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
|
||||
@ -1,47 +0,0 @@
|
||||
! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
|
||||
! Copyright (C) 2019-2025 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
|
||||
! <https://www.gnu.org/licenses/>.
|
||||
!GCC$ builtin (acos) attributes simd (notinbranch)
|
||||
!GCC$ builtin (acosf) attributes simd (notinbranch)
|
||||
!GCC$ builtin (asin) attributes simd (notinbranch)
|
||||
!GCC$ builtin (asinf) attributes simd (notinbranch)
|
||||
!GCC$ builtin (atan) attributes simd (notinbranch)
|
||||
!GCC$ builtin (atanf) attributes simd (notinbranch)
|
||||
!GCC$ builtin (atan2) attributes simd (notinbranch)
|
||||
!GCC$ builtin (atan2f) attributes simd (notinbranch)
|
||||
!GCC$ builtin (cos) attributes simd (notinbranch)
|
||||
!GCC$ builtin (cosf) attributes simd (notinbranch)
|
||||
!GCC$ builtin (exp) attributes simd (notinbranch)
|
||||
!GCC$ builtin (expf) attributes simd (notinbranch)
|
||||
!GCC$ builtin (exp10) attributes simd (notinbranch)
|
||||
!GCC$ builtin (exp10f) attributes simd (notinbranch)
|
||||
!GCC$ builtin (exp2) attributes simd (notinbranch)
|
||||
!GCC$ builtin (exp2f) attributes simd (notinbranch)
|
||||
!GCC$ builtin (expm1) attributes simd (notinbranch)
|
||||
!GCC$ builtin (expm1f) attributes simd (notinbranch)
|
||||
!GCC$ builtin (log) attributes simd (notinbranch)
|
||||
!GCC$ builtin (logf) attributes simd (notinbranch)
|
||||
!GCC$ builtin (log10) attributes simd (notinbranch)
|
||||
!GCC$ builtin (log10f) attributes simd (notinbranch)
|
||||
!GCC$ builtin (log1p) attributes simd (notinbranch)
|
||||
!GCC$ builtin (log1pf) attributes simd (notinbranch)
|
||||
!GCC$ builtin (log2) attributes simd (notinbranch)
|
||||
!GCC$ builtin (log2f) attributes simd (notinbranch)
|
||||
!GCC$ builtin (sin) attributes simd (notinbranch)
|
||||
!GCC$ builtin (sinf) attributes simd (notinbranch)
|
||||
!GCC$ builtin (tan) attributes simd (notinbranch)
|
||||
!GCC$ builtin (tanf) attributes simd (notinbranch)
|
||||
104
lib/libc/include/aarch64_be-linux-gnu/fpu_control.h
vendored
104
lib/libc/include/aarch64_be-linux-gnu/fpu_control.h
vendored
@ -1,104 +0,0 @@
|
||||
/* Copyright (C) 1996-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _AARCH64_FPU_CONTROL_H
|
||||
#define _AARCH64_FPU_CONTROL_H
|
||||
|
||||
#include <features.h>
|
||||
|
||||
/* Macros for accessing the FPCR and FPSR. */
|
||||
|
||||
#if __GNUC_PREREQ (6,0)
|
||||
# define _FPU_GETCW(fpcr) (fpcr = __builtin_aarch64_get_fpcr ())
|
||||
# define _FPU_SETCW(fpcr) __builtin_aarch64_set_fpcr (fpcr)
|
||||
# define _FPU_GETFPSR(fpsr) (fpsr = __builtin_aarch64_get_fpsr ())
|
||||
# define _FPU_SETFPSR(fpsr) __builtin_aarch64_set_fpsr (fpsr)
|
||||
#else
|
||||
# define _FPU_GETCW(fpcr) \
|
||||
({ \
|
||||
__uint64_t __fpcr; \
|
||||
__asm__ __volatile__ ("mrs %0, fpcr" : "=r" (__fpcr)); \
|
||||
fpcr = __fpcr; \
|
||||
})
|
||||
|
||||
# define _FPU_SETCW(fpcr) \
|
||||
({ \
|
||||
__uint64_t __fpcr = fpcr; \
|
||||
__asm__ __volatile__ ("msr fpcr, %0" : : "r" (__fpcr)); \
|
||||
})
|
||||
|
||||
# define _FPU_GETFPSR(fpsr) \
|
||||
({ \
|
||||
__uint64_t __fpsr; \
|
||||
__asm__ __volatile__ ("mrs %0, fpsr" : "=r" (__fpsr)); \
|
||||
fpsr = __fpsr; \
|
||||
})
|
||||
|
||||
# define _FPU_SETFPSR(fpsr) \
|
||||
({ \
|
||||
__uint64_t __fpsr = fpsr; \
|
||||
__asm__ __volatile__ ("msr fpsr, %0" : : "r" (__fpsr)); \
|
||||
})
|
||||
#endif
|
||||
|
||||
/* Reserved bits should be preserved when modifying register
|
||||
contents. These two masks indicate which bits in each of FPCR and
|
||||
FPSR should not be changed. */
|
||||
|
||||
#define _FPU_RESERVED 0xfe0fe0f8
|
||||
#define _FPU_FPSR_RESERVED 0x0fffffe0
|
||||
|
||||
#define _FPU_DEFAULT 0x00000000
|
||||
#define _FPU_FPSR_DEFAULT 0x00000000
|
||||
|
||||
/* Layout of FPCR and FPSR:
|
||||
|
||||
| | | | | | | |
|
||||
0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0
|
||||
s s s s s s s s s s s
|
||||
c c c c c c c c c c c c
|
||||
N Z C V Q A D F R R S S S L L L I U U I U O D I I U U I U O D I
|
||||
C H N Z M M T T B E E E D N N X F F Z O D N N X F F Z O
|
||||
P O O R R Z N N N E K K E E E E E C K K C C C C C
|
||||
D D I I P
|
||||
E E D D
|
||||
E E
|
||||
*/
|
||||
|
||||
#define _FPU_FPCR_RM_MASK 0xc00000
|
||||
|
||||
#define _FPU_FPCR_MASK_IXE 0x1000
|
||||
#define _FPU_FPCR_MASK_UFE 0x0800
|
||||
#define _FPU_FPCR_MASK_OFE 0x0400
|
||||
#define _FPU_FPCR_MASK_DZE 0x0200
|
||||
#define _FPU_FPCR_MASK_IOE 0x0100
|
||||
|
||||
#define _FPU_FPCR_IEEE \
|
||||
(_FPU_DEFAULT | _FPU_FPCR_MASK_IXE \
|
||||
| _FPU_FPCR_MASK_UFE | _FPU_FPCR_MASK_OFE \
|
||||
| _FPU_FPCR_MASK_DZE | _FPU_FPCR_MASK_IOE)
|
||||
|
||||
#define _FPU_FPSR_IEEE 0
|
||||
|
||||
typedef unsigned int fpu_control_t;
|
||||
typedef unsigned int fpu_fpsr_t;
|
||||
|
||||
/* Default control word set at startup. */
|
||||
extern fpu_control_t __fpu_control;
|
||||
|
||||
#endif
|
||||
@ -1,16 +0,0 @@
|
||||
/* This file is automatically generated.
|
||||
It defines macros to allow user program to find the shared
|
||||
library files which come as part of GNU libc. */
|
||||
#ifndef __GNU_LIB_NAMES_H
|
||||
#define __GNU_LIB_NAMES_H 1
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if !defined __AARCH64EB__
|
||||
# include <gnu/lib-names-lp64.h>
|
||||
#endif
|
||||
#if defined __AARCH64EB__
|
||||
# include <gnu/lib-names-lp64_be.h>
|
||||
#endif
|
||||
|
||||
#endif /* gnu/lib-names.h */
|
||||
@ -1,12 +0,0 @@
|
||||
/* This file is automatically generated.
|
||||
This file selects the right generated file of `__stub_FUNCTION' macros
|
||||
based on the architecture being compiled for. */
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if !defined __AARCH64EB__
|
||||
# include <gnu/stubs-lp64.h>
|
||||
#endif
|
||||
#if defined __AARCH64EB__
|
||||
# include <gnu/stubs-lp64_be.h>
|
||||
#endif
|
||||
26
lib/libc/include/aarch64_be-linux-gnu/sys/elf.h
vendored
26
lib/libc/include/aarch64_be-linux-gnu/sys/elf.h
vendored
@ -1,26 +0,0 @@
|
||||
/* Copyright (C) 1996-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_ELF_H
|
||||
#define _SYS_ELF_H 1
|
||||
|
||||
#warning "This header is obsolete; use <sys/procfs.h> instead."
|
||||
|
||||
#include <sys/procfs.h>
|
||||
|
||||
#endif /* sys/elf.h */
|
||||
219
lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h
vendored
219
lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h
vendored
@ -1,219 +0,0 @@
|
||||
/* `ptrace' debugger support interface. Linux/AArch64 version.
|
||||
Copyright (C) 1996-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_PTRACE_H
|
||||
#define _SYS_PTRACE_H 1
|
||||
|
||||
#include <features.h>
|
||||
#include <bits/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Avoid collision if the linux ptrace header is already included. */
|
||||
#undef PTRACE_TRACEME
|
||||
#undef PTRACE_PEEKTEXT
|
||||
#undef PTRACE_PEEKDATA
|
||||
#undef PTRACE_PEEKUSER
|
||||
#undef PTRACE_POKETEXT
|
||||
#undef PTRACE_POKEDATA
|
||||
#undef PTRACE_POKEUSER
|
||||
#undef PTRACE_CONT
|
||||
#undef PTRACE_KILL
|
||||
#undef PTRACE_SINGLESTEP
|
||||
#undef PTRACE_ATTACH
|
||||
#undef PTRACE_DETACH
|
||||
#undef PTRACE_SYSCALL
|
||||
#undef PTRACE_SYSEMU
|
||||
#undef PTRACE_SYSEMU_SINGLESTEP
|
||||
#undef PTRACE_PEEKMTETAGS
|
||||
#undef PTRACE_POKEMTETAGS
|
||||
#undef PTRACE_SETOPTIONS
|
||||
#undef PTRACE_GETEVENTMSG
|
||||
#undef PTRACE_GETSIGINFO
|
||||
#undef PTRACE_SETSIGINFO
|
||||
#undef PTRACE_GETREGSET
|
||||
#undef PTRACE_SETREGSET
|
||||
#undef PTRACE_SEIZE
|
||||
#undef PTRACE_INTERRUPT
|
||||
#undef PTRACE_LISTEN
|
||||
#undef PTRACE_PEEKSIGINFO
|
||||
#undef PTRACE_GETSIGMASK
|
||||
#undef PTRACE_SETSIGMASK
|
||||
#undef PTRACE_SECCOMP_GET_FILTER
|
||||
#undef PTRACE_SECCOMP_GET_METADATA
|
||||
#undef PTRACE_GET_SYSCALL_INFO
|
||||
#undef PTRACE_GET_RSEQ_CONFIGURATION
|
||||
#undef PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG
|
||||
#undef PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG
|
||||
|
||||
/* Type of the REQUEST argument to `ptrace.' */
|
||||
enum __ptrace_request
|
||||
{
|
||||
/* Indicate that the process making this request should be traced.
|
||||
All signals received by this process can be intercepted by its
|
||||
parent, and its parent can use the other `ptrace' requests. */
|
||||
PTRACE_TRACEME = 0,
|
||||
#define PT_TRACE_ME PTRACE_TRACEME
|
||||
|
||||
/* Return the word in the process's text space at address ADDR. */
|
||||
PTRACE_PEEKTEXT = 1,
|
||||
#define PT_READ_I PTRACE_PEEKTEXT
|
||||
|
||||
/* Return the word in the process's data space at address ADDR. */
|
||||
PTRACE_PEEKDATA = 2,
|
||||
#define PT_READ_D PTRACE_PEEKDATA
|
||||
|
||||
/* Return the word in the process's user area at offset ADDR. */
|
||||
PTRACE_PEEKUSER = 3,
|
||||
#define PT_READ_U PTRACE_PEEKUSER
|
||||
|
||||
/* Write the word DATA into the process's text space at address ADDR. */
|
||||
PTRACE_POKETEXT = 4,
|
||||
#define PT_WRITE_I PTRACE_POKETEXT
|
||||
|
||||
/* Write the word DATA into the process's data space at address ADDR. */
|
||||
PTRACE_POKEDATA = 5,
|
||||
#define PT_WRITE_D PTRACE_POKEDATA
|
||||
|
||||
/* Write the word DATA into the process's user area at offset ADDR. */
|
||||
PTRACE_POKEUSER = 6,
|
||||
#define PT_WRITE_U PTRACE_POKEUSER
|
||||
|
||||
/* Continue the process. */
|
||||
PTRACE_CONT = 7,
|
||||
#define PT_CONTINUE PTRACE_CONT
|
||||
|
||||
/* Kill the process. */
|
||||
PTRACE_KILL = 8,
|
||||
#define PT_KILL PTRACE_KILL
|
||||
|
||||
/* Single step the process. */
|
||||
PTRACE_SINGLESTEP = 9,
|
||||
#define PT_STEP PTRACE_SINGLESTEP
|
||||
|
||||
/* Attach to a process that is already running. */
|
||||
PTRACE_ATTACH = 16,
|
||||
#define PT_ATTACH PTRACE_ATTACH
|
||||
|
||||
/* Detach from a process attached to with PTRACE_ATTACH. */
|
||||
PTRACE_DETACH = 17,
|
||||
#define PT_DETACH PTRACE_DETACH
|
||||
|
||||
/* Continue and stop at the next entry to or return from syscall. */
|
||||
PTRACE_SYSCALL = 24,
|
||||
#define PT_SYSCALL PTRACE_SYSCALL
|
||||
|
||||
/* Continue and stop at the next syscall, it will not be executed. */
|
||||
PTRACE_SYSEMU = 31,
|
||||
#define PT_SYSEMU PTRACE_SYSEMU
|
||||
|
||||
/* Single step the process, the next syscall will not be executed. */
|
||||
PTRACE_SYSEMU_SINGLESTEP = 32,
|
||||
#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
|
||||
|
||||
/* Read MTE tags. */
|
||||
PTRACE_PEEKMTETAGS = 33,
|
||||
#define PT_PEEKMTETAGS PTRACE_PEEKMTETAGS
|
||||
|
||||
/* Write MTE tags. */
|
||||
PTRACE_POKEMTETAGS = 34,
|
||||
#define PT_POKEMTETAGS PTRACE_POKEMTETAGS
|
||||
|
||||
/* Set ptrace filter options. */
|
||||
PTRACE_SETOPTIONS = 0x4200,
|
||||
#define PT_SETOPTIONS PTRACE_SETOPTIONS
|
||||
|
||||
/* Get last ptrace message. */
|
||||
PTRACE_GETEVENTMSG = 0x4201,
|
||||
#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
|
||||
|
||||
/* Get siginfo for process. */
|
||||
PTRACE_GETSIGINFO = 0x4202,
|
||||
#define PT_GETSIGINFO PTRACE_GETSIGINFO
|
||||
|
||||
/* Set new siginfo for process. */
|
||||
PTRACE_SETSIGINFO = 0x4203,
|
||||
#define PT_SETSIGINFO PTRACE_SETSIGINFO
|
||||
|
||||
/* Get register content. */
|
||||
PTRACE_GETREGSET = 0x4204,
|
||||
#define PTRACE_GETREGSET PTRACE_GETREGSET
|
||||
|
||||
/* Set register content. */
|
||||
PTRACE_SETREGSET = 0x4205,
|
||||
#define PTRACE_SETREGSET PTRACE_SETREGSET
|
||||
|
||||
/* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
|
||||
signal or group stop state. */
|
||||
PTRACE_SEIZE = 0x4206,
|
||||
#define PTRACE_SEIZE PTRACE_SEIZE
|
||||
|
||||
/* Trap seized tracee. */
|
||||
PTRACE_INTERRUPT = 0x4207,
|
||||
#define PTRACE_INTERRUPT PTRACE_INTERRUPT
|
||||
|
||||
/* Wait for next group event. */
|
||||
PTRACE_LISTEN = 0x4208,
|
||||
#define PTRACE_LISTEN PTRACE_LISTEN
|
||||
|
||||
/* Retrieve siginfo_t structures without removing signals from a queue. */
|
||||
PTRACE_PEEKSIGINFO = 0x4209,
|
||||
#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
|
||||
|
||||
/* Get the mask of blocked signals. */
|
||||
PTRACE_GETSIGMASK = 0x420a,
|
||||
#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
|
||||
|
||||
/* Change the mask of blocked signals. */
|
||||
PTRACE_SETSIGMASK = 0x420b,
|
||||
#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
|
||||
|
||||
/* Get seccomp BPF filters. */
|
||||
PTRACE_SECCOMP_GET_FILTER = 0x420c,
|
||||
#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
|
||||
|
||||
/* Get seccomp BPF filter metadata. */
|
||||
PTRACE_SECCOMP_GET_METADATA = 0x420d,
|
||||
#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
|
||||
|
||||
/* Get information about system call. */
|
||||
PTRACE_GET_SYSCALL_INFO = 0x420e,
|
||||
#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
|
||||
|
||||
/* Get rseq configuration information. */
|
||||
PTRACE_GET_RSEQ_CONFIGURATION = 0x420f,
|
||||
#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
|
||||
|
||||
/* Set configuration for syscall user dispatch. */
|
||||
PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210,
|
||||
#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \
|
||||
PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG
|
||||
|
||||
/* Get configuration for syscall user dispatch. */
|
||||
PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211
|
||||
#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \
|
||||
PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG
|
||||
};
|
||||
|
||||
|
||||
#include <bits/ptrace-shared.h>
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _SYS_PTRACE_H */
|
||||
@ -1,78 +0,0 @@
|
||||
/* Copyright (C) 1998-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* System V/AArch64 ABI compliant context switching support. */
|
||||
|
||||
#ifndef _SYS_UCONTEXT_H
|
||||
#define _SYS_UCONTEXT_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#include <bits/types/sigset_t.h>
|
||||
#include <bits/types/stack_t.h>
|
||||
|
||||
#ifdef __USE_MISC
|
||||
# define __ctx(fld) fld
|
||||
#else
|
||||
# define __ctx(fld) __ ## fld
|
||||
#endif
|
||||
|
||||
#ifdef __USE_MISC
|
||||
# include <sys/procfs.h>
|
||||
|
||||
|
||||
typedef elf_greg_t greg_t;
|
||||
|
||||
/* Container for all general registers. */
|
||||
typedef elf_gregset_t gregset_t;
|
||||
|
||||
/* Structure to describe FPU registers. */
|
||||
typedef elf_fpregset_t fpregset_t;
|
||||
#endif
|
||||
|
||||
/* Context to describe whole processor state. This only describes
|
||||
the core registers; coprocessor registers get saved elsewhere
|
||||
(e.g. in uc_regspace, or somewhere unspecified on the stack
|
||||
during non-RT signal handlers). */
|
||||
typedef struct
|
||||
{
|
||||
unsigned long long int __ctx(fault_address);
|
||||
unsigned long long int __ctx(regs)[31];
|
||||
unsigned long long int __ctx(sp);
|
||||
unsigned long long int __ctx(pc);
|
||||
unsigned long long int __ctx(pstate);
|
||||
/* This field contains extension records for additional processor
|
||||
state such as the FP/SIMD state. It has to match the definition
|
||||
of the corresponding field in the sigcontext struct, see the
|
||||
arch/arm64/include/uapi/asm/sigcontext.h linux header for details. */
|
||||
unsigned char __reserved[4096] __attribute__ ((__aligned__ (16)));
|
||||
} mcontext_t;
|
||||
|
||||
/* Userlevel context. */
|
||||
typedef struct ucontext_t
|
||||
{
|
||||
unsigned long __ctx(uc_flags);
|
||||
struct ucontext_t *uc_link;
|
||||
stack_t uc_stack;
|
||||
sigset_t uc_sigmask;
|
||||
mcontext_t uc_mcontext;
|
||||
} ucontext_t;
|
||||
|
||||
#undef __ctx
|
||||
|
||||
#endif /* sys/ucontext.h */
|
||||
37
lib/libc/include/aarch64_be-linux-gnu/sys/user.h
vendored
37
lib/libc/include/aarch64_be-linux-gnu/sys/user.h
vendored
@ -1,37 +0,0 @@
|
||||
/* Copyright (C) 2009-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_USER_H
|
||||
#define _SYS_USER_H 1
|
||||
|
||||
struct user_regs_struct
|
||||
{
|
||||
unsigned long long regs[31];
|
||||
unsigned long long sp;
|
||||
unsigned long long pc;
|
||||
unsigned long long pstate;
|
||||
};
|
||||
|
||||
struct user_fpsimd_struct
|
||||
{
|
||||
__uint128_t vregs[32];
|
||||
unsigned int fpsr;
|
||||
unsigned int fpcr;
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -1,25 +0,0 @@
|
||||
/* arm definitions for finding objects.
|
||||
Copyright (C) 2021-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _DLFCN_H
|
||||
# error "Never use <bits/dl_find_object.h> directly; include <dlfcn.h> instead."
|
||||
#endif
|
||||
|
||||
#define DLFO_STRUCT_HAS_EH_DBASE 0
|
||||
#define DLFO_STRUCT_HAS_EH_COUNT 1
|
||||
#define DLFO_EH_SEGMENT_TYPE PT_ARM_EXIDX
|
||||
@ -1,15 +0,0 @@
|
||||
#ifndef _BITS_ENDIANNESS_H
|
||||
#define _BITS_ENDIANNESS_H 1
|
||||
|
||||
#ifndef _BITS_ENDIAN_H
|
||||
# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
|
||||
#endif
|
||||
|
||||
/* ARM has selectable endianness. */
|
||||
#ifdef __ARMEB__
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
||||
#else
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#endif /* bits/endianness.h */
|
||||
@ -1,54 +0,0 @@
|
||||
/* O_*, F_*, FD_* bit values for Linux.
|
||||
Copyright (C) 1995-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _FCNTL_H
|
||||
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
|
||||
#endif
|
||||
|
||||
#define __O_DIRECTORY 040000 /* Must be a directory. */
|
||||
#define __O_NOFOLLOW 0100000 /* Do not follow links. */
|
||||
#define __O_DIRECT 0200000 /* Direct disk access. */
|
||||
#define __O_LARGEFILE 0400000
|
||||
|
||||
struct flock
|
||||
{
|
||||
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
|
||||
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
|
||||
#ifndef __USE_FILE_OFFSET64
|
||||
__off_t l_start; /* Offset where the lock begins. */
|
||||
__off_t l_len; /* Size of the locked area; zero means until EOF. */
|
||||
#else
|
||||
__off64_t l_start; /* Offset where the lock begins. */
|
||||
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
|
||||
#endif
|
||||
__pid_t l_pid; /* Process holding the lock. */
|
||||
};
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct flock64
|
||||
{
|
||||
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
|
||||
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
|
||||
__off64_t l_start; /* Offset where the lock begins. */
|
||||
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
|
||||
__pid_t l_pid; /* Process holding the lock. */
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Include generic Linux declarations. */
|
||||
#include <bits/fcntl-linux.h>
|
||||
90
lib/libc/include/arm-linux-gnueabihf/bits/fenv.h
vendored
90
lib/libc/include/arm-linux-gnueabihf/bits/fenv.h
vendored
@ -1,90 +0,0 @@
|
||||
/* Copyright (C) 2004-2025 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
|
||||
<https://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 FPU 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 to a mask bit. */
|
||||
#define FE_EXCEPT_SHIFT 8
|
||||
|
||||
/* All supported exceptions. */
|
||||
#define FE_ALL_EXCEPT \
|
||||
(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
|
||||
|
||||
/* VFP supports all of the four defined rounding modes. */
|
||||
enum
|
||||
{
|
||||
FE_TONEAREST =
|
||||
#define FE_TONEAREST 0
|
||||
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 int fexcept_t;
|
||||
|
||||
/* Type representing floating-point environment. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned int __cw;
|
||||
}
|
||||
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_C23)
|
||||
/* 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
|
||||
@ -1,59 +0,0 @@
|
||||
/* Defines for bits in AT_HWCAP. ARM Linux version.
|
||||
Copyright (C) 2012-2025 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
|
||||
<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
|
||||
|
||||
#define HWCAP2_AES 1
|
||||
#define HWCAP2_PMULL 2
|
||||
#define HWCAP2_SHA1 4
|
||||
#define HWCAP2_SHA2 8
|
||||
#define HWCAP2_CRC32 16
|
||||
#define HWCAP2_SB 32
|
||||
#define HWCAP2_SSBS 64
|
||||
65
lib/libc/include/arm-linux-gnueabihf/bits/link.h
vendored
65
lib/libc/include/arm-linux-gnueabihf/bits/link.h
vendored
@ -1,65 +0,0 @@
|
||||
/* Copyright (C) 2005-2025 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
|
||||
<https://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 ARM. */
|
||||
typedef struct La_arm_regs
|
||||
{
|
||||
uint32_t lr_reg[4];
|
||||
uint32_t lr_sp;
|
||||
uint32_t lr_lr;
|
||||
/* Coprocessor registers used for argument passing. The data
|
||||
stored here depends on the coprocessors available in the
|
||||
system which are used for function calls in the current ABI.
|
||||
VFP uses eight 64-bit registers, and iWMMXt uses ten. */
|
||||
uint32_t lr_coproc[42];
|
||||
} La_arm_regs;
|
||||
|
||||
/* Return values for calls from PLT on ARM. */
|
||||
typedef struct La_arm_retval
|
||||
{
|
||||
/* Up to four integer registers can be used for a return value in
|
||||
some ABIs (APCS complex long double). */
|
||||
uint32_t lrv_reg[4];
|
||||
|
||||
/* Any coprocessor registers which might be used to return values
|
||||
in the current ABI. */
|
||||
uint32_t lrv_coproc[12];
|
||||
} La_arm_retval;
|
||||
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
|
||||
uintptr_t *__refcook,
|
||||
uintptr_t *__defcook,
|
||||
La_arm_regs *__regs,
|
||||
unsigned int *__flags,
|
||||
const char *__symname,
|
||||
long int *__framesizep);
|
||||
extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
|
||||
uintptr_t *__refcook,
|
||||
uintptr_t *__defcook,
|
||||
const La_arm_regs *__inregs,
|
||||
La_arm_retval *__outregs,
|
||||
const char *__symname);
|
||||
|
||||
__END_DECLS
|
||||
@ -1,25 +0,0 @@
|
||||
/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version.
|
||||
Copyright (C) 2018-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_PROCFS_H
|
||||
# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
|
||||
#endif
|
||||
|
||||
typedef unsigned short int __pr_uid_t;
|
||||
typedef unsigned short int __pr_gid_t;
|
||||
@ -1,34 +0,0 @@
|
||||
/* Types for registers for sys/procfs.h. Arm version.
|
||||
Copyright (C) 1996-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_PROCFS_H
|
||||
# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
|
||||
#endif
|
||||
|
||||
/* Type for a general-purpose register. */
|
||||
typedef unsigned long elf_greg_t;
|
||||
|
||||
/* And the whole bunch of them. We could have used `struct
|
||||
user_regs' directly in the typedef, but tradition says that
|
||||
the register set is an array, which does have some peculiar
|
||||
semantics, so leave it that way. */
|
||||
#define ELF_NGREG (sizeof (struct user_regs) / sizeof (elf_greg_t))
|
||||
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
|
||||
|
||||
/* Register set for the floating-point registers. */
|
||||
typedef struct user_fpregs elf_fpregset_t;
|
||||
83
lib/libc/include/arm-linux-gnueabihf/bits/rseq.h
vendored
83
lib/libc/include/arm-linux-gnueabihf/bits/rseq.h
vendored
@ -1,83 +0,0 @@
|
||||
/* Restartable Sequences Linux arm architecture header.
|
||||
Copyright (C) 2021-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
|
||||
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/>. */
|
||||
|
||||
#ifndef _SYS_RSEQ_H
|
||||
# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
|
||||
#endif
|
||||
|
||||
/*
|
||||
RSEQ_SIG is a signature required before each abort handler code.
|
||||
|
||||
It is a 32-bit value that maps to actual architecture code compiled
|
||||
into applications and libraries. It needs to be defined for each
|
||||
architecture. When choosing this value, it needs to be taken into
|
||||
account that generating invalid instructions may have ill effects on
|
||||
tools like objdump, and may also have impact on the CPU speculative
|
||||
execution efficiency in some cases.
|
||||
|
||||
- ARM little endian
|
||||
|
||||
RSEQ_SIG uses the udf A32 instruction with an uncommon immediate operand
|
||||
value 0x5de3. This traps if user-space reaches this instruction by mistake,
|
||||
and the uncommon operand ensures the kernel does not move the instruction
|
||||
pointer to attacker-controlled code on rseq abort.
|
||||
|
||||
The instruction pattern in the A32 instruction set is:
|
||||
|
||||
e7f5def3 udf #24035 ; 0x5de3
|
||||
|
||||
This translates to the following instruction pattern in the T16 instruction
|
||||
set:
|
||||
|
||||
little endian:
|
||||
def3 udf #243 ; 0xf3
|
||||
e7f5 b.n <7f5>
|
||||
|
||||
- ARMv6+ big endian (BE8):
|
||||
|
||||
ARMv6+ -mbig-endian generates mixed endianness code vs data: little-endian
|
||||
code and big-endian data. The data value of the signature needs to have its
|
||||
byte order reversed to generate the trap instruction:
|
||||
|
||||
Data: 0xf3def5e7
|
||||
|
||||
Translates to this A32 instruction pattern:
|
||||
|
||||
e7f5def3 udf #24035 ; 0x5de3
|
||||
|
||||
Translates to this T16 instruction pattern:
|
||||
|
||||
def3 udf #243 ; 0xf3
|
||||
e7f5 b.n <7f5>
|
||||
|
||||
- Prior to ARMv6 big endian (BE32):
|
||||
|
||||
Prior to ARMv6, -mbig-endian generates big-endian code and data
|
||||
(which match), so the endianness of the data representation of the
|
||||
signature should not be reversed. However, the choice between BE32
|
||||
and BE8 is done by the linker, so we cannot know whether code and
|
||||
data endianness will be mixed before the linker is invoked. So rather
|
||||
than try to play tricks with the linker, the rseq signature is simply
|
||||
data (not a trap instruction) prior to ARMv6 on big endian. This is
|
||||
why the signature is expressed as data (.word) rather than as
|
||||
instruction (.inst) in assembler. */
|
||||
|
||||
#ifdef __ARMEB__
|
||||
# define RSEQ_SIG 0xf3def5e7 /* udf #24035 ; 0x5de3 (ARMv6+) */
|
||||
#else
|
||||
# define RSEQ_SIG 0xe7f5def3 /* udf #24035 ; 0x5de3 */
|
||||
#endif
|
||||
@ -1,36 +0,0 @@
|
||||
/* Copyright (C) 2004-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */
|
||||
|
||||
#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 __ASSEMBLER__
|
||||
/* The exact set of registers saved may depend on the particular core
|
||||
in use, as some coprocessor registers may need to be saved. The C
|
||||
Library ABI requires that the buffer be 8-byte aligned, and
|
||||
recommends that the buffer contain 64 words. The first 26 words
|
||||
are occupied by sp, lr, v1-v6, sl, fp, and d8-d15. */
|
||||
typedef int __jmp_buf[64] __attribute__((__aligned__ (8)));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -1,29 +0,0 @@
|
||||
/* Define SHMLBA. ARM version.
|
||||
Copyright (C) 2018-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SHM_H
|
||||
# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Segment low boundary address multiple. */
|
||||
#define SHMLBA (__getpagesize () << 2)
|
||||
extern int __getpagesize (void) __THROW __attribute__ ((__const__));
|
||||
|
||||
__END_DECLS
|
||||
@ -1,139 +0,0 @@
|
||||
/* Definition for struct stat. Linux/arm version.
|
||||
Copyright (C) 2020-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#if !defined _SYS_STAT_H && !defined _FCNTL_H
|
||||
# error "Never include <bits/struct_stat.h> directly; use <sys/stat.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef _BITS_STRUCT_STAT_H
|
||||
#define _BITS_STRUCT_STAT_H 1
|
||||
|
||||
#include <bits/endian.h>
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
struct stat
|
||||
{
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
#else
|
||||
__dev_t st_dev; /* Device. */
|
||||
unsigned short int __pad1;
|
||||
# ifndef __USE_FILE_OFFSET64
|
||||
__ino_t st_ino; /* File serial number. */
|
||||
# else
|
||||
__ino_t __st_ino; /* 32bit file serial number. */
|
||||
# endif
|
||||
__mode_t st_mode; /* File mode. */
|
||||
__nlink_t st_nlink; /* Link count. */
|
||||
__uid_t st_uid; /* User ID of the file's owner. */
|
||||
__gid_t st_gid; /* Group ID of the file's group.*/
|
||||
__dev_t st_rdev; /* Device number, if device. */
|
||||
unsigned short int __pad2;
|
||||
# ifndef __USE_FILE_OFFSET64
|
||||
__off_t st_size; /* Size of file, in bytes. */
|
||||
# else
|
||||
__off64_t st_size; /* Size of file, in bytes. */
|
||||
# endif
|
||||
__blksize_t st_blksize; /* Optimal block size for I/O. */
|
||||
|
||||
# ifndef __USE_FILE_OFFSET64
|
||||
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
|
||||
# else
|
||||
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
|
||||
# endif
|
||||
# ifdef __USE_XOPEN2K8
|
||||
/* Nanosecond resolution timestamps are stored in a format
|
||||
equivalent to 'struct timespec'. This is the type used
|
||||
whenever possible but the Unix namespace rules do not allow the
|
||||
identifier 'timespec' to appear in the <sys/stat.h> header.
|
||||
Therefore we have to handle the use of this header in strictly
|
||||
standard-compliant sources special. */
|
||||
struct timespec st_atim; /* Time of last access. */
|
||||
struct timespec st_mtim; /* Time of last modification. */
|
||||
struct timespec st_ctim; /* Time of last status change. */
|
||||
# define st_atime st_atim.tv_sec /* Backward compatibility. */
|
||||
# define st_mtime st_mtim.tv_sec
|
||||
# define st_ctime st_ctim.tv_sec
|
||||
# else
|
||||
__time_t st_atime; /* Time of last access. */
|
||||
unsigned long int st_atimensec; /* Nscecs of last access. */
|
||||
__time_t st_mtime; /* Time of last modification. */
|
||||
unsigned long int st_mtimensec; /* Nsecs of last modification. */
|
||||
__time_t st_ctime; /* Time of last status change. */
|
||||
unsigned long int st_ctimensec; /* Nsecs of last status change. */
|
||||
# endif
|
||||
# ifndef __USE_FILE_OFFSET64
|
||||
unsigned long int __glibc_reserved4;
|
||||
unsigned long int __glibc_reserved5;
|
||||
# else
|
||||
__ino64_t st_ino; /* File serial number. */
|
||||
# endif
|
||||
#endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct stat64
|
||||
{
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
# else
|
||||
__dev_t st_dev; /* Device. */
|
||||
unsigned int __pad1;
|
||||
|
||||
__ino_t __st_ino; /* 32bit file serial number. */
|
||||
__mode_t st_mode; /* File mode. */
|
||||
__nlink_t st_nlink; /* Link count. */
|
||||
__uid_t st_uid; /* User ID of the file's owner. */
|
||||
__gid_t st_gid; /* Group ID of the file's group.*/
|
||||
__dev_t st_rdev; /* Device number, if device. */
|
||||
unsigned int __pad2;
|
||||
__off64_t st_size; /* Size of file, in bytes. */
|
||||
__blksize_t st_blksize; /* Optimal block size for I/O. */
|
||||
|
||||
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
|
||||
# ifdef __USE_XOPEN2K8
|
||||
/* Nanosecond resolution timestamps are stored in a format
|
||||
equivalent to 'struct timespec'. This is the type used
|
||||
whenever possible but the Unix namespace rules do not allow the
|
||||
identifier 'timespec' to appear in the <sys/stat.h> header.
|
||||
Therefore we have to handle the use of this header in strictly
|
||||
standard-compliant sources special. */
|
||||
struct timespec st_atim; /* Time of last access. */
|
||||
struct timespec st_mtim; /* Time of last modification. */
|
||||
struct timespec st_ctim; /* Time of last status change. */
|
||||
# else
|
||||
__time_t st_atime; /* Time of last access. */
|
||||
unsigned long int st_atimensec; /* Nscecs of last access. */
|
||||
__time_t st_mtime; /* Time of last modification. */
|
||||
unsigned long int st_mtimensec; /* Nsecs of last modification. */
|
||||
__time_t st_ctime; /* Time of last status change. */
|
||||
unsigned long int st_ctimensec; /* Nsecs of last status change. */
|
||||
# endif
|
||||
__ino64_t st_ino; /* File serial number. */
|
||||
# endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Tell code we have these members. */
|
||||
#define _STATBUF_ST_BLKSIZE
|
||||
#define _STATBUF_ST_RDEV
|
||||
/* Nanosecond resolution time values are supported. */
|
||||
#define _STATBUF_ST_NSEC
|
||||
|
||||
|
||||
#endif /* _BITS_STRUCT_STAT_H */
|
||||
@ -1,20 +0,0 @@
|
||||
/* Bit size of the time_t type at glibc build time, Linux/ARM.
|
||||
Copyright (C) 2021-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Size in bits of the 'time_t' type of the default ABI. */
|
||||
#define __TIMESIZE 32
|
||||
@ -1,74 +0,0 @@
|
||||
/* bits/typesizes.h -- underlying types for *_t. ARM version.
|
||||
Copyright (C) 2002-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_TYPES_H
|
||||
# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef _BITS_TYPESIZES_H
|
||||
#define _BITS_TYPESIZES_H 1
|
||||
|
||||
/* See <bits/types.h> for the meaning of these macros. This file exists so
|
||||
that <bits/types.h> need not vary across different GNU platforms. */
|
||||
|
||||
#define __DEV_T_TYPE __UQUAD_TYPE
|
||||
#define __UID_T_TYPE __U32_TYPE
|
||||
#define __GID_T_TYPE __U32_TYPE
|
||||
#define __INO_T_TYPE __ULONGWORD_TYPE
|
||||
#define __INO64_T_TYPE __UQUAD_TYPE
|
||||
#define __MODE_T_TYPE __U32_TYPE
|
||||
#define __NLINK_T_TYPE __UWORD_TYPE
|
||||
#define __OFF_T_TYPE __SLONGWORD_TYPE
|
||||
#define __OFF64_T_TYPE __SQUAD_TYPE
|
||||
#define __PID_T_TYPE __S32_TYPE
|
||||
#define __RLIM_T_TYPE __ULONGWORD_TYPE
|
||||
#define __RLIM64_T_TYPE __UQUAD_TYPE
|
||||
#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
|
||||
#define __BLKCNT64_T_TYPE __SQUAD_TYPE
|
||||
#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
|
||||
#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
|
||||
#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
|
||||
#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
|
||||
#define __FSWORD_T_TYPE __SWORD_TYPE
|
||||
#define __ID_T_TYPE __U32_TYPE
|
||||
#define __CLOCK_T_TYPE __SLONGWORD_TYPE
|
||||
#define __TIME_T_TYPE __SLONGWORD_TYPE
|
||||
#define __USECONDS_T_TYPE __U32_TYPE
|
||||
#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
|
||||
#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
|
||||
#define __DADDR_T_TYPE __S32_TYPE
|
||||
#define __KEY_T_TYPE __S32_TYPE
|
||||
#define __CLOCKID_T_TYPE __S32_TYPE
|
||||
#define __TIMER_T_TYPE void *
|
||||
#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
|
||||
#define __FSID_T_TYPE struct { int __val[2]; }
|
||||
#define __SSIZE_T_TYPE __SWORD_TYPE
|
||||
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
|
||||
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
|
||||
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
|
||||
|
||||
#define __RLIM_T_MATCHES_RLIM64_T 0
|
||||
#define __STATFS_MATCHES_STATFS64 0
|
||||
/* And for getitimer, setitimer and rusage */
|
||||
#define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
|
||||
|
||||
/* Number of descriptors that can fit in an `fd_set'. */
|
||||
#define __FD_SETSIZE 1024
|
||||
|
||||
|
||||
#endif /* bits/typesizes.h */
|
||||
@ -1,75 +0,0 @@
|
||||
/* FPU control word definitions. ARM VFP version.
|
||||
Copyright (C) 2004-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _FPU_CONTROL_H
|
||||
#define _FPU_CONTROL_H
|
||||
|
||||
#if !(defined(_LIBC) && !defined(_LIBC_TEST)) && defined(__SOFTFP__)
|
||||
|
||||
#define _FPU_RESERVED 0xffffffff
|
||||
#define _FPU_DEFAULT 0x00000000
|
||||
typedef unsigned int fpu_control_t;
|
||||
#define _FPU_GETCW(cw) (cw) = 0
|
||||
#define _FPU_SETCW(cw) (void) (cw)
|
||||
extern fpu_control_t __fpu_control;
|
||||
|
||||
#else
|
||||
|
||||
/* masking of interrupts */
|
||||
#define _FPU_MASK_IM 0x00000100 /* invalid operation */
|
||||
#define _FPU_MASK_ZM 0x00000200 /* divide by zero */
|
||||
#define _FPU_MASK_OM 0x00000400 /* overflow */
|
||||
#define _FPU_MASK_UM 0x00000800 /* underflow */
|
||||
#define _FPU_MASK_PM 0x00001000 /* inexact */
|
||||
|
||||
#define _FPU_MASK_NZCV 0xf0000000 /* NZCV flags */
|
||||
#define _FPU_MASK_RM 0x00c00000 /* rounding mode */
|
||||
#define _FPU_MASK_EXCEPT 0x00001f1f /* all exception flags */
|
||||
|
||||
/* Some bits in the FPSCR are not yet defined. They must be preserved when
|
||||
modifying the contents. */
|
||||
#define _FPU_RESERVED 0x00086060
|
||||
#define _FPU_DEFAULT 0x00000000
|
||||
|
||||
/* Default + exceptions enabled. */
|
||||
#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00)
|
||||
|
||||
/* Type of the control word. */
|
||||
typedef unsigned int fpu_control_t;
|
||||
|
||||
/* Macros for accessing the hardware control word. */
|
||||
#ifdef __SOFTFP__
|
||||
/* This is fmrx %0, fpscr. */
|
||||
# define _FPU_GETCW(cw) \
|
||||
__asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw))
|
||||
/* This is fmxr fpscr, %0. */
|
||||
# define _FPU_SETCW(cw) \
|
||||
__asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw))
|
||||
#else
|
||||
# define _FPU_GETCW(cw) \
|
||||
__asm__ __volatile__ ("vmrs %0, fpscr" : "=r" (cw))
|
||||
# define _FPU_SETCW(cw) \
|
||||
__asm__ __volatile__ ("vmsr fpscr, %0" : : "r" (cw))
|
||||
#endif
|
||||
|
||||
/* Default control word set at startup. */
|
||||
extern fpu_control_t __fpu_control;
|
||||
|
||||
#endif /* __SOFTFP__ */
|
||||
|
||||
#endif /* _FPU_CONTROL_H */
|
||||
@ -1,14 +0,0 @@
|
||||
/* This file is automatically generated.
|
||||
It defines macros to allow user program to find the shared
|
||||
library files which come as part of GNU libc. */
|
||||
#ifndef __GNU_LIB_NAMES_H
|
||||
#define __GNU_LIB_NAMES_H 1
|
||||
|
||||
#if !defined __ARM_PCS_VFP
|
||||
# include <gnu/lib-names-soft.h>
|
||||
#endif
|
||||
#if defined __ARM_PCS_VFP
|
||||
# include <gnu/lib-names-hard.h>
|
||||
#endif
|
||||
|
||||
#endif /* gnu/lib-names.h */
|
||||
11
lib/libc/include/arm-linux-gnueabihf/gnu/stubs.h
vendored
11
lib/libc/include/arm-linux-gnueabihf/gnu/stubs.h
vendored
@ -1,11 +0,0 @@
|
||||
/* This file is automatically generated.
|
||||
This file selects the right generated file of `__stub_FUNCTION' macros
|
||||
based on the architecture being compiled for. */
|
||||
|
||||
|
||||
#if !defined __ARM_PCS_VFP
|
||||
# include <gnu/stubs-soft.h>
|
||||
#endif
|
||||
#if defined __ARM_PCS_VFP
|
||||
# include <gnu/stubs-hard.h>
|
||||
#endif
|
||||
226
lib/libc/include/arm-linux-gnueabihf/sys/ptrace.h
vendored
226
lib/libc/include/arm-linux-gnueabihf/sys/ptrace.h
vendored
@ -1,226 +0,0 @@
|
||||
/* `ptrace' debugger support interface. Linux/ARM version.
|
||||
Copyright (C) 1996-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_PTRACE_H
|
||||
#define _SYS_PTRACE_H 1
|
||||
|
||||
#include <features.h>
|
||||
#include <bits/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Type of the REQUEST argument to `ptrace.' */
|
||||
enum __ptrace_request
|
||||
{
|
||||
/* Indicate that the process making this request should be traced.
|
||||
All signals received by this process can be intercepted by its
|
||||
parent, and its parent can use the other `ptrace' requests. */
|
||||
PTRACE_TRACEME = 0,
|
||||
#define PT_TRACE_ME PTRACE_TRACEME
|
||||
|
||||
/* Return the word in the process's text space at address ADDR. */
|
||||
PTRACE_PEEKTEXT = 1,
|
||||
#define PT_READ_I PTRACE_PEEKTEXT
|
||||
|
||||
/* Return the word in the process's data space at address ADDR. */
|
||||
PTRACE_PEEKDATA = 2,
|
||||
#define PT_READ_D PTRACE_PEEKDATA
|
||||
|
||||
/* Return the word in the process's user area at offset ADDR. */
|
||||
PTRACE_PEEKUSER = 3,
|
||||
#define PT_READ_U PTRACE_PEEKUSER
|
||||
|
||||
/* Write the word DATA into the process's text space at address ADDR. */
|
||||
PTRACE_POKETEXT = 4,
|
||||
#define PT_WRITE_I PTRACE_POKETEXT
|
||||
|
||||
/* Write the word DATA into the process's data space at address ADDR. */
|
||||
PTRACE_POKEDATA = 5,
|
||||
#define PT_WRITE_D PTRACE_POKEDATA
|
||||
|
||||
/* Write the word DATA into the process's user area at offset ADDR. */
|
||||
PTRACE_POKEUSER = 6,
|
||||
#define PT_WRITE_U PTRACE_POKEUSER
|
||||
|
||||
/* Continue the process. */
|
||||
PTRACE_CONT = 7,
|
||||
#define PT_CONTINUE PTRACE_CONT
|
||||
|
||||
/* Kill the process. */
|
||||
PTRACE_KILL = 8,
|
||||
#define PT_KILL PTRACE_KILL
|
||||
|
||||
/* Single step the process. */
|
||||
PTRACE_SINGLESTEP = 9,
|
||||
#define PT_STEP PTRACE_SINGLESTEP
|
||||
|
||||
/* Get all general purpose registers used by a process. */
|
||||
PTRACE_GETREGS = 12,
|
||||
#define PT_GETREGS PTRACE_GETREGS
|
||||
|
||||
/* Set all general purpose registers used by a process. */
|
||||
PTRACE_SETREGS = 13,
|
||||
#define PT_SETREGS PTRACE_SETREGS
|
||||
|
||||
/* Get all floating point registers used by a process. */
|
||||
PTRACE_GETFPREGS = 14,
|
||||
#define PT_GETFPREGS PTRACE_GETFPREGS
|
||||
|
||||
/* Set all floating point registers used by a process. */
|
||||
PTRACE_SETFPREGS = 15,
|
||||
#define PT_SETFPREGS PTRACE_SETFPREGS
|
||||
|
||||
/* Attach to a process that is already running. */
|
||||
PTRACE_ATTACH = 16,
|
||||
#define PT_ATTACH PTRACE_ATTACH
|
||||
|
||||
/* Detach from a process attached to with PTRACE_ATTACH. */
|
||||
PTRACE_DETACH = 17,
|
||||
#define PT_DETACH PTRACE_DETACH
|
||||
|
||||
/* Get the iWMMXt state of a process. */
|
||||
PTRACE_GETWMMXREGS = 18,
|
||||
#define PT_GETWMMXREGS PTRACE_GETWMMXREGS
|
||||
|
||||
/* Set the iWMMXt state of a process. */
|
||||
PTRACE_SETWMMXREGS = 19,
|
||||
#define PT_SETWMMXREGS PTRACE_SETWMMXREGS
|
||||
|
||||
/* Get the thread pointer of a process. */
|
||||
PTRACE_GET_THREAD_AREA = 22,
|
||||
#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
|
||||
|
||||
/* Change the syscall number of a process. */
|
||||
PTRACE_SET_SYSCALL = 23,
|
||||
#define PT_SET_SYSCALL PTRACE_SET_SYSCALL
|
||||
|
||||
/* Continue and stop at the next entry to or return from syscall. */
|
||||
PTRACE_SYSCALL = 24,
|
||||
#define PT_SYSCALL PTRACE_SYSCALL
|
||||
|
||||
/* Get the Crunch state of a process. */
|
||||
PTRACE_GETCRUNCHREGS = 25,
|
||||
#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
|
||||
|
||||
/* Set the Crunch state of a process. */
|
||||
PTRACE_SETCRUNCHREGS = 26,
|
||||
#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
|
||||
|
||||
/* Get all VFP registers used by a process. */
|
||||
PTRACE_GETVFPREGS = 27,
|
||||
#define PT_GETVFPREGS PTRACE_GETVFPREGS
|
||||
|
||||
/* Set all VFP registers used by a process. */
|
||||
PTRACE_SETVFPREGS = 28,
|
||||
#define PT_SETVFPREGS PTRACE_SETVFPREGS
|
||||
|
||||
/* Get all hardware breakpoint registers. */
|
||||
PTRACE_GETHBPREGS = 29,
|
||||
#define PT_GETHBPREGS PTRACE_GETHBPREGS
|
||||
|
||||
/* Set all hardware breakpoint registers. */
|
||||
PTRACE_SETHBPREGS = 30,
|
||||
#define PT_SETHBPREGS PTRACE_SETHBPREGS
|
||||
|
||||
/* Get the ELF fdpic loadmap address. */
|
||||
PTRACE_GETFDPIC = 31,
|
||||
#define PT_GETFDPIC PTRACE_GETFDPIC
|
||||
|
||||
/* Set ptrace filter options. */
|
||||
PTRACE_SETOPTIONS = 0x4200,
|
||||
#define PT_SETOPTIONS PTRACE_SETOPTIONS
|
||||
|
||||
/* Get last ptrace message. */
|
||||
PTRACE_GETEVENTMSG = 0x4201,
|
||||
#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
|
||||
|
||||
/* Get siginfo for process. */
|
||||
PTRACE_GETSIGINFO = 0x4202,
|
||||
#define PT_GETSIGINFO PTRACE_GETSIGINFO
|
||||
|
||||
/* Set new siginfo for process. */
|
||||
PTRACE_SETSIGINFO = 0x4203,
|
||||
#define PT_SETSIGINFO PTRACE_SETSIGINFO
|
||||
|
||||
/* Get register content. */
|
||||
PTRACE_GETREGSET = 0x4204,
|
||||
#define PTRACE_GETREGSET PTRACE_GETREGSET
|
||||
|
||||
/* Set register content. */
|
||||
PTRACE_SETREGSET = 0x4205,
|
||||
#define PTRACE_SETREGSET PTRACE_SETREGSET
|
||||
|
||||
/* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
|
||||
signal or group stop state. */
|
||||
PTRACE_SEIZE = 0x4206,
|
||||
#define PTRACE_SEIZE PTRACE_SEIZE
|
||||
|
||||
/* Trap seized tracee. */
|
||||
PTRACE_INTERRUPT = 0x4207,
|
||||
#define PTRACE_INTERRUPT PTRACE_INTERRUPT
|
||||
|
||||
/* Wait for next group event. */
|
||||
PTRACE_LISTEN = 0x4208,
|
||||
#define PTRACE_LISTEN PTRACE_LISTEN
|
||||
|
||||
/* Retrieve siginfo_t structures without removing signals from a queue. */
|
||||
PTRACE_PEEKSIGINFO = 0x4209,
|
||||
#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
|
||||
|
||||
/* Get the mask of blocked signals. */
|
||||
PTRACE_GETSIGMASK = 0x420a,
|
||||
#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
|
||||
|
||||
/* Change the mask of blocked signals. */
|
||||
PTRACE_SETSIGMASK = 0x420b,
|
||||
#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
|
||||
|
||||
/* Get seccomp BPF filters. */
|
||||
PTRACE_SECCOMP_GET_FILTER = 0x420c,
|
||||
#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
|
||||
|
||||
/* Get seccomp BPF filter metadata. */
|
||||
PTRACE_SECCOMP_GET_METADATA = 0x420d,
|
||||
#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
|
||||
|
||||
/* Get information about system call. */
|
||||
PTRACE_GET_SYSCALL_INFO = 0x420e,
|
||||
#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
|
||||
|
||||
/* Get rseq configuration information. */
|
||||
PTRACE_GET_RSEQ_CONFIGURATION = 0x420f,
|
||||
#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
|
||||
|
||||
/* Set configuration for syscall user dispatch. */
|
||||
PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210,
|
||||
#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \
|
||||
PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG
|
||||
|
||||
/* Get configuration for syscall user dispatch. */
|
||||
PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211
|
||||
#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \
|
||||
PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG
|
||||
};
|
||||
|
||||
|
||||
#include <bits/ptrace-shared.h>
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _SYS_PTRACE_H */
|
||||
144
lib/libc/include/arm-linux-gnueabihf/sys/ucontext.h
vendored
144
lib/libc/include/arm-linux-gnueabihf/sys/ucontext.h
vendored
@ -1,144 +0,0 @@
|
||||
/* Copyright (C) 1998-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* System V/ARM ABI compliant context switching support. */
|
||||
|
||||
#ifndef _SYS_UCONTEXT_H
|
||||
#define _SYS_UCONTEXT_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#include <bits/types/sigset_t.h>
|
||||
#include <bits/types/stack_t.h>
|
||||
|
||||
|
||||
#ifdef __USE_MISC
|
||||
# define __ctx(fld) fld
|
||||
#else
|
||||
# define __ctx(fld) __ ## fld
|
||||
#endif
|
||||
|
||||
#ifdef __USE_MISC
|
||||
typedef int greg_t;
|
||||
|
||||
/* Number of general registers. */
|
||||
# define NGREG 18
|
||||
|
||||
/* Container for all general registers. */
|
||||
typedef greg_t gregset_t[NGREG];
|
||||
|
||||
/* Number of each register is the `gregset_t' array. */
|
||||
enum
|
||||
{
|
||||
REG_R0 = 0,
|
||||
# define REG_R0 REG_R0
|
||||
REG_R1 = 1,
|
||||
# define REG_R1 REG_R1
|
||||
REG_R2 = 2,
|
||||
# define REG_R2 REG_R2
|
||||
REG_R3 = 3,
|
||||
# define REG_R3 REG_R3
|
||||
REG_R4 = 4,
|
||||
# define REG_R4 REG_R4
|
||||
REG_R5 = 5,
|
||||
# define REG_R5 REG_R5
|
||||
REG_R6 = 6,
|
||||
# define REG_R6 REG_R6
|
||||
REG_R7 = 7,
|
||||
# define REG_R7 REG_R7
|
||||
REG_R8 = 8,
|
||||
# define REG_R8 REG_R8
|
||||
REG_R9 = 9,
|
||||
# define REG_R9 REG_R9
|
||||
REG_R10 = 10,
|
||||
# define REG_R10 REG_R10
|
||||
REG_R11 = 11,
|
||||
# define REG_R11 REG_R11
|
||||
REG_R12 = 12,
|
||||
# define REG_R12 REG_R12
|
||||
REG_R13 = 13,
|
||||
# define REG_R13 REG_R13
|
||||
REG_R14 = 14,
|
||||
# define REG_R14 REG_R14
|
||||
REG_R15 = 15
|
||||
# define REG_R15 REG_R15
|
||||
};
|
||||
|
||||
struct _libc_fpstate
|
||||
{
|
||||
struct
|
||||
{
|
||||
unsigned int sign1:1;
|
||||
unsigned int unused:15;
|
||||
unsigned int sign2:1;
|
||||
unsigned int exponent:14;
|
||||
unsigned int j:1;
|
||||
unsigned int mantissa1:31;
|
||||
unsigned int mantissa0:32;
|
||||
} fpregs[8];
|
||||
unsigned int fpsr:32;
|
||||
unsigned int fpcr:32;
|
||||
unsigned char ftype[8];
|
||||
unsigned int init_flag;
|
||||
};
|
||||
/* Structure to describe FPU registers. */
|
||||
typedef struct _libc_fpstate fpregset_t;
|
||||
#endif
|
||||
|
||||
/* Context to describe whole processor state. This only describes
|
||||
the core registers; coprocessor registers get saved elsewhere
|
||||
(e.g. in uc_regspace, or somewhere unspecified on the stack
|
||||
during non-RT signal handlers). */
|
||||
typedef struct
|
||||
{
|
||||
unsigned long int __ctx(trap_no);
|
||||
unsigned long int __ctx(error_code);
|
||||
unsigned long int __ctx(oldmask);
|
||||
unsigned long int __ctx(arm_r0);
|
||||
unsigned long int __ctx(arm_r1);
|
||||
unsigned long int __ctx(arm_r2);
|
||||
unsigned long int __ctx(arm_r3);
|
||||
unsigned long int __ctx(arm_r4);
|
||||
unsigned long int __ctx(arm_r5);
|
||||
unsigned long int __ctx(arm_r6);
|
||||
unsigned long int __ctx(arm_r7);
|
||||
unsigned long int __ctx(arm_r8);
|
||||
unsigned long int __ctx(arm_r9);
|
||||
unsigned long int __ctx(arm_r10);
|
||||
unsigned long int __ctx(arm_fp);
|
||||
unsigned long int __ctx(arm_ip);
|
||||
unsigned long int __ctx(arm_sp);
|
||||
unsigned long int __ctx(arm_lr);
|
||||
unsigned long int __ctx(arm_pc);
|
||||
unsigned long int __ctx(arm_cpsr);
|
||||
unsigned long int __ctx(fault_address);
|
||||
} mcontext_t;
|
||||
|
||||
/* Userlevel context. */
|
||||
typedef struct ucontext_t
|
||||
{
|
||||
unsigned long __ctx(uc_flags);
|
||||
struct ucontext_t *uc_link;
|
||||
stack_t uc_stack;
|
||||
mcontext_t uc_mcontext;
|
||||
sigset_t uc_sigmask;
|
||||
unsigned long __ctx(uc_regspace)[128] __attribute__((__aligned__(8)));
|
||||
} ucontext_t;
|
||||
|
||||
#undef __ctx
|
||||
|
||||
#endif /* sys/ucontext.h */
|
||||
71
lib/libc/include/arm-linux-gnueabihf/sys/user.h
vendored
71
lib/libc/include/arm-linux-gnueabihf/sys/user.h
vendored
@ -1,71 +0,0 @@
|
||||
/* Copyright (C) 1998-2025 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
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_USER_H
|
||||
#define _SYS_USER_H 1
|
||||
|
||||
/* The whole purpose of this file is for GDB and GDB only. Don't read
|
||||
too much into it. Don't use it for anything other than GDB unless
|
||||
you know what you are doing. */
|
||||
|
||||
struct user_fpregs
|
||||
{
|
||||
struct fp_reg
|
||||
{
|
||||
unsigned int sign1:1;
|
||||
unsigned int unused:15;
|
||||
unsigned int sign2:1;
|
||||
unsigned int exponent:14;
|
||||
unsigned int j:1;
|
||||
unsigned int mantissa1:31;
|
||||
unsigned int mantissa0:32;
|
||||
} fpregs[8];
|
||||
unsigned int fpsr:32;
|
||||
unsigned int fpcr:32;
|
||||
unsigned char ftype[8];
|
||||
unsigned int init_flag;
|
||||
};
|
||||
|
||||
struct user_regs
|
||||
{
|
||||
unsigned long int uregs[18];
|
||||
};
|
||||
|
||||
struct user
|
||||
{
|
||||
struct user_regs regs; /* General registers */
|
||||
int u_fpvalid; /* True if math co-processor being used. */
|
||||
|
||||
unsigned long int u_tsize; /* Text segment size (pages). */
|
||||
unsigned long int u_dsize; /* Data segment size (pages). */
|
||||
unsigned long int u_ssize; /* Stack segment size (pages). */
|
||||
|
||||
unsigned long start_code; /* Starting virtual address of text. */
|
||||
unsigned long start_stack; /* Starting virtual address of stack. */
|
||||
|
||||
long int signal; /* Signal that caused the core dump. */
|
||||
int reserved; /* No longer used */
|
||||
struct user_regs *u_ar0; /* help gdb to find the general registers. */
|
||||
|
||||
unsigned long magic; /* uniquely identify a core file */
|
||||
char u_comm[32]; /* User command that was responsible */
|
||||
int u_debugreg[8];
|
||||
struct user_fpregs u_fp; /* Floating point registers */
|
||||
struct user_fpregs *u_fp0; /* help gdb to find the FP registers. */
|
||||
};
|
||||
|
||||
#endif /* sys/user.h */
|
||||
63
lib/libc/include/arm-netbsd-eabihf/float.h
vendored
63
lib/libc/include/arm-netbsd-eabihf/float.h
vendored
@ -1,63 +0,0 @@
|
||||
/* $NetBSD: float.h,v 1.8 2014/01/29 01:10:36 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_FLOAT_H_
|
||||
#define _ARM_FLOAT_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef __ARM_PCS_AAPCS64
|
||||
|
||||
#define LDBL_MANT_DIG __LDBL_MANT_DIG__
|
||||
#define LDBL_DIG __LDBL_DIG__
|
||||
#define LDBL_MIN_EXP __LDBL_MIN_EXP__
|
||||
#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
|
||||
#define LDBL_MAX_EXP __LDBL_MAX_EXP__
|
||||
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
|
||||
#define LDBL_EPSILON __LDBL_EPSILON__
|
||||
#define LDBL_MIN __LDBL_MIN__
|
||||
#define LDBL_MAX __LDBL_MAX__
|
||||
|
||||
#endif /* __ARM_PCS_AAPCS64 */
|
||||
|
||||
#include <sys/float_ieee754.h>
|
||||
|
||||
#if defined(__ARM_PCS_AAPCS64) \
|
||||
&& ((!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) \
|
||||
&& !defined(_XOPEN_SOURCE)) \
|
||||
|| (__STDC_VERSION__ - 0) >= 199901L \
|
||||
|| (_POSIX_C_SOURCE - 0) >= 200112L \
|
||||
|| ((_XOPEN_SOURCE - 0) >= 600) \
|
||||
|| defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE))
|
||||
#define DECIMAL_DIG __DECIMAL_DIG__
|
||||
#endif /* __ARM_PCS_AAPCS64 && ... */
|
||||
|
||||
#endif /* !_ARM_FLOAT_H_ */
|
||||
@ -1,3 +0,0 @@
|
||||
/* $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ */
|
||||
|
||||
#include <sys/common_ansi.h>
|
||||
@ -1,59 +0,0 @@
|
||||
/* $NetBSD: aout_machdep.h,v 1.8 2018/03/17 04:16:09 ryo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1996 Mark Brinicombe.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Mark Brinicombe
|
||||
* 4. The name of the author may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_AOUT_MACHDEP_H_
|
||||
#define _ARM_AOUT_MACHDEP_H_
|
||||
|
||||
#define AOUT_LDPGSZ 4096
|
||||
|
||||
/* Relocation format. */
|
||||
|
||||
struct relocation_info_arm6 {
|
||||
int r_address; /* offset in text or data segment */
|
||||
unsigned r_symbolnum:24;/* ordinal number of add symbol */
|
||||
unsigned r_pcrel:1; /* 1 if value should be pc-relative */
|
||||
unsigned r_length:2; /* 0=byte, 1=word, 2=long, 3=24bits shifted by 2 */
|
||||
unsigned r_extern:1; /* 1 if need to add symbol to value */
|
||||
unsigned r_neg:1; /* 1 if addend is negative */
|
||||
unsigned r_baserel:1; /* 1 if linkage table relative */
|
||||
unsigned r_jmptable:1; /* 1 if relocation to jump table */
|
||||
unsigned r_relative:1; /* 1 if load address relative */
|
||||
};
|
||||
|
||||
#define relocation_info relocation_info_arm6
|
||||
|
||||
/* No special executable format */
|
||||
#define cpu_exec_aout_makecmds(a, b) ENOEXEC
|
||||
|
||||
#endif /* _ARM_AOUT_MACHDEP_H_ */
|
||||
305
lib/libc/include/arm-netbsd-eabihf/machine/asm.h
vendored
305
lib/libc/include/arm-netbsd-eabihf/machine/asm.h
vendored
@ -1,305 +0,0 @@
|
||||
/* $NetBSD: asm.h,v 1.34 2020/04/23 23:22:41 jakllsch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* William Jolitz.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)asm.h 5.5 (Berkeley) 5/7/91
|
||||
*/
|
||||
|
||||
#ifndef _ARM_ASM_H_
|
||||
#define _ARM_ASM_H_
|
||||
|
||||
#include <arm/cdefs.h>
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_cpuoptions.h"
|
||||
#endif
|
||||
|
||||
#ifdef __thumb__
|
||||
#define THUMB_INSN(n) n
|
||||
#else
|
||||
#define THUMB_INSN(n)
|
||||
#endif
|
||||
|
||||
#define __BIT(n) (1 << (n))
|
||||
#define __BITS(hi,lo) ((~((~0)<<((hi)+1)))&((~0)<<(lo)))
|
||||
|
||||
#define __LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask))
|
||||
#define __SHIFTOUT(__x, __mask) (((__x) & (__mask)) / __LOWEST_SET_BIT(__mask))
|
||||
#define __SHIFTIN(__x, __mask) ((__x) * __LOWEST_SET_BIT(__mask))
|
||||
|
||||
#define _C_LABEL(x) x
|
||||
#define _ASM_LABEL(x) x
|
||||
|
||||
#ifdef __STDC__
|
||||
# define __CONCAT(x,y) x ## y
|
||||
# define __STRING(x) #x
|
||||
#else
|
||||
# define __CONCAT(x,y) x/**/y
|
||||
# define __STRING(x) "x"
|
||||
#endif
|
||||
|
||||
#ifndef _ALIGN_TEXT
|
||||
# define _ALIGN_TEXT .align 2
|
||||
#endif
|
||||
|
||||
#ifndef _TEXT_SECTION
|
||||
#define _TEXT_SECTION .text
|
||||
#endif
|
||||
|
||||
#ifdef __arm__
|
||||
|
||||
.syntax unified
|
||||
|
||||
/*
|
||||
* gas/arm uses @ as a single comment character and thus cannot be used here
|
||||
* Instead it recognised the # instead of an @ symbols in .type directives
|
||||
* We define a couple of macros so that assembly code will not be dependent
|
||||
* on one or the other.
|
||||
*/
|
||||
#define _ASM_TYPE_FUNCTION %function
|
||||
#define _ASM_TYPE_OBJECT %object
|
||||
#define _THUMB_ENTRY(x) \
|
||||
_TEXT_SECTION; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; \
|
||||
.thumb_func; .code 16; x:
|
||||
#define _ARM_ENTRY(x) \
|
||||
_TEXT_SECTION; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; \
|
||||
.code 32; x:
|
||||
#ifdef __thumb__
|
||||
#define _ENTRY(x) _THUMB_ENTRY(x)
|
||||
#else
|
||||
#define _ENTRY(x) _ARM_ENTRY(x)
|
||||
#endif
|
||||
#define _END(x) .size x,.-x
|
||||
|
||||
#ifdef GPROF
|
||||
# define _PROF_PROLOGUE \
|
||||
mov ip, lr; bl __mcount
|
||||
#else
|
||||
# define _PROF_PROLOGUE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __aarch64__
|
||||
#define _ASM_TYPE_FUNCTION @function
|
||||
#define _ASM_TYPE_OBJECT @object
|
||||
#define _ENTRY(x) \
|
||||
_TEXT_SECTION; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x:
|
||||
#define _END(x) .size x,.-x
|
||||
|
||||
#ifdef GPROF
|
||||
# define _PROF_PROLOGUE \
|
||||
stp x29, x30, [sp, #-16]!; \
|
||||
mov fp, sp; \
|
||||
bl __mcount; \
|
||||
ldp x29, x30, [sp], #16;
|
||||
#else
|
||||
# define _PROF_PROLOGUE
|
||||
#endif
|
||||
|
||||
#ifdef __PIC__
|
||||
#define GOTREF(x) :got:x
|
||||
#define GOTLO12(x) :got_lo12:x
|
||||
#else
|
||||
#define GOTREF(x) x
|
||||
#define GOTLO12(x) :lo12:x
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef ARMV85_BTI
|
||||
#define _BTI_PROLOGUE \
|
||||
.byte 0x5F, 0x24, 0x03, 0xD5 /* the "bti c" instruction */
|
||||
#else
|
||||
#define _BTI_PROLOGUE /* nothing */
|
||||
#endif
|
||||
|
||||
#define ENTRY(y) _ENTRY(_C_LABEL(y)); _BTI_PROLOGUE ; _PROF_PROLOGUE
|
||||
#define ENTRY_NP(y) _ENTRY(_C_LABEL(y)); _BTI_PROLOGUE
|
||||
#define ENTRY_NBTI(y) _ENTRY(_C_LABEL(y))
|
||||
#define END(y) _END(_C_LABEL(y))
|
||||
#define ARM_ENTRY(y) _ARM_ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
|
||||
#define ARM_ENTRY_NP(y) _ARM_ENTRY(_C_LABEL(y))
|
||||
#define THUMB_ENTRY(y) _THUMB_ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
|
||||
#define THUMB_ENTRY_NP(y) _THUMB_ENTRY(_C_LABEL(y))
|
||||
#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
|
||||
#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))
|
||||
#define ASEND(y) _END(_ASM_LABEL(y))
|
||||
#define ARM_ASENTRY(y) _ARM_ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
|
||||
#define ARM_ASENTRY_NP(y) _ARM_ENTRY(_ASM_LABEL(y))
|
||||
#define THUMB_ASENTRY(y) _THUMB_ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
|
||||
#define THUMB_ASENTRY_NP(y) _THUMB_ENTRY(_ASM_LABEL(y))
|
||||
|
||||
#define ASMSTR .asciz
|
||||
|
||||
#ifdef __PIC__
|
||||
#define REL_SYM(a, b) ((a) - (b))
|
||||
#define PLT_SYM(x) x
|
||||
#define GOT_SYM(x) PIC_SYM(x, GOT)
|
||||
#define GOT_GET(x,got,sym) \
|
||||
ldr x, sym; \
|
||||
ldr x, [x, got]
|
||||
#define GOT_INIT(got,gotsym,pclabel) \
|
||||
ldr got, gotsym; \
|
||||
pclabel: add got, got, pc
|
||||
#ifdef __thumb__
|
||||
#define GOT_INITSYM(gotsym,pclabel) \
|
||||
.align 0; \
|
||||
gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+4)
|
||||
#else
|
||||
#define GOT_INITSYM(gotsym,pclabel) \
|
||||
.align 0; \
|
||||
gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+8)
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#define PIC_SYM(x,y) x ## ( ## y ## )
|
||||
#else
|
||||
#define PIC_SYM(x,y) x/**/(/**/y/**/)
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define REL_SYM(a, b) (a)
|
||||
#define PLT_SYM(x) x
|
||||
#define GOT_SYM(x) x
|
||||
#define GOT_GET(x,got,sym) \
|
||||
ldr x, sym;
|
||||
#define GOT_INIT(got,gotsym,pclabel)
|
||||
#define GOT_INITSYM(gotsym,pclabel)
|
||||
#define PIC_SYM(x,y) x
|
||||
#endif /* __PIC__ */
|
||||
|
||||
#define RCSID(x) .pushsection ".ident","MS",%progbits,1; \
|
||||
.asciz x; \
|
||||
.popsection
|
||||
|
||||
#define WEAK_ALIAS(alias,sym) \
|
||||
.weak alias; \
|
||||
alias = sym
|
||||
|
||||
/*
|
||||
* STRONG_ALIAS: create a strong alias.
|
||||
*/
|
||||
#define STRONG_ALIAS(alias,sym) \
|
||||
.globl alias; \
|
||||
alias = sym
|
||||
|
||||
#ifdef __STDC__
|
||||
#define WARN_REFERENCES(sym,msg) \
|
||||
.pushsection .gnu.warning. ## sym; \
|
||||
.ascii msg; \
|
||||
.popsection
|
||||
#else
|
||||
#define WARN_REFERENCES(sym,msg) \
|
||||
.pushsection .gnu.warning./**/sym; \
|
||||
.ascii msg; \
|
||||
.popsection
|
||||
#endif /* __STDC__ */
|
||||
|
||||
#ifdef __thumb__
|
||||
# define XPUSH push
|
||||
# define XPOP pop
|
||||
# define XPOPRET pop {pc}
|
||||
#else
|
||||
# define XPUSH stmfd sp!,
|
||||
# define XPOP ldmfd sp!,
|
||||
# ifdef _ARM_ARCH_5
|
||||
# define XPOPRET ldmfd sp!, {pc}
|
||||
# else
|
||||
# define XPOPRET ldmfd sp!, {lr}; mov pc, lr
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__aarch64__)
|
||||
# define RET ret
|
||||
#elif defined (_ARM_ARCH_4T)
|
||||
# define RET bx lr
|
||||
# define RETr(r) bx r
|
||||
# if defined(__thumb__)
|
||||
# if defined(_ARM_ARCH_7)
|
||||
# define RETc(c) it c; __CONCAT(bx,c) lr
|
||||
# endif
|
||||
# else
|
||||
# define RETc(c) __CONCAT(bx,c) lr
|
||||
# endif
|
||||
#else
|
||||
# define RET mov pc, lr
|
||||
# define RETr(r) mov pc, r
|
||||
# define RETc(c) __CONCAT(mov,c) pc, lr
|
||||
#endif
|
||||
|
||||
#ifdef _ARM_ARCH_7
|
||||
#define KMODTRAMPOLINE(n) \
|
||||
_ENTRY(__wrap_ ## n) \
|
||||
movw ip, #:lower16:n; \
|
||||
movt ip, #:upper16:n; \
|
||||
bx ip
|
||||
#elif defined(_ARM_ARCH_4T)
|
||||
#define KMODTRAMPOLINE(n) \
|
||||
_ENTRY(__wrap_ ## n) \
|
||||
ldr ip, [pc]; \
|
||||
bx ip; \
|
||||
.word n
|
||||
#else
|
||||
#define KMODTRAMPOLINE(n) \
|
||||
_ENTRY(__wrap_ ## n) \
|
||||
ldr pc, [pc, #-4]; \
|
||||
.word n
|
||||
#endif
|
||||
|
||||
#endif /* !_ARM_ASM_H_ */
|
||||
@ -1,15 +0,0 @@
|
||||
/* $NetBSD: bswap.h,v 1.6 2014/01/29 01:36:43 matt Exp $ */
|
||||
|
||||
#ifndef _ARM_BSWAP_H_
|
||||
#define _ARM_BSWAP_H_
|
||||
|
||||
#ifdef __aarch64__
|
||||
#include <aarch64/byte_swap.h>
|
||||
#else
|
||||
#include <arm/byte_swap.h>
|
||||
#endif
|
||||
|
||||
#define __BSWAP_RENAME
|
||||
#include <sys/bswap.h>
|
||||
|
||||
#endif /* !_ARM_BSWAP_H_ */
|
||||
@ -1,121 +0,0 @@
|
||||
/* $NetBSD: byte_swap.h,v 1.16 2017/01/17 11:08:50 rin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1999, 2002 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Charles M. Hannum, Neil A. Carson, and Jason R. Thorpe.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_BYTE_SWAP_H_
|
||||
#define _ARM_BYTE_SWAP_H_
|
||||
|
||||
#ifdef _LOCORE
|
||||
|
||||
#if defined(_ARM_ARCH_6) || defined(_ARM_ARCH_7)
|
||||
|
||||
#define BSWAP16(_src, _dst, _tmp) \
|
||||
rev16 _dst, _src
|
||||
#define BSWAP32(_src, _dst, _tmp) \
|
||||
rev _dst, _src
|
||||
|
||||
#else
|
||||
|
||||
#define BSWAP16(_src, _dst, _tmp) \
|
||||
mov _tmp, _src, ror #8 ;\
|
||||
orr _tmp, _tmp, _tmp, lsr #16 ;\
|
||||
bic _dst, _tmp, _tmp, lsl #16
|
||||
|
||||
#define BSWAP32(_src, _dst, _tmp) \
|
||||
eor _tmp, _src, _src, ror #16 ;\
|
||||
bic _tmp, _tmp, #0x00FF0000 ;\
|
||||
mov _dst, _src, ror #8 ;\
|
||||
eor _dst, _dst, _tmp, lsr #8
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include <sys/types.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define __BYTE_SWAP_U32_VARIABLE __byte_swap_u32_variable
|
||||
static __inline uint32_t
|
||||
__byte_swap_u32_variable(uint32_t v)
|
||||
{
|
||||
uint32_t t1;
|
||||
|
||||
#ifdef _ARM_ARCH_6
|
||||
if (!__builtin_constant_p(v)) {
|
||||
__asm("rev\t%0, %1" : "=r" (v) : "0" (v));
|
||||
return v;
|
||||
}
|
||||
#endif
|
||||
|
||||
t1 = v ^ ((v << 16) | (v >> 16));
|
||||
t1 &= 0xff00ffffU;
|
||||
v = (v >> 8) | (v << 24);
|
||||
v ^= (t1 >> 8);
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
#define __BYTE_SWAP_U16_VARIABLE __byte_swap_u16_variable
|
||||
static __inline uint16_t
|
||||
__byte_swap_u16_variable(uint16_t v)
|
||||
{
|
||||
|
||||
#ifdef _ARM_ARCH_6
|
||||
if (!__builtin_constant_p(v)) {
|
||||
uint32_t v32 = v;
|
||||
__asm("rev16\t%0, %1" : "=r" (v32) : "0" (v32));
|
||||
return (uint16_t)v32;
|
||||
}
|
||||
#elif !defined(__thumb__) && 0 /* gcc produces decent code for this */
|
||||
if (!__builtin_constant_p(v)) {
|
||||
uint32_t v0 = v;
|
||||
__asm volatile(
|
||||
"mov %0, %1, ror #8\n"
|
||||
"orr %0, %0, %0, lsr #16\n"
|
||||
"bic %0, %0, %0, lsl #16"
|
||||
: "=&r" (v0)
|
||||
: "0" (v0));
|
||||
return (uint16_t)v0;
|
||||
}
|
||||
#endif
|
||||
v &= 0xffff;
|
||||
v = (uint16_t)((v >> 8) | (v << 8));
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
#endif /* _LOCORE */
|
||||
|
||||
#endif /* _ARM_BYTE_SWAP_H_ */
|
||||
@ -1,70 +0,0 @@
|
||||
/* $NetBSD: cdefs.h,v 1.19 2020/12/01 02:43:14 rin Exp $ */
|
||||
|
||||
#ifndef _ARM_CDEFS_H_
|
||||
#define _ARM_CDEFS_H_
|
||||
|
||||
#ifndef __lint__
|
||||
#if (__GNUC__ == 4 && __GNUC_MINOR__ < 1) || __GNUC__ < 4
|
||||
#error GCC 4.1 or compatible required.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined (__ARM_ARCH_8A__) || defined (__ARM_ARCH_8A) || \
|
||||
__ARM_ARCH == 8
|
||||
/* __ARM_ARCH_8A__ is a typo */
|
||||
#define _ARM_ARCH_8
|
||||
#endif
|
||||
|
||||
#if defined (_ARM_ARCH_8) || defined (__ARM_ARCH_7__) || \
|
||||
defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__) || \
|
||||
defined (__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__)
|
||||
/* 7R, 7M, 7EM are for non MMU arms */
|
||||
#define _ARM_ARCH_7
|
||||
#endif
|
||||
|
||||
#if defined (_ARM_ARCH_7) || defined (__ARM_ARCH_6T2__)
|
||||
#define _ARM_ARCH_T2 /* Thumb2 */
|
||||
#endif
|
||||
|
||||
#if defined (_ARM_ARCH_T2) || defined (__ARM_ARCH_6__) || \
|
||||
defined (__ARM_ARCH_6J__) || \
|
||||
defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6KZ__) || \
|
||||
defined (__ARM_ARCH_6Z__) || defined (__ARM_ARCH_6ZK__) || \
|
||||
defined (__ARM_ARCH_6ZM__)
|
||||
#define _ARM_ARCH_6
|
||||
#endif
|
||||
|
||||
#if defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5T__) || \
|
||||
defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5TEJ__)
|
||||
#define _ARM_ARCH_5T
|
||||
#endif
|
||||
|
||||
#if defined (_ARM_ARCH_6) || defined (_ARM_ARCH_5T) || defined (__ARM_ARCH_5__)
|
||||
#define _ARM_ARCH_5
|
||||
#endif
|
||||
|
||||
#if defined (_ARM_ARCH_5) || defined (__ARM_ARCH_4T__)
|
||||
#define _ARM_ARCH_4T
|
||||
#endif
|
||||
|
||||
#if defined (_ARM_ARCH_T2) || \
|
||||
(!defined (__thumb__) && \
|
||||
(defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5TE__) || \
|
||||
defined (__ARM_ARCH_5TEJ__)))
|
||||
#define _ARM_ARCH_DWORD_OK
|
||||
#endif
|
||||
|
||||
#if defined (__ARMEB__) && defined (_ARM_ARCH_6)
|
||||
#define _ARM_ARCH_BE8
|
||||
#endif
|
||||
|
||||
#if defined(__ARM_PCS_AAPCS64)
|
||||
#define __ALIGNBYTES (sizeof(__int128_t) - 1)
|
||||
#elif defined(__ARM_EABI__)
|
||||
#define __ALIGNBYTES (sizeof(long long) - 1)
|
||||
#else
|
||||
#define __ALIGNBYTES (sizeof(int) - 1)
|
||||
#endif
|
||||
|
||||
#endif /* !_ARM_CDEFS_H_ */
|
||||
399
lib/libc/include/arm-netbsd-eabihf/machine/cpu.h
vendored
399
lib/libc/include/arm-netbsd-eabihf/machine/cpu.h
vendored
@ -1,399 +0,0 @@
|
||||
/* $NetBSD: cpu.h,v 1.123.4.1 2023/08/09 17:42:01 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1996 Mark Brinicombe.
|
||||
* Copyright (c) 1994 Brini.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software written for Brini by Mark Brinicombe
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Brini.
|
||||
* 4. The name of the company nor the name of the author may be used to
|
||||
* endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* RiscBSD kernel project
|
||||
*
|
||||
* cpu.h
|
||||
*
|
||||
* CPU specific symbols
|
||||
*
|
||||
* Created : 18/09/94
|
||||
*
|
||||
* Based on kate/katelib/arm6.h
|
||||
*/
|
||||
|
||||
#ifndef _ARM_CPU_H_
|
||||
#define _ARM_CPU_H_
|
||||
|
||||
#ifdef _KERNEL
|
||||
#ifndef _LOCORE
|
||||
|
||||
typedef unsigned long mpidr_t;
|
||||
|
||||
#ifdef MULTIPROCESSOR
|
||||
extern u_int arm_cpu_max;
|
||||
extern mpidr_t cpu_mpidr[];
|
||||
|
||||
void cpu_init_secondary_processor(int);
|
||||
void cpu_boot_secondary_processors(void);
|
||||
void cpu_mpstart(void);
|
||||
bool cpu_hatched_p(u_int);
|
||||
|
||||
void cpu_clr_mbox(int);
|
||||
void cpu_set_hatched(int);
|
||||
|
||||
#endif
|
||||
|
||||
struct proc;
|
||||
|
||||
void cpu_proc_fork(struct proc *, struct proc *);
|
||||
|
||||
#endif /* !_LOCORE */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#ifdef __arm__
|
||||
|
||||
/*
|
||||
* User-visible definitions
|
||||
*/
|
||||
|
||||
/* CTL_MACHDEP definitions. */
|
||||
#define CPU_DEBUG 1 /* int: misc kernel debug control */
|
||||
#define CPU_BOOTED_DEVICE 2 /* string: device we booted from */
|
||||
#define CPU_BOOTED_KERNEL 3 /* string: kernel we booted */
|
||||
#define CPU_CONSDEV 4 /* struct: dev_t of our console */
|
||||
#define CPU_POWERSAVE 5 /* int: use CPU powersave mode */
|
||||
|
||||
#if defined(_KERNEL) || defined(_KMEMUSER)
|
||||
|
||||
/*
|
||||
* Kernel-only definitions
|
||||
*/
|
||||
|
||||
#if !defined(_MODULE) && defined(_KERNEL_OPT)
|
||||
#include "opt_gprof.h"
|
||||
#include "opt_multiprocessor.h"
|
||||
#include "opt_cpuoptions.h"
|
||||
#include "opt_lockdebug.h"
|
||||
#include "opt_cputypes.h"
|
||||
#endif /* !_MODULE && _KERNEL_OPT */
|
||||
|
||||
#ifndef _LOCORE
|
||||
#if defined(TPIDRPRW_IS_CURLWP) || defined(TPIDRPRW_IS_CURCPU)
|
||||
#include <arm/armreg.h>
|
||||
#endif /* TPIDRPRW_IS_CURLWP || TPIDRPRW_IS_CURCPU */
|
||||
|
||||
/* 1 == use cpu_sleep(), 0 == don't */
|
||||
extern int cpu_do_powersave;
|
||||
extern int cpu_fpu_present;
|
||||
|
||||
/* All the CLKF_* macros take a struct clockframe * as an argument. */
|
||||
|
||||
/*
|
||||
* CLKF_USERMODE: Return TRUE/FALSE (1/0) depending on whether the
|
||||
* frame came from USR mode or not.
|
||||
*/
|
||||
#define CLKF_USERMODE(cf) (((cf)->cf_tf.tf_spsr & PSR_MODE) == PSR_USR32_MODE)
|
||||
|
||||
/*
|
||||
* CLKF_INTR: True if we took the interrupt from inside another
|
||||
* interrupt handler.
|
||||
*/
|
||||
#if !defined(__ARM_EABI__)
|
||||
/* Hack to treat FPE time as interrupt time so we can measure it */
|
||||
#define CLKF_INTR(cf) \
|
||||
((curcpu()->ci_intr_depth > 1) || \
|
||||
((cf)->cf_tf.tf_spsr & PSR_MODE) == PSR_UND32_MODE)
|
||||
#else
|
||||
#define CLKF_INTR(cf) ((void)(cf), curcpu()->ci_intr_depth > 1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* CLKF_PC: Extract the program counter from a clockframe
|
||||
*/
|
||||
#define CLKF_PC(frame) (frame->cf_tf.tf_pc)
|
||||
|
||||
/*
|
||||
* LWP_PC: Find out the program counter for the given lwp.
|
||||
*/
|
||||
#define LWP_PC(l) (lwp_trapframe(l)->tf_pc)
|
||||
|
||||
/*
|
||||
* Per-CPU information. For now we assume one CPU.
|
||||
*/
|
||||
#ifdef _KERNEL
|
||||
static inline int curcpl(void);
|
||||
static inline void set_curcpl(int);
|
||||
static inline void cpu_dosoftints(void);
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#ifdef _KMEMUSER
|
||||
#include <sys/intr.h>
|
||||
#endif
|
||||
#include <sys/atomic.h>
|
||||
#include <sys/cpu_data.h>
|
||||
#include <sys/device_if.h>
|
||||
#include <sys/evcnt.h>
|
||||
|
||||
/*
|
||||
* Cache info variables.
|
||||
*/
|
||||
#define CACHE_TYPE_VIVT 0
|
||||
#define CACHE_TYPE_xxPT 1
|
||||
#define CACHE_TYPE_VIPT 1
|
||||
#define CACHE_TYPE_PIxx 2
|
||||
#define CACHE_TYPE_PIPT 3
|
||||
|
||||
/* PRIMARY CACHE VARIABLES */
|
||||
struct arm_cache_info {
|
||||
u_int icache_size;
|
||||
u_int icache_line_size;
|
||||
u_int icache_ways;
|
||||
u_int icache_way_size;
|
||||
u_int icache_sets;
|
||||
|
||||
u_int dcache_size;
|
||||
u_int dcache_line_size;
|
||||
u_int dcache_ways;
|
||||
u_int dcache_way_size;
|
||||
u_int dcache_sets;
|
||||
|
||||
uint8_t cache_type;
|
||||
bool cache_unified;
|
||||
uint8_t icache_type;
|
||||
uint8_t dcache_type;
|
||||
};
|
||||
|
||||
struct cpu_info {
|
||||
struct cpu_data ci_data; /* MI per-cpu data */
|
||||
device_t ci_dev; /* Device corresponding to this CPU */
|
||||
cpuid_t ci_cpuid;
|
||||
uint32_t ci_arm_cpuid; /* aggregate CPU id */
|
||||
uint32_t ci_arm_cputype; /* CPU type */
|
||||
uint32_t ci_arm_cpurev; /* CPU revision */
|
||||
uint32_t ci_ctrl; /* The CPU control register */
|
||||
|
||||
/*
|
||||
* the following are in their own cache line, as they are stored to
|
||||
* regularly by remote CPUs; when they were mixed with other fields
|
||||
* we observed frequent cache misses.
|
||||
*/
|
||||
int ci_want_resched __aligned(COHERENCY_UNIT);
|
||||
/* resched() was called */
|
||||
lwp_t * ci_curlwp __aligned(COHERENCY_UNIT);
|
||||
/* current lwp */
|
||||
lwp_t * ci_onproc; /* current user LWP / kthread */
|
||||
|
||||
/*
|
||||
* largely CPU-private.
|
||||
*/
|
||||
lwp_t * ci_softlwps[SOFTINT_COUNT] __aligned(COHERENCY_UNIT);
|
||||
|
||||
struct cpu_softc *
|
||||
ci_softc; /* platform softc */
|
||||
|
||||
int ci_cpl; /* current processor level (spl) */
|
||||
volatile int ci_hwpl; /* current hardware priority */
|
||||
int ci_kfpu_spl;
|
||||
|
||||
volatile u_int ci_intr_depth; /* */
|
||||
volatile u_int ci_softints;
|
||||
volatile uint32_t ci_blocked_pics;
|
||||
volatile uint32_t ci_pending_pics;
|
||||
volatile uint32_t ci_pending_ipls;
|
||||
|
||||
lwp_t * ci_lastlwp; /* last lwp */
|
||||
|
||||
struct evcnt ci_arm700bugcount;
|
||||
int32_t ci_mtx_count;
|
||||
int ci_mtx_oldspl;
|
||||
register_t ci_undefsave[3];
|
||||
uint32_t ci_vfp_id;
|
||||
uint64_t ci_lastintr;
|
||||
|
||||
struct pmap_tlb_info *
|
||||
ci_tlb_info;
|
||||
struct pmap * ci_pmap_lastuser;
|
||||
struct pmap * ci_pmap_cur;
|
||||
tlb_asid_t ci_pmap_asid_cur;
|
||||
|
||||
struct trapframe *
|
||||
ci_ddb_regs;
|
||||
|
||||
struct evcnt ci_abt_evs[16];
|
||||
struct evcnt ci_und_ev;
|
||||
struct evcnt ci_und_cp15_ev;
|
||||
struct evcnt ci_vfp_evs[3];
|
||||
|
||||
uint32_t ci_midr;
|
||||
uint32_t ci_actlr;
|
||||
uint32_t ci_revidr;
|
||||
uint32_t ci_mpidr;
|
||||
uint32_t ci_mvfr[2];
|
||||
|
||||
uint32_t ci_capacity_dmips_mhz;
|
||||
|
||||
struct arm_cache_info
|
||||
ci_cacheinfo;
|
||||
|
||||
#if defined(GPROF) && defined(MULTIPROCESSOR)
|
||||
struct gmonparam *ci_gmon; /* MI per-cpu GPROF */
|
||||
#endif
|
||||
};
|
||||
|
||||
extern struct cpu_info cpu_info_store[];
|
||||
|
||||
struct lwp *arm_curlwp(void);
|
||||
struct cpu_info *arm_curcpu(void);
|
||||
|
||||
#ifdef _KERNEL
|
||||
#if defined(_MODULE)
|
||||
|
||||
#define curlwp arm_curlwp()
|
||||
#define curcpu() arm_curcpu()
|
||||
|
||||
#elif defined(TPIDRPRW_IS_CURLWP)
|
||||
static inline struct lwp *
|
||||
_curlwp(void)
|
||||
{
|
||||
return (struct lwp *) armreg_tpidrprw_read();
|
||||
}
|
||||
|
||||
static inline void
|
||||
_curlwp_set(struct lwp *l)
|
||||
{
|
||||
armreg_tpidrprw_write((uintptr_t)l);
|
||||
}
|
||||
|
||||
// Also in <sys/lwp.h> but also here if this was included before <sys/lwp.h>
|
||||
static inline struct cpu_info *lwp_getcpu(struct lwp *);
|
||||
|
||||
#define curlwp _curlwp()
|
||||
// curcpu() expands into two instructions: a mrc and a ldr
|
||||
#define curcpu() lwp_getcpu(_curlwp())
|
||||
#elif defined(TPIDRPRW_IS_CURCPU)
|
||||
#ifdef __HAVE_PREEMPTION
|
||||
#error __HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP
|
||||
#endif
|
||||
static inline struct cpu_info *
|
||||
curcpu(void)
|
||||
{
|
||||
return (struct cpu_info *) armreg_tpidrprw_read();
|
||||
}
|
||||
#elif !defined(MULTIPROCESSOR)
|
||||
#define curcpu() (&cpu_info_store[0])
|
||||
#elif !defined(__HAVE_PREEMPTION)
|
||||
#error MULTIPROCESSOR && !__HAVE_PREEMPTION requires TPIDRPRW_IS_CURCPU or TPIDRPRW_IS_CURLWP
|
||||
#else
|
||||
#error MULTIPROCESSOR && __HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP
|
||||
#endif /* !TPIDRPRW_IS_CURCPU && !TPIDRPRW_IS_CURLWP */
|
||||
|
||||
#ifndef curlwp
|
||||
#define curlwp (curcpu()->ci_curlwp)
|
||||
#endif
|
||||
#define curpcb ((struct pcb *)lwp_getpcb(curlwp))
|
||||
|
||||
#define CPU_INFO_ITERATOR int
|
||||
#if defined(_MODULE) || defined(MULTIPROCESSOR)
|
||||
extern struct cpu_info *cpu_info[];
|
||||
#define cpu_number() (curcpu()->ci_index)
|
||||
#define CPU_IS_PRIMARY(ci) ((ci)->ci_index == 0)
|
||||
#define CPU_INFO_FOREACH(cii, ci) \
|
||||
cii = 0, ci = cpu_info[0]; cii < (ncpu ? ncpu : 1) && (ci = cpu_info[cii]) != NULL; cii++
|
||||
#else
|
||||
#define cpu_number() 0
|
||||
|
||||
#define CPU_IS_PRIMARY(ci) true
|
||||
#define CPU_INFO_FOREACH(cii, ci) \
|
||||
cii = 0, __USE(cii), ci = curcpu(); ci != NULL; ci = NULL
|
||||
#endif
|
||||
|
||||
#define LWP0_CPU_INFO (&cpu_info_store[0])
|
||||
|
||||
static inline int
|
||||
curcpl(void)
|
||||
{
|
||||
return curcpu()->ci_cpl;
|
||||
}
|
||||
|
||||
static inline void
|
||||
set_curcpl(int pri)
|
||||
{
|
||||
curcpu()->ci_cpl = pri;
|
||||
}
|
||||
|
||||
static inline void
|
||||
cpu_dosoftints(void)
|
||||
{
|
||||
#ifdef __HAVE_FAST_SOFTINTS
|
||||
void dosoftints(void);
|
||||
#ifndef __HAVE_PIC_FAST_SOFTINTS
|
||||
struct cpu_info * const ci = curcpu();
|
||||
if (ci->ci_intr_depth == 0 && (ci->ci_softints >> ci->ci_cpl) > 0)
|
||||
dosoftints();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Scheduling glue
|
||||
*/
|
||||
void cpu_signotify(struct lwp *);
|
||||
#define setsoftast(ci) (cpu_signotify((ci)->ci_onproc))
|
||||
|
||||
/*
|
||||
* Give a profiling tick to the current process when the user profiling
|
||||
* buffer pages are invalid. On the i386, request an ast to send us
|
||||
* through trap(), marking the proc as needing a profiling tick.
|
||||
*/
|
||||
#define cpu_need_proftick(l) ((l)->l_pflag |= LP_OWEUPC, \
|
||||
setsoftast(lwp_getcpu(l)))
|
||||
|
||||
/*
|
||||
* We've already preallocated the stack for the idlelwps for additional CPUs.
|
||||
* This hook allows to return them.
|
||||
*/
|
||||
vaddr_t cpu_uarea_alloc_idlelwp(struct cpu_info *);
|
||||
|
||||
#ifdef _ARM_ARCH_6
|
||||
int cpu_maxproc_hook(int);
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_LOCORE */
|
||||
|
||||
#endif /* _KERNEL || _KMEMUSER */
|
||||
|
||||
#elif defined(__aarch64__)
|
||||
|
||||
#include <aarch64/cpu.h>
|
||||
|
||||
#endif /* __arm__/__aarch64__ */
|
||||
|
||||
#endif /* !_ARM_CPU_H_ */
|
||||
@ -1,105 +0,0 @@
|
||||
/* $NetBSD: disklabel.h,v 1.14 2022/05/24 19:37:39 andvar Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Mark Brinicombe.
|
||||
* Copyright (c) 1994 Brini.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software written for Brini by Mark Brinicombe
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Brini.
|
||||
* 4. The name of the company nor the name of the author may be used to
|
||||
* endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* RiscBSD kernel project
|
||||
*
|
||||
* disklabel.h
|
||||
*
|
||||
* machine specific disk label info
|
||||
*
|
||||
* Created : 04/10/94
|
||||
*/
|
||||
|
||||
#ifndef _ARM_DISKLABEL_H_
|
||||
#define _ARM_DISKLABEL_H_
|
||||
|
||||
#ifndef LABELUSESMBR
|
||||
#define LABELUSESMBR 1 /* use MBR partitionning */
|
||||
#endif
|
||||
#define LABELSECTOR 1 /* sector containing label */
|
||||
#define LABELOFFSET 0 /* offset of label in sector */
|
||||
#define MAXPARTITIONS 16 /* number of partitions */
|
||||
#define OLDMAXPARTITIONS 8 /* old number of partitions */
|
||||
#ifndef RAW_PART
|
||||
#define RAW_PART 2 /* raw partition: XX?c */
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __HAVE_OLD_DISKLABEL
|
||||
/*
|
||||
* We use the highest bit of the minor number for the partition number.
|
||||
* This maintains backward compatibility with device nodes created before
|
||||
* MAXPARTITIONS was increased.
|
||||
*/
|
||||
#define __ARM_MAXDISKS ((1 << 20) / MAXPARTITIONS)
|
||||
#define DISKUNIT(dev) ((minor(dev) / OLDMAXPARTITIONS) % __ARM_MAXDISKS)
|
||||
#define DISKPART(dev) ((minor(dev) % OLDMAXPARTITIONS) + \
|
||||
((minor(dev) / (__ARM_MAXDISKS * OLDMAXPARTITIONS)) * OLDMAXPARTITIONS))
|
||||
#define DISKMINOR(unit, part) \
|
||||
(((unit) * OLDMAXPARTITIONS) + ((part) % OLDMAXPARTITIONS) + \
|
||||
((part) / OLDMAXPARTITIONS) * (__ARM_MAXDISKS * OLDMAXPARTITIONS))
|
||||
#endif
|
||||
|
||||
#if HAVE_NBTOOL_CONFIG_H
|
||||
#include <nbinclude/sys/dkbad.h>
|
||||
#include <nbinclude/sys/disklabel_acorn.h>
|
||||
#include <nbinclude/sys/bootblock.h>
|
||||
#else
|
||||
#include <sys/dkbad.h>
|
||||
#include <sys/disklabel_acorn.h>
|
||||
#include <sys/bootblock.h>
|
||||
#endif /* HAVE_NBTOOL_CONFIG_H */
|
||||
|
||||
struct cpu_disklabel {
|
||||
struct mbr_partition mbrparts[MBR_PART_COUNT];
|
||||
#define __HAVE_DISKLABEL_DKBAD
|
||||
struct dkbad bad;
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
struct buf;
|
||||
struct disklabel;
|
||||
|
||||
/* for readdisklabel. rv != 0 -> matches, msg == NULL -> success */
|
||||
int mbr_label_read(dev_t, void (*)(struct buf *), struct disklabel *,
|
||||
struct cpu_disklabel *, const char **, int *, int *);
|
||||
|
||||
/* for writedisklabel. rv == 0 -> doesn't match, rv > 0 -> success */
|
||||
int mbr_label_locate(dev_t, void (*)(struct buf *),
|
||||
struct disklabel *, struct cpu_disklabel *, int *, int *);
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _ARM_DISKLABEL_H_ */
|
||||
@ -1,163 +0,0 @@
|
||||
/* $NetBSD: elf_machdep.h,v 1.19 2017/11/06 03:47:45 christos Exp $ */
|
||||
|
||||
#ifndef _ARM_ELF_MACHDEP_H_
|
||||
#define _ARM_ELF_MACHDEP_H_
|
||||
|
||||
#if defined(__ARMEB__)
|
||||
#define ELF32_MACHDEP_ENDIANNESS ELFDATA2MSB
|
||||
#else
|
||||
#define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB
|
||||
#endif
|
||||
|
||||
#define ELF64_MACHDEP_ENDIANNESS XXX /* break compilation */
|
||||
#define ELF64_MACHDEP_ID_CASES \
|
||||
/* no 64-bit ELF machine types supported */
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
#define EF_ARM_RELEXEC 0x00000001
|
||||
#define EF_ARM_HASENTRY 0x00000002
|
||||
#define EF_ARM_INTERWORK 0x00000004 /* GNU binutils 000413 */
|
||||
#define EF_ARM_SYMSARESORTED 0x00000004 /* ARM ELF A08 */
|
||||
#define EF_ARM_APCS_26 0x00000008 /* GNU binutils 000413 */
|
||||
#define EF_ARM_DYNSYMSUSESEGIDX 0x00000008 /* ARM ELF B01 */
|
||||
#define EF_ARM_APCS_FLOAT 0x00000010 /* GNU binutils 000413 */
|
||||
#define EF_ARM_MAPSYMSFIRST 0x00000010 /* ARM ELF B01 */
|
||||
#define EF_ARM_PIC 0x00000020
|
||||
#define EF_ARM_ALIGN8 0x00000040 /* 8-bit structure alignment. */
|
||||
#define EF_ARM_NEW_ABI 0x00000080
|
||||
#define EF_ARM_OLD_ABI 0x00000100
|
||||
#define EF_ARM_SOFT_FLOAT 0x00000200
|
||||
#define EF_ARM_BE8 0x00800000
|
||||
#define EF_ARM_EABIMASK 0xff000000
|
||||
#define EF_ARM_EABI_VER1 0x01000000
|
||||
#define EF_ARM_EABI_VER2 0x02000000
|
||||
#define EF_ARM_EABI_VER3 0x03000000
|
||||
#define EF_ARM_EABI_VER4 0x04000000
|
||||
#define EF_ARM_EABI_VER5 0x05000000
|
||||
|
||||
#define ELF32_MACHDEP_ID_CASES \
|
||||
case EM_ARM: \
|
||||
break;
|
||||
|
||||
#define ELF32_MACHDEP_ID EM_ARM
|
||||
|
||||
#define KERN_ELFSIZE 32
|
||||
#define ARCH_ELFSIZE 32 /* MD native binary size */
|
||||
|
||||
/* Processor specific relocation types */
|
||||
|
||||
#define R_ARM_NONE 0
|
||||
#define R_ARM_PC24 1
|
||||
#define R_ARM_ABS32 2
|
||||
#define R_ARM_REL32 3
|
||||
#define R_ARM_PC13 4
|
||||
#define R_ARM_ABS16 5
|
||||
#define R_ARM_ABS12 6
|
||||
#define R_ARM_THM_ABS5 7
|
||||
#define R_ARM_ABS8 8
|
||||
#define R_ARM_SBREL32 9
|
||||
#define R_ARM_THM_PC22 10
|
||||
#define R_ARM_THM_PC8 11
|
||||
#define R_ARM_AMP_VCALL9 12
|
||||
#define R_ARM_SWI24 13
|
||||
#define R_ARM_THM_SWI8 14
|
||||
#define R_ARM_XPC25 15
|
||||
#define R_ARM_THM_XPC22 16
|
||||
|
||||
/* TLS relocations */
|
||||
#define R_ARM_TLS_DTPMOD32 17 /* ID of module containing symbol */
|
||||
#define R_ARM_TLS_DTPOFF32 18 /* Offset in TLS block */
|
||||
#define R_ARM_TLS_TPOFF32 19 /* Offset in static TLS block */
|
||||
|
||||
/* 20-31 are reserved for ARM Linux. */
|
||||
#define R_ARM_COPY 20
|
||||
#define R_ARM_GLOB_DAT 21
|
||||
#define R_ARM_JUMP_SLOT 22
|
||||
#define R_ARM_RELATIVE 23
|
||||
#define R_ARM_GOTOFF 24
|
||||
#define R_ARM_GOTPC 25
|
||||
#define R_ARM_GOT32 26
|
||||
#define R_ARM_PLT32 27
|
||||
#define R_ARM_CALL 28
|
||||
#define R_ARM_JUMP24 29
|
||||
#define R_ARM_THM_JUMP24 30
|
||||
#define R_ARM_BASE_ABS 31
|
||||
#define R_ARM_ALU_PCREL_7_0 32
|
||||
#define R_ARM_ALU_PCREL_15_8 33
|
||||
#define R_ARM_ALU_PCREL_23_15 34
|
||||
#define R_ARM_ALU_SBREL_11_0 35
|
||||
#define R_ARM_ALU_SBREL_19_12 36
|
||||
#define R_ARM_ALU_SBREL_27_20 37 // depcreated
|
||||
#define R_ARM_TARGET1 38
|
||||
#define R_ARM_SBREL31 39 // deprecated
|
||||
#define R_ARM_V4BX 40
|
||||
#define R_ARM_TARGET2 41
|
||||
#define R_ARM_PREL31 42
|
||||
#define R_ARM_MOVW_ABS_NC 43
|
||||
#define R_ARM_MOVT_ABS 44
|
||||
#define R_ARM_MOVW_PREL_NC 45
|
||||
#define R_ARM_MOVT_PREL 46
|
||||
#define R_ARM_THM_MOVW_ABS_NC 47
|
||||
#define R_ARM_THM_MOVT_ABS 48
|
||||
#define R_ARM_THM_MOVW_PREL_NC 49
|
||||
#define R_ARM_THM_MOVT_PREL 50
|
||||
|
||||
/* 96-111 are reserved to G++. */
|
||||
#define R_ARM_GNU_VTENTRY 100
|
||||
#define R_ARM_GNU_VTINHERIT 101
|
||||
#define R_ARM_THM_PC11 102
|
||||
#define R_ARM_THM_PC9 103
|
||||
|
||||
/* More TLS relocations */
|
||||
#define R_ARM_TLS_GD32 104 /* PC-rel 32 bit for global dynamic */
|
||||
#define R_ARM_TLS_LDM32 105 /* PC-rel 32 bit for local dynamic */
|
||||
#define R_ARM_TLS_LDO32 106 /* 32 bit offset relative to TLS */
|
||||
#define R_ARM_TLS_IE32 107 /* PC-rel 32 bit for GOT entry of */
|
||||
#define R_ARM_TLS_LE32 108
|
||||
#define R_ARM_TLS_LDO12 109
|
||||
#define R_ARM_TLS_LE12 110
|
||||
#define R_ARM_TLS_IE12GP 111
|
||||
|
||||
/* 112-127 are reserved for private experiments. */
|
||||
|
||||
#define R_ARM_IRELATIVE 160
|
||||
|
||||
#define R_ARM_RXPC25 249
|
||||
#define R_ARM_RSBREL32 250
|
||||
#define R_ARM_THM_RPC22 251
|
||||
#define R_ARM_RREL32 252
|
||||
#define R_ARM_RABS32 253
|
||||
#define R_ARM_RPC24 254
|
||||
#define R_ARM_RBASE 255
|
||||
|
||||
#define R_TYPE(name) __CONCAT(R_ARM_,name)
|
||||
|
||||
/* Processor specific program header flags */
|
||||
#define PF_ARM_SB 0x10000000
|
||||
#define PF_ARM_PI 0x20000000
|
||||
#define PF_ARM_ENTRY 0x80000000
|
||||
|
||||
/* Processor specific program header types */
|
||||
#define PT_ARM_EXIDX (PT_LOPROC + 1)
|
||||
|
||||
/* Processor specific section header flags */
|
||||
#define SHF_ENTRYSECT 0x10000000
|
||||
#define SHF_COMDEF 0x80000000
|
||||
|
||||
/* Processor specific symbol types */
|
||||
#define STT_ARM_TFUNC STT_LOPROC
|
||||
|
||||
#ifdef _KERNEL
|
||||
#ifdef ELFSIZE
|
||||
#define ELF_MD_PROBE_FUNC ELFNAME2(arm_netbsd,probe)
|
||||
#define ELF_MD_COREDUMP_SETUP ELFNAME2(arm_netbsd,coredump_setup)
|
||||
#endif
|
||||
|
||||
struct exec_package;
|
||||
|
||||
int arm_netbsd_elf32_probe(struct lwp *, struct exec_package *, void *, char *,
|
||||
vaddr_t *);
|
||||
void arm_netbsd_elf32_coredump_setup(struct lwp *, void *);
|
||||
#endif
|
||||
|
||||
#endif /* _ARM_ELF_MACHDEP_H_ */
|
||||
@ -1,3 +0,0 @@
|
||||
/* $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ */
|
||||
|
||||
#include <sys/endian.h>
|
||||
@ -1,8 +0,0 @@
|
||||
/* $NetBSD: endian_machdep.h,v 1.9 2014/01/29 01:03:13 matt Exp $ */
|
||||
|
||||
/* __ARMEB__ or __AARCH64EB__ is predefined when building big-endian ARM. */
|
||||
#if defined(__ARMEB__) || defined(__AARCH64EB__)
|
||||
#define _BYTE_ORDER _BIG_ENDIAN
|
||||
#else
|
||||
#define _BYTE_ORDER _LITTLE_ENDIAN
|
||||
#endif
|
||||
@ -1,67 +0,0 @@
|
||||
/* $NetBSD: fenv.h,v 1.6 2021/10/06 05:33:15 skrll Exp $ */
|
||||
|
||||
/*
|
||||
* Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995
|
||||
* Public domain.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_FENV_H_
|
||||
#define _ARM_FENV_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef __ARM_PCS_AAPCS64
|
||||
/* AArch64 split FPSCR into two registers FPCR and FPSR */
|
||||
typedef struct {
|
||||
unsigned int __fpcr;
|
||||
unsigned int __fpsr;
|
||||
} fenv_t;
|
||||
#else
|
||||
typedef int fenv_t; /* FPSCR */
|
||||
#endif
|
||||
typedef int fexcept_t;
|
||||
|
||||
#define FE_INVALID 0x01 /* invalid operation exception */
|
||||
#define FE_DIVBYZERO 0x02 /* divide-by-zero exception */
|
||||
#define FE_OVERFLOW 0x04 /* overflow exception */
|
||||
#define FE_UNDERFLOW 0x08 /* underflow exception */
|
||||
#define FE_INEXACT 0x10 /* imprecise (loss of precision; "inexact") */
|
||||
|
||||
#define FE_ALL_EXCEPT 0x1f
|
||||
|
||||
#define FE_TONEAREST 0 /* round to nearest representable number */
|
||||
#define FE_UPWARD 1 /* round toward positive infinity */
|
||||
#define FE_DOWNWARD 2 /* round toward negative infinity */
|
||||
#define FE_TOWARDZERO 3 /* round to zero (truncate) */
|
||||
|
||||
#ifdef __SOFTFP__
|
||||
|
||||
/*
|
||||
* Provide a platform-specific softfloat ABI.
|
||||
*/
|
||||
|
||||
#include <arm/vfpreg.h>
|
||||
|
||||
#define __FENV_GET_FLAGS(__envp) __SHIFTOUT(*(__envp), VFP_FPSCR_CSUM)
|
||||
#define __FENV_GET_MASK(__envp) __SHIFTOUT(*(__envp), VFP_FPSCR_ESUM)
|
||||
#define __FENV_GET_ROUND(__envp) __SHIFTOUT(*(__envp), VFP_FPSCR_RMODE)
|
||||
#define __FENV_SET_FLAGS(__envp, __val) \
|
||||
*(__envp) = __SHIFTIN((__val), VFP_FPSCR_CSUM)
|
||||
#define __FENV_SET_MASK(__envp, __val) \
|
||||
*(__envp) = __SHIFTIN((__val), VFP_FPSCR_ESUM)
|
||||
#define __FENV_SET_ROUND(__envp, __val) \
|
||||
*(__envp) = __SHIFTIN((__val), VFP_FPSCR_RMODE)
|
||||
|
||||
#define __HAVE_FENV_SOFTFLOAT_DEFS
|
||||
|
||||
#endif /* __SOFTFP__ */
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Default floating-point environment */
|
||||
extern const fenv_t __fe_dfl_env;
|
||||
#define FE_DFL_ENV (&__fe_dfl_env)
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _ARM_FENV_H_ */
|
||||
@ -1,63 +0,0 @@
|
||||
/* $NetBSD: float.h,v 1.8 2014/01/29 01:10:36 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_FLOAT_H_
|
||||
#define _ARM_FLOAT_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef __ARM_PCS_AAPCS64
|
||||
|
||||
#define LDBL_MANT_DIG __LDBL_MANT_DIG__
|
||||
#define LDBL_DIG __LDBL_DIG__
|
||||
#define LDBL_MIN_EXP __LDBL_MIN_EXP__
|
||||
#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
|
||||
#define LDBL_MAX_EXP __LDBL_MAX_EXP__
|
||||
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
|
||||
#define LDBL_EPSILON __LDBL_EPSILON__
|
||||
#define LDBL_MIN __LDBL_MIN__
|
||||
#define LDBL_MAX __LDBL_MAX__
|
||||
|
||||
#endif /* __ARM_PCS_AAPCS64 */
|
||||
|
||||
#include <sys/float_ieee754.h>
|
||||
|
||||
#if defined(__ARM_PCS_AAPCS64) \
|
||||
&& ((!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) \
|
||||
&& !defined(_XOPEN_SOURCE)) \
|
||||
|| (__STDC_VERSION__ - 0) >= 199901L \
|
||||
|| (_POSIX_C_SOURCE - 0) >= 200112L \
|
||||
|| ((_XOPEN_SOURCE - 0) >= 600) \
|
||||
|| defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE))
|
||||
#define DECIMAL_DIG __DECIMAL_DIG__
|
||||
#endif /* __ARM_PCS_AAPCS64 && ... */
|
||||
|
||||
#endif /* !_ARM_FLOAT_H_ */
|
||||
130
lib/libc/include/arm-netbsd-eabihf/machine/frame.h
vendored
130
lib/libc/include/arm-netbsd-eabihf/machine/frame.h
vendored
@ -1,130 +0,0 @@
|
||||
/* $NetBSD: frame.h,v 1.23 2022/04/02 11:16:07 skrll Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1997 Mark Brinicombe.
|
||||
* Copyright (c) 1994 Brini.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software written for Brini by Mark Brinicombe
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Brini.
|
||||
* 4. The name of the company nor the name of the author may be used to
|
||||
* endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
* arm/frame.h - Stack frames structures
|
||||
*/
|
||||
|
||||
#ifndef _ARM_FRAME_H_
|
||||
#define _ARM_FRAME_H_
|
||||
|
||||
#ifndef _LOCORE
|
||||
|
||||
#include <sys/signal.h>
|
||||
#include <sys/ucontext.h>
|
||||
|
||||
/*
|
||||
* Trap frame. Pushed onto the kernel stack on a trap (synchronous exception).
|
||||
*/
|
||||
|
||||
typedef struct trapframe {
|
||||
register_t tf_spsr;
|
||||
register_t tf_fill; /* fill here so r0 will be dword aligned */
|
||||
register_t tf_r0;
|
||||
register_t tf_r1;
|
||||
register_t tf_r2;
|
||||
register_t tf_r3;
|
||||
register_t tf_r4;
|
||||
register_t tf_r5;
|
||||
register_t tf_r6;
|
||||
register_t tf_r7;
|
||||
register_t tf_r8;
|
||||
register_t tf_r9;
|
||||
register_t tf_r10;
|
||||
register_t tf_r11;
|
||||
register_t tf_r12;
|
||||
register_t tf_usr_sp;
|
||||
register_t tf_usr_lr;
|
||||
register_t tf_svc_sp;
|
||||
register_t tf_svc_lr;
|
||||
register_t tf_pc;
|
||||
} trapframe_t;
|
||||
|
||||
/* Register numbers */
|
||||
#define tf_ip tf_r12
|
||||
#define tf_r13 tf_usr_sp
|
||||
#define tf_r14 tf_usr_lr
|
||||
#define tf_r15 tf_pc
|
||||
|
||||
#define TRAP_USERMODE(tf) (((tf)->tf_spsr & PSR_MODE) == PSR_USR32_MODE)
|
||||
|
||||
#define FB_R4 0
|
||||
#define FB_R5 1
|
||||
#define FB_R6 2
|
||||
#define FB_R7 3
|
||||
#define FB_R8 4
|
||||
#define FB_R9 5
|
||||
#define FB_R10 6
|
||||
#define FB_R11 7
|
||||
#define FB_R12 8
|
||||
#define FB_R13 9
|
||||
#define FB_R14 10
|
||||
#define FB_MAX 11
|
||||
struct faultbuf {
|
||||
register_t fb_reg[FB_MAX];
|
||||
};
|
||||
|
||||
/*
|
||||
* Signal frame. Pushed onto user stack before calling sigcode.
|
||||
*/
|
||||
#ifdef COMPAT_16
|
||||
struct sigframe_sigcontext {
|
||||
struct sigcontext sf_sc;
|
||||
};
|
||||
#endif
|
||||
|
||||
/* the pointers are use in the trampoline code to locate the ucontext */
|
||||
struct sigframe_siginfo {
|
||||
siginfo_t sf_si; /* actual saved siginfo */
|
||||
ucontext_t sf_uc; /* actual saved ucontext */
|
||||
};
|
||||
|
||||
#if defined(_KERNEL) || defined(_KMEMUSER)
|
||||
#ifdef _KERNEL
|
||||
__BEGIN_DECLS
|
||||
void sendsig_sigcontext(const ksiginfo_t *, const sigset_t *);
|
||||
void *getframe(struct lwp *, int, int *);
|
||||
__END_DECLS
|
||||
#define lwp_settrapframe(l, tf) ((l)->l_md.md_tf = (tf))
|
||||
#endif
|
||||
#define lwp_trapframe(l) ((l)->l_md.md_tf)
|
||||
#endif /* _KERNEL || _KMEMUSER */
|
||||
|
||||
#endif /* _LOCORE */
|
||||
|
||||
#endif /* _ARM_FRAME_H_ */
|
||||
|
||||
/* End of frame.h */
|
||||
@ -1,4 +0,0 @@
|
||||
/* $NetBSD: ieee.h,v 1.11 2014/01/31 19:38:06 matt Exp $ */
|
||||
|
||||
#include <arm/math.h> /* for #define __HAVE_LONG_DOUBLE 128 */
|
||||
#include <sys/ieee754.h>
|
||||
@ -1,50 +0,0 @@
|
||||
/* $NetBSD: ieeefp.h,v 1.5 2021/10/06 05:33:15 skrll Exp $ */
|
||||
|
||||
/*
|
||||
* Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995
|
||||
* Public domain.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_IEEEFP_H_
|
||||
#define _ARM_IEEEFP_H_
|
||||
|
||||
#include <sys/featuretest.h>
|
||||
|
||||
#if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)
|
||||
|
||||
#include <arm/fenv.h>
|
||||
|
||||
#if !defined(_ISOC99_SOURCE)
|
||||
|
||||
/* Exception type (used by fpsetmask() et al.) */
|
||||
|
||||
typedef int fp_except;
|
||||
|
||||
/* adjust for FP_* and FE_* value differences */
|
||||
#define __FPE(x) (x)
|
||||
#define __FEE(x) (x)
|
||||
#define __FPR(x) (x)
|
||||
#define __FER(x) (x)
|
||||
|
||||
/* Bit defines for fp_except */
|
||||
|
||||
#define FP_X_INV FE_INVALID /* invalid operation exception */
|
||||
#define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */
|
||||
#define FP_X_OFL FE_OVERFLOW /* overflow exception */
|
||||
#define FP_X_UFL FE_UNDERFLOW /* underflow exception */
|
||||
#define FP_X_IMP FE_INEXACT /* imprecise (prec. loss; "inexact") */
|
||||
|
||||
/* Rounding modes */
|
||||
|
||||
typedef enum {
|
||||
FP_RN=FE_TONEAREST, /* round to nearest representable number */
|
||||
FP_RP=FE_UPWARD, /* round toward positive infinity */
|
||||
FP_RM=FE_DOWNWARD, /* round toward negative infinity */
|
||||
FP_RZ=FE_TOWARDZERO /* round to zero (truncate) */
|
||||
} fp_rnd;
|
||||
|
||||
#endif /* !_ISOC99_SOURCE */
|
||||
|
||||
#endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */
|
||||
|
||||
#endif /* _ARM_IEEEFP_H_ */
|
||||
@ -1,74 +0,0 @@
|
||||
/* $NetBSD: int_const.h,v 1.5 2018/08/10 17:05:22 jakllsch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Klaus Klein.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_INT_CONST_H_
|
||||
#define _ARM_INT_CONST_H_
|
||||
|
||||
#ifdef __INTMAX_C_SUFFIX__
|
||||
#include <sys/common_int_const.h>
|
||||
#else
|
||||
/*
|
||||
* 7.18.4 Macros for integer constants
|
||||
*/
|
||||
|
||||
/* 7.18.4.1 Macros for minimum-width integer constants */
|
||||
|
||||
#define INT8_C(c) c
|
||||
#define INT16_C(c) c
|
||||
#define INT32_C(c) c
|
||||
#ifdef _LP64
|
||||
#define INT64_C(c) c ## L
|
||||
#else
|
||||
#define INT64_C(c) c ## LL
|
||||
#endif
|
||||
|
||||
#define UINT8_C(c) c
|
||||
#define UINT16_C(c) c
|
||||
#define UINT32_C(c) c ## U
|
||||
#ifdef _LP64
|
||||
#define UINT64_C(c) c ## UL
|
||||
#else
|
||||
#define UINT64_C(c) c ## ULL
|
||||
#endif
|
||||
|
||||
/* 7.18.4.2 Macros for greatest-width integer constants */
|
||||
|
||||
#ifdef _LP64
|
||||
#define INTMAX_C(c) c ## L
|
||||
#define UINTMAX_C(c) c ## UL
|
||||
#else
|
||||
#define INTMAX_C(c) c ## LL
|
||||
#define UINTMAX_C(c) c ## ULL
|
||||
#endif
|
||||
|
||||
#endif /* !__INTMAX_C_SUFFIX__ */
|
||||
|
||||
#endif /* !_ARM_INT_CONST_H_ */
|
||||
@ -1,359 +0,0 @@
|
||||
/* $NetBSD: int_fmtio.h,v 1.10 2018/07/15 00:36:13 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Klaus Klein.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_INT_FMTIO_H_
|
||||
#define _ARM_INT_FMTIO_H_
|
||||
|
||||
#ifdef __INTPTR_FMTd__
|
||||
#include <sys/common_int_fmtio.h>
|
||||
#else
|
||||
/*
|
||||
* 7.8.1 Macros for format specifiers
|
||||
*/
|
||||
|
||||
/* fprintf macros for signed integers */
|
||||
#define PRId8 "d" /* int8_t */
|
||||
#define PRId16 "d" /* int16_t */
|
||||
#define PRId32 "d" /* int32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRId64 "lld" /* int64_t */
|
||||
#else
|
||||
#define PRId64 "ld" /* int64_t */
|
||||
#endif
|
||||
#define PRIdLEAST8 "d" /* int_least8_t */
|
||||
#define PRIdLEAST16 "d" /* int_least16_t */
|
||||
#define PRIdLEAST32 "d" /* int_least32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIdLEAST64 "lld" /* int_least64_t */
|
||||
#else
|
||||
#define PRIdLEAST64 "ld" /* int_least64_t */
|
||||
#endif
|
||||
#define PRIdFAST8 "d" /* int_fast8_t */
|
||||
#define PRIdFAST16 "d" /* int_fast16_t */
|
||||
#define PRIdFAST32 "d" /* int_fast32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIdFAST64 "lld" /* int_fast64_t */
|
||||
#define PRIdMAX "lld" /* intmax_t */
|
||||
#else
|
||||
#define PRIdFAST64 "ld" /* int_fast64_t */
|
||||
#define PRIdMAX "ld" /* intmax_t */
|
||||
#endif
|
||||
#define PRIdPTR "ld" /* intptr_t */
|
||||
|
||||
#define PRIi8 "i" /* int8_t */
|
||||
#define PRIi16 "i" /* int16_t */
|
||||
#define PRIi32 "i" /* int32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIi64 "lli" /* int64_t */
|
||||
#else
|
||||
#define PRIi64 "li" /* int64_t */
|
||||
#endif
|
||||
#define PRIiLEAST8 "i" /* int_least8_t */
|
||||
#define PRIiLEAST16 "i" /* int_least16_t */
|
||||
#define PRIiLEAST32 "i" /* int_least32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIiLEAST64 "lli" /* int_least64_t */
|
||||
#else
|
||||
#define PRIiLEAST64 "li" /* int_least64_t */
|
||||
#endif
|
||||
#define PRIiFAST8 "i" /* int_fast8_t */
|
||||
#define PRIiFAST16 "i" /* int_fast16_t */
|
||||
#define PRIiFAST32 "i" /* int_fast32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIiFAST64 "lli" /* int_fast64_t */
|
||||
#define PRIiMAX "lli" /* intmax_t */
|
||||
#else
|
||||
#define PRIiFAST64 "li" /* int_fast64_t */
|
||||
#define PRIiMAX "li" /* intmax_t */
|
||||
#endif
|
||||
#define PRIiPTR "li" /* intptr_t */
|
||||
|
||||
/* fprintf macros for unsigned integers */
|
||||
|
||||
#define PRIo8 "o" /* uint8_t */
|
||||
#define PRIo16 "o" /* uint16_t */
|
||||
#define PRIo32 "o" /* uint32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIo64 "llo" /* uint64_t */
|
||||
#else
|
||||
#define PRIo64 "lo" /* uint64_t */
|
||||
#endif
|
||||
#define PRIoLEAST8 "o" /* uint_least8_t */
|
||||
#define PRIoLEAST16 "o" /* uint_least16_t */
|
||||
#define PRIoLEAST32 "o" /* uint_least32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIoLEAST64 "llo" /* uint_least64_t */
|
||||
#else
|
||||
#define PRIoLEAST64 "lo" /* uint_least64_t */
|
||||
#endif
|
||||
#define PRIoFAST8 "o" /* uint_fast8_t */
|
||||
#define PRIoFAST16 "o" /* uint_fast16_t */
|
||||
#define PRIoFAST32 "o" /* uint_fast32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIoFAST64 "llo" /* uint_fast64_t */
|
||||
#define PRIoMAX "llo" /* uintmax_t */
|
||||
#else
|
||||
#define PRIoFAST64 "lo" /* uint_fast64_t */
|
||||
#define PRIoMAX "lo" /* uintmax_t */
|
||||
#endif
|
||||
#define PRIoPTR "lo" /* uintptr_t */
|
||||
|
||||
#define PRIu8 "u" /* uint8_t */
|
||||
#define PRIu16 "u" /* uint16_t */
|
||||
#define PRIu32 "u" /* uint32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIu64 "llu" /* uint64_t */
|
||||
#else
|
||||
#define PRIu64 "lu" /* uint64_t */
|
||||
#endif
|
||||
#define PRIuLEAST8 "u" /* uint_least8_t */
|
||||
#define PRIuLEAST16 "u" /* uint_least16_t */
|
||||
#define PRIuLEAST32 "u" /* uint_least32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIuLEAST64 "llu" /* uint_least64_t */
|
||||
#else
|
||||
#define PRIuLEAST64 "lu" /* uint_least64_t */
|
||||
#endif
|
||||
#define PRIuFAST8 "u" /* uint_fast8_t */
|
||||
#define PRIuFAST16 "u" /* uint_fast16_t */
|
||||
#define PRIuFAST32 "u" /* uint_fast32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIuFAST64 "llu" /* uint_fast64_t */
|
||||
#define PRIuMAX "llu" /* uintmax_t */
|
||||
#else
|
||||
#define PRIuFAST64 "lu" /* uint_fast64_t */
|
||||
#define PRIuMAX "lu" /* uintmax_t */
|
||||
#endif
|
||||
#define PRIuPTR "lu" /* uintptr_t */
|
||||
|
||||
#define PRIx8 "x" /* uint8_t */
|
||||
#define PRIx16 "x" /* uint16_t */
|
||||
#define PRIx32 "x" /* uint32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIx64 "llx" /* uint64_t */
|
||||
#else
|
||||
#define PRIx64 "lx" /* uint64_t */
|
||||
#endif
|
||||
#define PRIxLEAST8 "x" /* uint_least8_t */
|
||||
#define PRIxLEAST16 "x" /* uint_least16_t */
|
||||
#define PRIxLEAST32 "x" /* uint_least32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIxLEAST64 "llx" /* uint_least64_t */
|
||||
#else
|
||||
#define PRIxLEAST64 "lx" /* uint_least64_t */
|
||||
#endif
|
||||
#define PRIxFAST8 "x" /* uint_fast8_t */
|
||||
#define PRIxFAST16 "x" /* uint_fast16_t */
|
||||
#define PRIxFAST32 "x" /* uint_fast32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIxFAST64 "llx" /* uint_fast64_t */
|
||||
#define PRIxMAX "llx" /* uintmax_t */
|
||||
#else
|
||||
#define PRIxFAST64 "lx" /* uint_fast64_t */
|
||||
#define PRIxMAX "lx" /* uintmax_t */
|
||||
#endif
|
||||
#define PRIxPTR "lx" /* uintptr_t */
|
||||
|
||||
#define PRIX8 "X" /* uint8_t */
|
||||
#define PRIX16 "X" /* uint16_t */
|
||||
#define PRIX32 "X" /* uint32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIX64 "llX" /* uint64_t */
|
||||
#else
|
||||
#define PRIX64 "lX" /* uint64_t */
|
||||
#endif
|
||||
#define PRIXLEAST8 "X" /* uint_least8_t */
|
||||
#define PRIXLEAST16 "X" /* uint_least16_t */
|
||||
#define PRIXLEAST32 "X" /* uint_least32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIXLEAST64 "llX" /* uint_least64_t */
|
||||
#else
|
||||
#define PRIXLEAST64 "lX" /* uint_least64_t */
|
||||
#endif
|
||||
#define PRIXFAST8 "X" /* uint_fast8_t */
|
||||
#define PRIXFAST16 "X" /* uint_fast16_t */
|
||||
#define PRIXFAST32 "X" /* uint_fast32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define PRIXFAST64 "llX" /* uint_fast64_t */
|
||||
#define PRIXMAX "llX" /* uintmax_t */
|
||||
#else
|
||||
#define PRIXFAST64 "lX" /* uint_fast64_t */
|
||||
#define PRIXMAX "lX" /* uintmax_t */
|
||||
#endif
|
||||
#define PRIXPTR "lX" /* uintptr_t */
|
||||
|
||||
/* fscanf macros for signed integers */
|
||||
|
||||
#define SCNd8 "hhd" /* int8_t */
|
||||
#define SCNd16 "hd" /* int16_t */
|
||||
#define SCNd32 "d" /* int32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNd64 "lld" /* int64_t */
|
||||
#else
|
||||
#define SCNd64 "ld" /* int64_t */
|
||||
#endif
|
||||
#define SCNdLEAST8 "hhd" /* int_least8_t */
|
||||
#define SCNdLEAST16 "hd" /* int_least16_t */
|
||||
#define SCNdLEAST32 "d" /* int_least32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNdLEAST64 "lld" /* int_least64_t */
|
||||
#else
|
||||
#define SCNdLEAST64 "ld" /* int_least64_t */
|
||||
#endif
|
||||
#define SCNdFAST8 "d" /* int_fast8_t */
|
||||
#define SCNdFAST16 "d" /* int_fast16_t */
|
||||
#define SCNdFAST32 "d" /* int_fast32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNdFAST64 "lld" /* int_fast64_t */
|
||||
#define SCNdMAX "lld" /* intmax_t */
|
||||
#else
|
||||
#define SCNdFAST64 "ld" /* int_fast64_t */
|
||||
#define SCNdMAX "ld" /* intmax_t */
|
||||
#endif
|
||||
#define SCNdPTR "ld" /* intptr_t */
|
||||
|
||||
#define SCNi8 "hhi" /* int8_t */
|
||||
#define SCNi16 "hi" /* int16_t */
|
||||
#define SCNi32 "i" /* int32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNi64 "lli" /* int64_t */
|
||||
#else
|
||||
#define SCNi64 "li" /* int64_t */
|
||||
#endif
|
||||
#define SCNiLEAST8 "hhi" /* int_least8_t */
|
||||
#define SCNiLEAST16 "hi" /* int_least16_t */
|
||||
#define SCNiLEAST32 "i" /* int_least32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNiLEAST64 "lli" /* int_least64_t */
|
||||
#else
|
||||
#define SCNiLEAST64 "li" /* int_least64_t */
|
||||
#endif
|
||||
#define SCNiFAST8 "i" /* int_fast8_t */
|
||||
#define SCNiFAST16 "i" /* int_fast16_t */
|
||||
#define SCNiFAST32 "i" /* int_fast32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNiFAST64 "lli" /* int_fast64_t */
|
||||
#define SCNiMAX "lli" /* intmax_t */
|
||||
#else
|
||||
#define SCNiFAST64 "li" /* int_fast64_t */
|
||||
#define SCNiMAX "li" /* intmax_t */
|
||||
#endif
|
||||
#define SCNiPTR "li" /* intptr_t */
|
||||
|
||||
/* fscanf macros for unsigned integers */
|
||||
|
||||
#define SCNo8 "hho" /* uint8_t */
|
||||
#define SCNo16 "ho" /* uint16_t */
|
||||
#define SCNo32 "o" /* uint32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNo64 "llo" /* uint64_t */
|
||||
#else
|
||||
#define SCNo64 "lo" /* uint64_t */
|
||||
#endif
|
||||
#define SCNoLEAST8 "hho" /* uint_least8_t */
|
||||
#define SCNoLEAST16 "ho" /* uint_least16_t */
|
||||
#define SCNoLEAST32 "o" /* uint_least32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNoLEAST64 "llo" /* uint_least64_t */
|
||||
#else
|
||||
#define SCNoLEAST64 "lo" /* uint_least64_t */
|
||||
#endif
|
||||
#define SCNoFAST8 "o" /* uint_fast8_t */
|
||||
#define SCNoFAST16 "o" /* uint_fast16_t */
|
||||
#define SCNoFAST32 "o" /* uint_fast32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNoFAST64 "llo" /* uint_fast64_t */
|
||||
#define SCNoMAX "llo" /* uintmax_t */
|
||||
#else
|
||||
#define SCNoFAST64 "lo" /* uint_fast64_t */
|
||||
#define SCNoMAX "lo" /* uintmax_t */
|
||||
#endif
|
||||
#define SCNoPTR "lo" /* uintptr_t */
|
||||
|
||||
#define SCNu8 "hhu" /* uint8_t */
|
||||
#define SCNu16 "hu" /* uint16_t */
|
||||
#define SCNu32 "u" /* uint32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNu64 "llu" /* uint64_t */
|
||||
#else
|
||||
#define SCNu64 "lu" /* uint64_t */
|
||||
#endif
|
||||
#define SCNuLEAST8 "hhu" /* uint_least8_t */
|
||||
#define SCNuLEAST16 "hu" /* uint_least16_t */
|
||||
#define SCNuLEAST32 "u" /* uint_least32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNuLEAST64 "llu" /* uint_least64_t */
|
||||
#else
|
||||
#define SCNuLEAST64 "lu" /* uint_least64_t */
|
||||
#endif
|
||||
#define SCNuFAST8 "u" /* uint_fast8_t */
|
||||
#define SCNuFAST16 "u" /* uint_fast16_t */
|
||||
#define SCNuFAST32 "u" /* uint_fast32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNuFAST64 "llu" /* uint_fast64_t */
|
||||
#define SCNuMAX "llu" /* uintmax_t */
|
||||
#else
|
||||
#define SCNuFAST64 "lu" /* uint_fast64_t */
|
||||
#define SCNuMAX "lu" /* uintmax_t */
|
||||
#endif
|
||||
#define SCNuPTR "lu" /* uintptr_t */
|
||||
|
||||
#define SCNx8 "hhx" /* uint8_t */
|
||||
#define SCNx16 "hx" /* uint16_t */
|
||||
#define SCNx32 "x" /* uint32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNx64 "llx" /* uint64_t */
|
||||
#else
|
||||
#define SCNx64 "lx" /* uint64_t */
|
||||
#endif
|
||||
#define SCNxLEAST8 "hhx" /* uint_least8_t */
|
||||
#define SCNxLEAST16 "hx" /* uint_least16_t */
|
||||
#define SCNxLEAST32 "x" /* uint_least32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNxLEAST64 "llx" /* uint_least64_t */
|
||||
#else
|
||||
#define SCNxLEAST64 "lx" /* uint_least64_t */
|
||||
#endif
|
||||
#define SCNxFAST8 "x" /* uint_fast8_t */
|
||||
#define SCNxFAST16 "x" /* uint_fast16_t */
|
||||
#define SCNxFAST32 "x" /* uint_fast32_t */
|
||||
#if defined(__clang__) || !defined(_LP64)
|
||||
#define SCNxFAST64 "llx" /* uint_fast64_t */
|
||||
#define SCNxMAX "llx" /* uintmax_t */
|
||||
#else
|
||||
#define SCNxFAST64 "lx" /* uint_fast64_t */
|
||||
#define SCNxMAX "lx" /* uintmax_t */
|
||||
#endif
|
||||
#define SCNxPTR "lx" /* uintptr_t */
|
||||
|
||||
#endif /* !__INTPTR_FMTd__ */
|
||||
|
||||
#endif /* !_ARM_INT_FMTIO_H_ */
|
||||
@ -1,146 +0,0 @@
|
||||
/* $NetBSD: int_limits.h,v 1.12 2021/10/06 05:33:15 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Klaus Klein.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_INT_LIMITS_H_
|
||||
#define _ARM_INT_LIMITS_H_
|
||||
|
||||
#ifdef __SIG_ATOMIC_MAX__
|
||||
#include <sys/common_int_limits.h>
|
||||
#else
|
||||
/*
|
||||
* 7.18.2 Limits of specified-width integer types
|
||||
*/
|
||||
|
||||
/* 7.18.2.1 Limits of exact-width integer types */
|
||||
|
||||
/* minimum values of exact-width signed integer types */
|
||||
#define INT8_MIN (-0x7f-1) /* int8_t */
|
||||
#define INT16_MIN (-0x7fff-1) /* int16_t */
|
||||
#define INT32_MIN (-0x7fffffff-1) /* int32_t */
|
||||
#define INT64_MIN (-0x7fffffffffffffffLL-1) /* int64_t */
|
||||
|
||||
/* maximum values of exact-width signed integer types */
|
||||
#define INT8_MAX 0x7f /* int8_t */
|
||||
#define INT16_MAX 0x7fff /* int16_t */
|
||||
#define INT32_MAX 0x7fffffff /* int32_t */
|
||||
#define INT64_MAX 0x7fffffffffffffffLL /* int64_t */
|
||||
|
||||
/* maximum values of exact-width unsigned integer types */
|
||||
#define UINT8_MAX 0xff /* uint8_t */
|
||||
#define UINT16_MAX 0xffff /* uint16_t */
|
||||
#define UINT32_MAX 0xffffffffU /* uint32_t */
|
||||
#define UINT64_MAX 0xffffffffffffffffULL /* uint64_t */
|
||||
|
||||
/* 7.18.2.2 Limits of minimum-width integer types */
|
||||
|
||||
/* minimum values of minimum-width signed integer types */
|
||||
#define INT_LEAST8_MIN (-0x7f-1) /* int_least8_t */
|
||||
#define INT_LEAST16_MIN (-0x7fff-1) /* int_least16_t */
|
||||
#define INT_LEAST32_MIN (-0x7fffffff-1) /* int_least32_t */
|
||||
#define INT_LEAST64_MIN (-0x7fffffffffffffffLL-1) /* int_least64_t */
|
||||
|
||||
/* maximum values of minimum-width signed integer types */
|
||||
#define INT_LEAST8_MAX 0x7f /* int_least8_t */
|
||||
#define INT_LEAST16_MAX 0x7fff /* int_least16_t */
|
||||
#define INT_LEAST32_MAX 0x7fffffff /* int_least32_t */
|
||||
#define INT_LEAST64_MAX 0x7fffffffffffffffLL /* int_least64_t */
|
||||
|
||||
/* maximum values of minimum-width unsigned integer types */
|
||||
#define UINT_LEAST8_MAX 0xff /* uint_least8_t */
|
||||
#define UINT_LEAST16_MAX 0xffff /* uint_least16_t */
|
||||
#define UINT_LEAST32_MAX 0xffffffffU /* uint_least32_t */
|
||||
#define UINT_LEAST64_MAX 0xffffffffffffffffULL /* uint_least64_t */
|
||||
|
||||
/* 7.18.2.3 Limits of fastest minimum-width integer types */
|
||||
|
||||
/* minimum values of fastest minimum-width signed integer types */
|
||||
#define INT_FAST8_MIN (-0x7fffffff-1) /* int_fast8_t */
|
||||
#define INT_FAST16_MIN (-0x7fffffff-1) /* int_fast16_t */
|
||||
#define INT_FAST32_MIN (-0x7fffffff-1) /* int_fast32_t */
|
||||
#define INT_FAST64_MIN (-0x7fffffffffffffffLL-1) /* int_fast64_t */
|
||||
|
||||
/* maximum values of fastest minimum-width signed integer types */
|
||||
#define INT_FAST8_MAX 0x7fffffff /* int_fast8_t */
|
||||
#define INT_FAST16_MAX 0x7fffffff /* int_fast16_t */
|
||||
#define INT_FAST32_MAX 0x7fffffff /* int_fast32_t */
|
||||
#define INT_FAST64_MAX 0x7fffffffffffffffLL /* int_fast64_t */
|
||||
|
||||
/* maximum values of fastest minimum-width unsigned integer types */
|
||||
#define UINT_FAST8_MAX 0xffffffffU /* uint_fast8_t */
|
||||
#define UINT_FAST16_MAX 0xffffffffU /* uint_fast16_t */
|
||||
#define UINT_FAST32_MAX 0xffffffffU /* uint_fast32_t */
|
||||
#define UINT_FAST64_MAX 0xffffffffffffffffULL /* uint_fast64_t */
|
||||
|
||||
/* 7.18.2.4 Limits of integer types capable of holding object pointers */
|
||||
|
||||
#ifdef _LP64
|
||||
#define INTPTR_MIN (-0x7fffffffffffffffL-1) /* intptr_t */
|
||||
#define INTPTR_MAX 0x7fffffffffffffffL /* intptr_t */
|
||||
#define UINTPTR_MAX 0xffffffffffffffffUL /* uintptr_t */
|
||||
#else
|
||||
#define INTPTR_MIN (-0x7fffffffL-1) /* intptr_t */
|
||||
#define INTPTR_MAX 0x7fffffffL /* intptr_t */
|
||||
#define UINTPTR_MAX 0xffffffffUL /* uintptr_t */
|
||||
#endif
|
||||
|
||||
/* 7.18.2.5 Limits of greatest-width integer types */
|
||||
|
||||
#define INTMAX_MIN (-0x7fffffffffffffffLL-1) /* intmax_t */
|
||||
#define INTMAX_MAX 0x7fffffffffffffffLL /* intmax_t */
|
||||
#define UINTMAX_MAX 0xffffffffffffffffULL /* uintmax_t */
|
||||
|
||||
|
||||
/*
|
||||
* 7.18.3 Limits of other integer types
|
||||
*/
|
||||
|
||||
/* limits of ptrdiff_t */
|
||||
#ifdef _LP64
|
||||
#define PTRDIFF_MIN (-0x7fffffffffffffffL-1) /* ptrdiff_t */
|
||||
#define PTRDIFF_MAX 0x7fffffffffffffffL /* ptrdiff_t */
|
||||
#else
|
||||
#define PTRDIFF_MIN (-0x7fffffffL-1) /* ptrdiff_t */
|
||||
#define PTRDIFF_MAX 0x7fffffffL /* ptrdiff_t */
|
||||
#endif
|
||||
|
||||
/* limits of sig_atomic_t */
|
||||
#define SIG_ATOMIC_MIN (-0x7fffffff-1) /* sig_atomic_t */
|
||||
#define SIG_ATOMIC_MAX 0x7fffffff /* sig_atomic_t */
|
||||
|
||||
/* limit of size_t */
|
||||
#ifdef _LP64
|
||||
#define SIZE_MAX 0xffffffffffffffffUL /* size_t */
|
||||
#else
|
||||
#define SIZE_MAX 0xffffffffUL /* size_t */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* !_ARM_INT_LIMITS_H_ */
|
||||
@ -1,127 +0,0 @@
|
||||
/* $NetBSD: int_mwgwtypes.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_INT_MWGWTYPES_H_
|
||||
#define _ARM_INT_MWGWTYPES_H_
|
||||
|
||||
#ifdef __UINT_FAST64_TYPE__
|
||||
#include <sys/common_int_mwgwtypes.h>
|
||||
#else
|
||||
/*
|
||||
* 7.18.1 Integer types
|
||||
*/
|
||||
|
||||
/* 7.18.1.2 Minimum-width integer types */
|
||||
|
||||
#ifndef __INT_LEAST8_TYPE__
|
||||
# define __INT_LEAST8_TYPE__ signed char
|
||||
#endif
|
||||
#ifndef __UINT_LEAST8_TYPE__
|
||||
# define __UINT_LEAST8_TYPE__ unsigned char
|
||||
#endif
|
||||
#ifndef __INT_LEAST16_TYPE__
|
||||
# define __INT_LEAST16_TYPE__ short int
|
||||
#endif
|
||||
#ifndef __UINT_LEAST16_TYPE__
|
||||
# define __UINT_LEAST16_TYPE__ short unsigned int
|
||||
#endif
|
||||
#ifndef __INT_LEAST32_TYPE__
|
||||
# define __INT_LEAST32_TYPE__ int
|
||||
#endif
|
||||
#ifndef __UINT_LEAST32_TYPE__
|
||||
# define __UINT_LEAST32_TYPE__ unsigned int
|
||||
#endif
|
||||
#ifndef __INT_LEAST64_TYPE__
|
||||
# define __INT_LEAST64_TYPE__ long long int
|
||||
#endif
|
||||
#ifndef __UINT_LEAST64_TYPE__
|
||||
# define __UINT_LEAST64_TYPE__ long long unsigned int
|
||||
#endif
|
||||
|
||||
typedef __INT_LEAST8_TYPE__ int_least8_t;
|
||||
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
|
||||
typedef __INT_LEAST16_TYPE__ int_least16_t;
|
||||
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
|
||||
typedef __INT_LEAST32_TYPE__ int_least32_t;
|
||||
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
|
||||
typedef __INT_LEAST64_TYPE__ int_least64_t;
|
||||
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
|
||||
|
||||
/* 7.18.1.3 Fastest minimum-width integer types */
|
||||
|
||||
#ifndef __INT_FAST8_TYPE__
|
||||
# define __INT_FAST8_TYPE__ int
|
||||
#endif
|
||||
#ifndef __UINT_FAST8_TYPE__
|
||||
# define __UINT_FAST8_TYPE__ unsigned int
|
||||
#endif
|
||||
#ifndef __INT_FAST16_TYPE__
|
||||
# define __INT_FAST16_TYPE__ int
|
||||
#endif
|
||||
#ifndef __UINT_FAST16_TYPE__
|
||||
# define __UINT_FAST16_TYPE__ unsigned int
|
||||
#endif
|
||||
#ifndef __INT_FAST32_TYPE__
|
||||
# define __INT_FAST32_TYPE__ int
|
||||
#endif
|
||||
#ifndef __UINT_FAST32_TYPE__
|
||||
# define __UINT_FAST32_TYPE__ unsigned int
|
||||
#endif
|
||||
#ifndef __INT_FAST64_TYPE__
|
||||
# define __INT_FAST64_TYPE__ long long int
|
||||
#endif
|
||||
#ifndef __UINT_FAST64_TYPE__
|
||||
# define __UINT_FAST64_TYPE__ long long unsigned int
|
||||
#endif
|
||||
|
||||
typedef __INT_FAST8_TYPE__ int_fast8_t;
|
||||
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
|
||||
typedef __INT_FAST16_TYPE__ int_fast16_t;
|
||||
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
|
||||
typedef __INT_FAST32_TYPE__ int_fast32_t;
|
||||
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
|
||||
typedef __INT_FAST64_TYPE__ int_fast64_t;
|
||||
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
|
||||
|
||||
/* 7.18.1.5 Greatest-width integer types */
|
||||
|
||||
#ifndef __INTMAX_TYPE__
|
||||
# define __INTMAX_TYPE__ long long int
|
||||
#endif
|
||||
#ifndef __UINTMAX_TYPE__
|
||||
# define __UINTMAX_TYPE__ unsigned __INTMAX_TYPE__
|
||||
#endif
|
||||
|
||||
typedef __INTMAX_TYPE__ intmax_t;
|
||||
typedef __UINTMAX_TYPE__ uintmax_t;
|
||||
#endif
|
||||
|
||||
#endif /* !_ARM_INT_MWGWTYPES_H_ */
|
||||
@ -1,99 +0,0 @@
|
||||
/* $NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_INT_TYPES_H_
|
||||
#define _ARM_INT_TYPES_H_
|
||||
|
||||
#ifdef __UINTPTR_TYPE__
|
||||
#include <sys/common_int_types.h>
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
/*
|
||||
* 7.18.1 Integer types
|
||||
*/
|
||||
|
||||
/* 7.18.1.1 Exact-width integer types */
|
||||
|
||||
#ifndef __UINT8_TYPE__
|
||||
# define __UINT8_TYPE__ unsigned char
|
||||
#endif
|
||||
#ifndef __INT8_TYPE__
|
||||
# define __INT8_TYPE__ signed char
|
||||
#endif
|
||||
#ifndef __UINT16_TYPE__
|
||||
# ifndef __INT16_TYPE__
|
||||
# define __INT16_TYPE__ short int
|
||||
# endif
|
||||
# define __UINT16_TYPE__ unsigned __INT16_TYPE__
|
||||
#endif
|
||||
#ifndef __UINT32_TYPE__
|
||||
# ifndef __INT32_TYPE__
|
||||
# define __INT32_TYPE__ int
|
||||
# endif
|
||||
# define __UINT32_TYPE__ unsigned __INT32_TYPE__
|
||||
#endif
|
||||
#ifndef __UINT64_TYPE__
|
||||
# ifndef __INT64_TYPE__
|
||||
# define __INT64_TYPE__ long long int
|
||||
# endif
|
||||
# define __UINT64_TYPE__ unsigned __INT64_TYPE__
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
typedef signed __INT8_TYPE__ __int8_t;
|
||||
#else
|
||||
typedef __INT8_TYPE__ __int8_t;
|
||||
#endif
|
||||
typedef __UINT8_TYPE__ __uint8_t;
|
||||
typedef __INT16_TYPE__ __int16_t;
|
||||
typedef __UINT16_TYPE__ __uint16_t;
|
||||
typedef __INT32_TYPE__ __int32_t;
|
||||
typedef __UINT32_TYPE__ __uint32_t;
|
||||
typedef __INT64_TYPE__ __int64_t;
|
||||
typedef __UINT64_TYPE__ __uint64_t;
|
||||
|
||||
#define __BIT_TYPES_DEFINED__
|
||||
|
||||
/* 7.18.1.4 Integer types capable of holding object pointers */
|
||||
|
||||
#ifndef __UINTPTR_TYPE__
|
||||
# ifndef __INTPTR_TYPE__
|
||||
# define __INTPTR_TYPE__ long int
|
||||
# endif
|
||||
# define __UINTPTR_TYPE__ unsigned __INTPTR_TYPE__
|
||||
#endif
|
||||
|
||||
typedef __INTPTR_TYPE__ __intptr_t;
|
||||
typedef __UINTPTR_TYPE__ __uintptr_t;
|
||||
#endif
|
||||
|
||||
#endif /* !_ARM_INT_TYPES_H_ */
|
||||
@ -1,57 +0,0 @@
|
||||
/* $NetBSD: kcore.h,v 1.1 2008/01/01 14:06:43 chris Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Carnegie-Mellon University.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Author: Chris G. Demetriou
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and
|
||||
* its documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
|
||||
* FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified for NetBSD/i386 by Jason R. Thorpe, Numerical Aerospace
|
||||
* Simulation Facility, NASA Ames Research Center.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_KCORE_H_
|
||||
#define _ARM_KCORE_H_
|
||||
|
||||
typedef struct cpu_kcore_hdr {
|
||||
uint32_t version; /* structure version */
|
||||
uint32_t flags; /* flags */
|
||||
#define KCORE_ARM_APX 0x0001 /* L1 tables are in APX
|
||||
format */
|
||||
uint32_t PAKernelL1Table; /* PA of kernel L1 table */
|
||||
uint32_t PAUserL1Table; /* PA of userland L1 table */
|
||||
uint16_t UserL1TableSize; /* size of User L1 table */
|
||||
uint32_t nmemsegs; /* Number of RAM segments */
|
||||
uint32_t omemsegs; /* offset to memsegs */
|
||||
|
||||
/*
|
||||
* future versions will add fields here.
|
||||
*/
|
||||
#if 0
|
||||
phys_ram_seg_t memsegs[]; /* RAM segments */
|
||||
#endif
|
||||
} cpu_kcore_hdr_t;
|
||||
|
||||
#endif /* _ARM_KCORE_H_ */
|
||||
109
lib/libc/include/arm-netbsd-eabihf/machine/limits.h
vendored
109
lib/libc/include/arm-netbsd-eabihf/machine/limits.h
vendored
@ -1,109 +0,0 @@
|
||||
/* $NetBSD: limits.h,v 1.19 2019/01/21 20:28:17 dholland Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)limits.h 7.2 (Berkeley) 6/28/90
|
||||
*/
|
||||
|
||||
#ifndef _ARM_LIMITS_H_
|
||||
#define _ARM_LIMITS_H_
|
||||
|
||||
#include <sys/featuretest.h>
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
#define UCHAR_MAX 0xff /* max value for an unsigned char */
|
||||
#define SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
|
||||
|
||||
#define USHRT_MAX 0xffff /* max value for an unsigned short */
|
||||
#define SHRT_MAX 0x7fff /* max value for a short */
|
||||
#define SHRT_MIN (-0x7fff-1) /* min value for a short */
|
||||
|
||||
#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
|
||||
#define INT_MAX 0x7fffffff /* max value for an int */
|
||||
#define INT_MIN (-0x7fffffff-1) /* min value for an int */
|
||||
|
||||
#ifdef _LP64
|
||||
#define ULONG_MAX 0xffffffffffffffffUL /* max unsigned long */
|
||||
#define LONG_MAX 0x7fffffffffffffffL /* max signed long */
|
||||
#define LONG_MIN (-0x7fffffffffffffffL-1) /* min signed long */
|
||||
#else
|
||||
#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
|
||||
#define LONG_MAX 0x7fffffffL /* max value for a long */
|
||||
#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
|
||||
#endif
|
||||
|
||||
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
|
||||
defined(_NETBSD_SOURCE)
|
||||
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
|
||||
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
|
||||
#endif
|
||||
|
||||
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
|
||||
defined(_NETBSD_SOURCE)
|
||||
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
|
||||
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define SSIZE_MIN LONG_MIN /* min value for a ssize_t */
|
||||
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
|
||||
|
||||
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
|
||||
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
|
||||
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
|
||||
|
||||
#endif /* _NETBSD_SOURCE */
|
||||
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
|
||||
#ifdef _LP64
|
||||
#define LONG_BIT 64
|
||||
#else
|
||||
#define LONG_BIT 32
|
||||
#endif
|
||||
#define WORD_BIT 32
|
||||
|
||||
#define DBL_DIG __DBL_DIG__
|
||||
#define DBL_MAX __DBL_MAX__
|
||||
#define DBL_MIN __DBL_MIN__
|
||||
|
||||
#define FLT_DIG __FLT_DIG__
|
||||
#define FLT_MAX __FLT_MAX__
|
||||
#define FLT_MIN __FLT_MIN__
|
||||
|
||||
#ifdef __ARM_PCS_AAPCS64
|
||||
#define LDBL_DIG __LDBL_DIG__
|
||||
#define LDBL_MAX __LDBL_MAX__
|
||||
#define LDBL_MIN __LDBL_MIN__
|
||||
#endif
|
||||
|
||||
#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
|
||||
|
||||
#endif /* _ARM_LIMITS_H_ */
|
||||
221
lib/libc/include/arm-netbsd-eabihf/machine/lock.h
vendored
221
lib/libc/include/arm-netbsd-eabihf/machine/lock.h
vendored
@ -1,221 +0,0 @@
|
||||
/* $NetBSD: lock.h,v 1.39 2021/05/30 02:28:59 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Jason R. Thorpe.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Machine-dependent spin lock operations.
|
||||
*
|
||||
* NOTE: The SWP insn used here is available only on ARM architecture
|
||||
* version 3 and later (as well as 2a). What we are going to do is
|
||||
* expect that the kernel will trap and emulate the insn. That will
|
||||
* be slow, but give us the atomicity that we need.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_LOCK_H_
|
||||
#define _ARM_LOCK_H_
|
||||
|
||||
static __inline int
|
||||
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
|
||||
{
|
||||
return *__ptr == __SIMPLELOCK_LOCKED;
|
||||
}
|
||||
|
||||
static __inline int
|
||||
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
|
||||
{
|
||||
return *__ptr == __SIMPLELOCK_UNLOCKED;
|
||||
}
|
||||
|
||||
static __inline void
|
||||
__cpu_simple_lock_clear(__cpu_simple_lock_t *__ptr)
|
||||
{
|
||||
*__ptr = __SIMPLELOCK_UNLOCKED;
|
||||
}
|
||||
|
||||
static __inline void
|
||||
__cpu_simple_lock_set(__cpu_simple_lock_t *__ptr)
|
||||
{
|
||||
*__ptr = __SIMPLELOCK_LOCKED;
|
||||
}
|
||||
|
||||
#if defined(_ARM_ARCH_6)
|
||||
static __inline unsigned int
|
||||
__arm_load_exclusive(__cpu_simple_lock_t *__alp)
|
||||
{
|
||||
unsigned int __rv;
|
||||
if (/*CONSTCOND*/sizeof(*__alp) == 1) {
|
||||
__asm __volatile("ldrexb\t%0,[%1]" : "=r"(__rv) : "r"(__alp));
|
||||
} else {
|
||||
__asm __volatile("ldrex\t%0,[%1]" : "=r"(__rv) : "r"(__alp));
|
||||
}
|
||||
return __rv;
|
||||
}
|
||||
|
||||
/* returns 0 on success and 1 on failure */
|
||||
static __inline unsigned int
|
||||
__arm_store_exclusive(__cpu_simple_lock_t *__alp, unsigned int __val)
|
||||
{
|
||||
unsigned int __rv;
|
||||
if (/*CONSTCOND*/sizeof(*__alp) == 1) {
|
||||
__asm __volatile("strexb\t%0,%1,[%2]"
|
||||
: "=&r"(__rv) : "r"(__val), "r"(__alp) : "cc", "memory");
|
||||
} else {
|
||||
__asm __volatile("strex\t%0,%1,[%2]"
|
||||
: "=&r"(__rv) : "r"(__val), "r"(__alp) : "cc", "memory");
|
||||
}
|
||||
return __rv;
|
||||
}
|
||||
#elif defined(_KERNEL)
|
||||
static __inline unsigned char
|
||||
__swp(unsigned char __val, __cpu_simple_lock_t *__ptr)
|
||||
{
|
||||
uint32_t __val32;
|
||||
__asm volatile("swpb %0, %1, [%2]"
|
||||
: "=&r" (__val32) : "r" (__val), "r" (__ptr) : "memory");
|
||||
return __val32;
|
||||
}
|
||||
#else
|
||||
/*
|
||||
* On MP Cortex, SWP no longer guarantees atomic results. Thus we pad
|
||||
* out SWP so that when the cpu generates an undefined exception we can replace
|
||||
* the SWP/MOV instructions with the right LDREX/STREX instructions.
|
||||
*
|
||||
* This is why we force the SWP into the template needed for LDREX/STREX
|
||||
* including the extra instructions and extra register for testing the result.
|
||||
*/
|
||||
static __inline int
|
||||
__swp(int __val, __cpu_simple_lock_t *__ptr)
|
||||
{
|
||||
int __tmp, __rv;
|
||||
__asm volatile(
|
||||
#if 1
|
||||
"1:\t" "swp %[__rv], %[__val], [%[__ptr]]"
|
||||
"\n\t" "b 2f"
|
||||
#else
|
||||
"1:\t" "ldrex %[__rv],[%[__ptr]]"
|
||||
"\n\t" "strex %[__tmp],%[__val],[%[__ptr]]"
|
||||
#endif
|
||||
"\n\t" "cmp %[__tmp],#0"
|
||||
"\n\t" "bne 1b"
|
||||
"\n" "2:"
|
||||
: [__rv] "=&r" (__rv), [__tmp] "=&r" (__tmp)
|
||||
: [__val] "r" (__val), [__ptr] "r" (__ptr) : "cc", "memory");
|
||||
return __rv;
|
||||
}
|
||||
#endif /* !_ARM_ARCH_6 */
|
||||
|
||||
/* load/dmb implies load-acquire */
|
||||
static __inline void
|
||||
__arm_load_dmb(void)
|
||||
{
|
||||
#if defined(_ARM_ARCH_7)
|
||||
__asm __volatile("dmb ish" ::: "memory");
|
||||
#elif defined(_ARM_ARCH_6)
|
||||
__asm __volatile("mcr\tp15,0,%0,c7,c10,5" :: "r"(0) : "memory");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* dmb/store implies store-release */
|
||||
static __inline void
|
||||
__arm_dmb_store(void)
|
||||
{
|
||||
#if defined(_ARM_ARCH_7)
|
||||
__asm __volatile("dmb ish" ::: "memory");
|
||||
#elif defined(_ARM_ARCH_6)
|
||||
__asm __volatile("mcr\tp15,0,%0,c7,c10,5" :: "r"(0) : "memory");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static __inline void __unused
|
||||
__cpu_simple_lock_init(__cpu_simple_lock_t *__alp)
|
||||
{
|
||||
|
||||
*__alp = __SIMPLELOCK_UNLOCKED;
|
||||
}
|
||||
|
||||
#if !defined(__thumb__) || defined(_ARM_ARCH_T2)
|
||||
static __inline void __unused
|
||||
__cpu_simple_lock(__cpu_simple_lock_t *__alp)
|
||||
{
|
||||
#if defined(_ARM_ARCH_6)
|
||||
do {
|
||||
/* spin */
|
||||
} while (__arm_load_exclusive(__alp) != __SIMPLELOCK_UNLOCKED
|
||||
|| __arm_store_exclusive(__alp, __SIMPLELOCK_LOCKED));
|
||||
__arm_load_dmb();
|
||||
#else
|
||||
while (__swp(__SIMPLELOCK_LOCKED, __alp) != __SIMPLELOCK_UNLOCKED)
|
||||
continue;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
void __cpu_simple_lock(__cpu_simple_lock_t *);
|
||||
#endif
|
||||
|
||||
#if !defined(__thumb__) || defined(_ARM_ARCH_T2)
|
||||
static __inline int __unused
|
||||
__cpu_simple_lock_try(__cpu_simple_lock_t *__alp)
|
||||
{
|
||||
#if defined(_ARM_ARCH_6)
|
||||
do {
|
||||
if (__arm_load_exclusive(__alp) != __SIMPLELOCK_UNLOCKED) {
|
||||
return 0;
|
||||
}
|
||||
} while (__arm_store_exclusive(__alp, __SIMPLELOCK_LOCKED));
|
||||
__arm_load_dmb();
|
||||
return 1;
|
||||
#else
|
||||
return (__swp(__SIMPLELOCK_LOCKED, __alp) == __SIMPLELOCK_UNLOCKED);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
int __cpu_simple_lock_try(__cpu_simple_lock_t *);
|
||||
#endif
|
||||
|
||||
static __inline void __unused
|
||||
__cpu_simple_unlock(__cpu_simple_lock_t *__alp)
|
||||
{
|
||||
|
||||
#if defined(_ARM_ARCH_8) && defined(__LP64__)
|
||||
if (sizeof(*__alp) == 1) {
|
||||
__asm __volatile("stlrb\t%w0, [%1]"
|
||||
:: "r"(__SIMPLELOCK_UNLOCKED), "r"(__alp) : "memory");
|
||||
} else {
|
||||
__asm __volatile("stlr\t%0, [%1]"
|
||||
:: "r"(__SIMPLELOCK_UNLOCKED), "r"(__alp) : "memory");
|
||||
}
|
||||
#else
|
||||
__arm_dmb_store();
|
||||
*__alp = __SIMPLELOCK_UNLOCKED;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* _ARM_LOCK_H_ */
|
||||
@ -1,6 +0,0 @@
|
||||
/* $NetBSD: math.h,v 1.4 2014/01/31 19:38:06 matt Exp $ */
|
||||
|
||||
#define __HAVE_NANF
|
||||
#ifdef __ARM_PCS_AAPCS64
|
||||
#define __HAVE_LONG_DOUBLE 128
|
||||
#endif
|
||||
@ -1,284 +0,0 @@
|
||||
/* $NetBSD: mcontext.h,v 1.23 2021/10/06 05:33:15 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Klaus Klein and by Jason R. Thorpe of Wasabi Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_MCONTEXT_H_
|
||||
#define _ARM_MCONTEXT_H_
|
||||
|
||||
#include <sys/stdint.h>
|
||||
|
||||
/*
|
||||
* General register state
|
||||
*/
|
||||
#if defined(__aarch64__)
|
||||
#define _NGREG 35 /* GR0-30, SP, PC, SPSR, TPIDR */
|
||||
#define _NGREG32 17
|
||||
typedef __uint64_t __greg_t;
|
||||
typedef unsigned int __greg32_t;
|
||||
|
||||
typedef __greg32_t __gregset32_t[_NGREG32];
|
||||
#elif defined(__arm__)
|
||||
#define _NGREG 17
|
||||
typedef unsigned int __greg_t;
|
||||
#endif
|
||||
|
||||
typedef __greg_t __gregset_t[_NGREG];
|
||||
|
||||
#define _REG_R0 0
|
||||
#define _REG_R1 1
|
||||
#define _REG_R2 2
|
||||
#define _REG_R3 3
|
||||
#define _REG_R4 4
|
||||
#define _REG_R5 5
|
||||
#define _REG_R6 6
|
||||
#define _REG_R7 7
|
||||
#define _REG_R8 8
|
||||
#define _REG_R9 9
|
||||
#define _REG_R10 10
|
||||
#define _REG_R11 11
|
||||
#define _REG_R12 12
|
||||
#define _REG_R13 13
|
||||
#define _REG_R14 14
|
||||
#define _REG_R15 15
|
||||
#define _REG_CPSR 16
|
||||
|
||||
#define _REG_X0 0
|
||||
#define _REG_X1 1
|
||||
#define _REG_X2 2
|
||||
#define _REG_X3 3
|
||||
#define _REG_X4 4
|
||||
#define _REG_X5 5
|
||||
#define _REG_X6 6
|
||||
#define _REG_X7 7
|
||||
#define _REG_X8 8
|
||||
#define _REG_X9 9
|
||||
#define _REG_X10 10
|
||||
#define _REG_X11 11
|
||||
#define _REG_X12 12
|
||||
#define _REG_X13 13
|
||||
#define _REG_X14 14
|
||||
#define _REG_X15 15
|
||||
#define _REG_X16 16
|
||||
#define _REG_X17 17
|
||||
#define _REG_X18 18
|
||||
#define _REG_X19 19
|
||||
#define _REG_X20 20
|
||||
#define _REG_X21 21
|
||||
#define _REG_X22 22
|
||||
#define _REG_X23 23
|
||||
#define _REG_X24 24
|
||||
#define _REG_X25 25
|
||||
#define _REG_X26 26
|
||||
#define _REG_X27 27
|
||||
#define _REG_X28 28
|
||||
#define _REG_X29 29
|
||||
#define _REG_X30 30
|
||||
#define _REG_X31 31
|
||||
#define _REG_ELR 32
|
||||
#define _REG_SPSR 33
|
||||
#define _REG_TPIDR 34
|
||||
|
||||
/* Convenience synonyms */
|
||||
|
||||
#if defined(__aarch64__)
|
||||
#define _REG_RV _REG_X0
|
||||
#define _REG_FP _REG_X29
|
||||
#define _REG_LR _REG_X30
|
||||
#define _REG_SP _REG_X31
|
||||
#define _REG_PC _REG_ELR
|
||||
#elif defined(__arm__)
|
||||
#define _REG_RV _REG_R0
|
||||
#define _REG_FP _REG_R11
|
||||
#define _REG_SP _REG_R13
|
||||
#define _REG_LR _REG_R14
|
||||
#define _REG_PC _REG_R15
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Floating point register state
|
||||
*/
|
||||
#if defined(__aarch64__)
|
||||
|
||||
#define _NFREG 32 /* Number of SIMD registers */
|
||||
|
||||
typedef struct {
|
||||
union __freg {
|
||||
__uint8_t __b8[16];
|
||||
__uint16_t __h16[8];
|
||||
__uint32_t __s32[4];
|
||||
__uint64_t __d64[2];
|
||||
__uint128_t __q128[1];
|
||||
} __qregs[_NFREG] __aligned(16);
|
||||
__uint32_t __fpcr; /* FPCR */
|
||||
__uint32_t __fpsr; /* FPSR */
|
||||
} __fregset_t;
|
||||
|
||||
/* Compat structures */
|
||||
typedef struct {
|
||||
#if 1 /* __ARM_EABI__ is default on aarch64 */
|
||||
unsigned int __vfp_fpscr;
|
||||
uint64_t __vfp_fstmx[32];
|
||||
unsigned int __vfp_fpsid;
|
||||
#else
|
||||
unsigned int __vfp_fpscr;
|
||||
unsigned int __vfp_fstmx[33];
|
||||
unsigned int __vfp_fpsid;
|
||||
#endif
|
||||
} __vfpregset32_t;
|
||||
|
||||
typedef struct {
|
||||
__gregset32_t __gregs;
|
||||
__vfpregset32_t __vfpregs;
|
||||
__greg32_t _mc_tlsbase;
|
||||
__greg32_t _mc_user_tpid;
|
||||
} mcontext32_t;
|
||||
|
||||
typedef struct {
|
||||
__gregset_t __gregs; /* General Purpose Register set */
|
||||
__fregset_t __fregs; /* FPU/SIMD Register File */
|
||||
__greg_t __spare[8]; /* future proof */
|
||||
} mcontext_t;
|
||||
|
||||
#elif defined(__arm__)
|
||||
/* Note: the storage layout of this structure must be identical to ARMFPE! */
|
||||
typedef struct {
|
||||
unsigned int __fp_fpsr;
|
||||
struct {
|
||||
unsigned int __fp_exponent;
|
||||
unsigned int __fp_mantissa_hi;
|
||||
unsigned int __fp_mantissa_lo;
|
||||
} __fp_fr[8];
|
||||
} __fpregset_t;
|
||||
|
||||
typedef struct {
|
||||
#ifdef __ARM_EABI__
|
||||
unsigned int __vfp_fpscr;
|
||||
uint64_t __vfp_fstmx[32];
|
||||
unsigned int __vfp_fpsid;
|
||||
#else
|
||||
unsigned int __vfp_fpscr;
|
||||
unsigned int __vfp_fstmx[33];
|
||||
unsigned int __vfp_fpsid;
|
||||
#endif
|
||||
} __vfpregset_t;
|
||||
|
||||
typedef struct {
|
||||
__gregset_t __gregs;
|
||||
union {
|
||||
__fpregset_t __fpregs;
|
||||
__vfpregset_t __vfpregs;
|
||||
} __fpu;
|
||||
__greg_t _mc_tlsbase;
|
||||
__greg_t _mc_user_tpid;
|
||||
} mcontext_t, mcontext32_t;
|
||||
|
||||
|
||||
#define _UC_MACHINE_PAD 1 /* Padding appended to ucontext_t */
|
||||
|
||||
#ifdef __ARM_EABI__
|
||||
#define __UCONTEXT_SIZE (256 + 144)
|
||||
#else
|
||||
#define __UCONTEXT_SIZE 256
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || \
|
||||
defined(__LIBPTHREAD_SOURCE__)
|
||||
|
||||
#include <sys/tls.h>
|
||||
|
||||
#if defined(__aarch64__)
|
||||
|
||||
__BEGIN_DECLS
|
||||
static __inline void *
|
||||
__lwp_getprivate_fast(void)
|
||||
{
|
||||
void *__tpidr;
|
||||
__asm __volatile("mrs\t%0, tpidr_el0" : "=r"(__tpidr));
|
||||
return __tpidr;
|
||||
}
|
||||
__END_DECLS
|
||||
|
||||
#elif defined(__arm__)
|
||||
|
||||
__BEGIN_DECLS
|
||||
static __inline void *
|
||||
__lwp_getprivate_fast(void)
|
||||
{
|
||||
#if !defined(__thumb__) || defined(_ARM_ARCH_T2)
|
||||
extern void *_lwp_getprivate(void);
|
||||
void *rv;
|
||||
__asm("mrc p15, 0, %0, c13, c0, 3" : "=r"(rv));
|
||||
if (__predict_true(rv))
|
||||
return rv;
|
||||
/*
|
||||
* Some ARM cores are broken and don't raise an undefined fault when an
|
||||
* unrecogized mrc instruction is encountered, but just return zero.
|
||||
* To do deal with that, if we get a zero we (re-)fetch the value using
|
||||
* syscall.
|
||||
*/
|
||||
return _lwp_getprivate();
|
||||
#else
|
||||
extern void *__aeabi_read_tp(void);
|
||||
return __aeabi_read_tp();
|
||||
#endif /* !__thumb__ || _ARM_ARCH_T2 */
|
||||
}
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
#endif /* _RTLD_SOURCE || _LIBC_SOURCE || __LIBPTHREAD_SOURCE__ */
|
||||
|
||||
/* Machine-dependent uc_flags */
|
||||
#define _UC_TLSBASE 0x00080000 /* see <sys/ucontext.h> */
|
||||
|
||||
/* Machine-dependent uc_flags for arm */
|
||||
#define _UC_ARM_VFP 0x00010000 /* FPU field is VFP */
|
||||
|
||||
/* used by signal delivery to indicate status of signal stack */
|
||||
#define _UC_SETSTACK 0x00020000
|
||||
#define _UC_CLRSTACK 0x00040000
|
||||
|
||||
#define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_SP])
|
||||
#define _UC_MACHINE_FP(uc) ((uc)->uc_mcontext.__gregs[_REG_FP])
|
||||
#define _UC_MACHINE_PC(uc) ((uc)->uc_mcontext.__gregs[_REG_PC])
|
||||
#define _UC_MACHINE_INTRV(uc) ((uc)->uc_mcontext.__gregs[_REG_RV])
|
||||
|
||||
#define _UC_MACHINE_SET_PC(uc, pc) \
|
||||
_UC_MACHINE_PC(uc) = (pc)
|
||||
|
||||
#if defined(_KERNEL)
|
||||
__BEGIN_DECLS
|
||||
void vfp_getcontext(struct lwp *, mcontext_t *, int *);
|
||||
void vfp_setcontext(struct lwp *, const mcontext_t *);
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
#endif /* !_ARM_MCONTEXT_H_ */
|
||||
@ -1,93 +0,0 @@
|
||||
/* $NetBSD: mutex.h,v 1.27.4.1 2023/08/09 17:42:01 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Jason R. Thorpe and Andrew Doran.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_MUTEX_H_
|
||||
#define _ARM_MUTEX_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <machine/intr.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The ARM mutex implementation is troublesome, because pre-v6 ARM lacks a
|
||||
* compare-and-swap operation. However, there aren't any MP pre-v6 ARM
|
||||
* systems to speak of.
|
||||
*
|
||||
* ARMv6 and later, however, does have ldrex/strex, and can thus implement an
|
||||
* MP-safe compare-and-swap.
|
||||
*
|
||||
* So, what we have done is implement simple mutexes using a compare-and-swap.
|
||||
* We support pre-ARMv6 by implementing CAS as a restartable atomic sequence
|
||||
* that is checked by the IRQ vector.
|
||||
*
|
||||
*/
|
||||
|
||||
struct kmutex {
|
||||
union {
|
||||
/* Adaptive mutex */
|
||||
volatile uintptr_t mtxa_owner; /* 0-3 */
|
||||
|
||||
#ifdef _KERNEL
|
||||
/* Spin mutex */
|
||||
struct {
|
||||
/*
|
||||
* Since the low bit of mtxa_owner is used to flag this
|
||||
* mutex as a spin mutex, we can't use the first byte
|
||||
* or the last byte to store the ipl or lock values.
|
||||
*/
|
||||
volatile uint8_t mtxs_dummy;
|
||||
ipl_cookie_t mtxs_ipl;
|
||||
__cpu_simple_lock_t mtxs_lock;
|
||||
volatile uint8_t mtxs_unused;
|
||||
} s;
|
||||
#endif
|
||||
} u;
|
||||
};
|
||||
|
||||
#ifdef __MUTEX_PRIVATE
|
||||
|
||||
#define mtx_owner u.mtxa_owner
|
||||
#define mtx_ipl u.s.mtxs_ipl
|
||||
#define mtx_lock u.s.mtxs_lock
|
||||
|
||||
#if 0
|
||||
#define __HAVE_MUTEX_STUBS 1
|
||||
#define __HAVE_SPIN_MUTEX_STUBS 1
|
||||
#endif
|
||||
#define __HAVE_SIMPLE_MUTEXES 1
|
||||
|
||||
#endif /* __MUTEX_PRIVATE */
|
||||
|
||||
__CTASSERT(sizeof(struct kmutex) == sizeof(uintptr_t));
|
||||
|
||||
#endif /* _ARM_MUTEX_H_ */
|
||||
189
lib/libc/include/arm-netbsd-eabihf/machine/param.h
vendored
189
lib/libc/include/arm-netbsd-eabihf/machine/param.h
vendored
@ -1,189 +0,0 @@
|
||||
/* $NetBSD: param.h,v 1.24 2021/07/19 10:28:58 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994,1995 Mark Brinicombe.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the RiscBSD team.
|
||||
* 4. The name "RiscBSD" nor the name of the author may be used to
|
||||
* endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY RISCBSD ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL RISCBSD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_PARAM_H_
|
||||
#define _ARM_PARAM_H_
|
||||
|
||||
/*
|
||||
* Machine dependent constants for all ARM processors
|
||||
*/
|
||||
|
||||
/*
|
||||
* For KERNEL code:
|
||||
* MACHINE must be defined by the individual port. This is so that
|
||||
* uname returns the correct thing, etc.
|
||||
*
|
||||
* MACHINE_ARCH may be defined by individual ports as a temporary
|
||||
* measure while we're finishing the conversion to ELF.
|
||||
*
|
||||
* For non-KERNEL code:
|
||||
* If ELF, MACHINE and MACHINE_ARCH are forced to "arm/armeb".
|
||||
*/
|
||||
|
||||
#if defined(_KERNEL)
|
||||
# ifndef MACHINE_ARCH /* XXX For now */
|
||||
# ifndef __ARMEB__
|
||||
# ifdef __ARM_EABI__
|
||||
# define _MACHINE_ARCH earm
|
||||
# define MACHINE_ARCH "earm"
|
||||
# else
|
||||
# define _MACHINE_ARCH arm
|
||||
# define MACHINE_ARCH "arm"
|
||||
# endif
|
||||
# else
|
||||
# ifdef __ARM_EABI__
|
||||
# define _MACHINE_ARCH earmeb
|
||||
# define MACHINE_ARCH "earmeb"
|
||||
# else
|
||||
# define _MACHINE_ARCH armeb
|
||||
# define MACHINE_ARCH "armeb"
|
||||
# endif
|
||||
# endif /* __ARMEB__ */
|
||||
# endif /* MACHINE_ARCH */
|
||||
#else
|
||||
# undef _MACHINE
|
||||
# undef MACHINE
|
||||
# undef _MACHINE_ARCH
|
||||
# undef MACHINE_ARCH
|
||||
# define _MACHINE arm
|
||||
# define MACHINE "arm"
|
||||
# ifndef __ARMEB__
|
||||
# ifdef __ARM_EABI__
|
||||
# ifdef __ARM_PCS_VFP
|
||||
# ifdef _ARM_ARCH_7
|
||||
# define _MACHINE_ARCH earmv7hf
|
||||
# define MACHINE_ARCH "earmv7hf"
|
||||
# elif defined(_ARM_ARCH_6)
|
||||
# define _MACHINE_ARCH earmv6hf
|
||||
# define MACHINE_ARCH "earmv6hf"
|
||||
# else
|
||||
# define _MACHINE_ARCH earmhf
|
||||
# define MACHINE_ARCH "earmhf"
|
||||
# endif
|
||||
# else
|
||||
# ifdef _ARM_ARCH_7
|
||||
# define _MACHINE_ARCH earmv7
|
||||
# define MACHINE_ARCH "earmv7"
|
||||
# elif defined(_ARM_ARCH_6)
|
||||
# define _MACHINE_ARCH earmv6
|
||||
# define MACHINE_ARCH "earmv6"
|
||||
# elif !defined(_ARM_ARCH_5T)
|
||||
# define _MACHINE_ARCH earmv4
|
||||
# define MACHINE_ARCH "earmv4"
|
||||
# else
|
||||
# define _MACHINE_ARCH earm
|
||||
# define MACHINE_ARCH "earm"
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# define _MACHINE_ARCH arm
|
||||
# define MACHINE_ARCH "arm"
|
||||
# endif
|
||||
# else
|
||||
# ifdef __ARM_EABI__
|
||||
# ifdef __ARM_PCS_VFP
|
||||
# ifdef _ARM_ARCH_7
|
||||
# define _MACHINE_ARCH earmv7hfeb
|
||||
# define MACHINE_ARCH "earmv7hfeb"
|
||||
# elif defined(_ARM_ARCH_6)
|
||||
# define _MACHINE_ARCH earmv6hfeb
|
||||
# define MACHINE_ARCH "earmv6hfeb"
|
||||
# else
|
||||
# define _MACHINE_ARCH earmhfeb
|
||||
# define MACHINE_ARCH "earmhfeb"
|
||||
# endif
|
||||
# else
|
||||
# ifdef _ARM_ARCH_7
|
||||
# define _MACHINE_ARCH earmv7eb
|
||||
# define MACHINE_ARCH "earmv7eb"
|
||||
# elif defined(_ARM_ARCH_6)
|
||||
# define _MACHINE_ARCH earmv6eb
|
||||
# define MACHINE_ARCH "earmv6eb"
|
||||
# elif !defined(_ARM_ARCH_5T)
|
||||
# define _MACHINE_ARCH earmv4eb
|
||||
# define MACHINE_ARCH "earmv4eb"
|
||||
# else
|
||||
# define _MACHINE_ARCH earmeb
|
||||
# define MACHINE_ARCH "earmeb"
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# define _MACHINE_ARCH armeb
|
||||
# define MACHINE_ARCH "armeb"
|
||||
# endif
|
||||
# endif /* __ARMEB__ */
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
#define MAXCPUS 8
|
||||
|
||||
#define MID_MACHINE MID_ARM6
|
||||
|
||||
/* ARM-specific macro to align a stack pointer (downwards). */
|
||||
#define STACK_ALIGNBYTES (8 - 1)
|
||||
#ifdef __ARM_EABI__
|
||||
#define ALIGNBYTES32 3
|
||||
#else
|
||||
#define ALIGNBYTES32 7
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
*/
|
||||
#define MSIZE 256 /* size of an mbuf */
|
||||
|
||||
#ifndef MCLSHIFT
|
||||
#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
|
||||
/* 2K cluster can hold Ether frame */
|
||||
#endif /* MCLSHIFT */
|
||||
|
||||
#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
|
||||
|
||||
#ifndef NMBCLUSTERS_MAX
|
||||
#define NMBCLUSTERS_MAX (0x4000000 / MCLBYTES) /* Limit to 64MB for clusters */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compatibility /dev/zero mapping.
|
||||
*/
|
||||
#ifdef _KERNEL
|
||||
#ifdef COMPAT_16
|
||||
#define COMPAT_ZERODEV(x) (x == makedev(0, _DEV_ZERO_oARM))
|
||||
#endif
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _ARM_PARAM_H_ */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user