authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-11-04 16:41:23+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-11-04 16:41:23+02:00
log986b7ce5b27d5aa5fb2f31d70fd2cd863926bcba
treef6e3c52c3ef9b80466e4094a6913283d783b25ab
parentf5f1f8c66625237e4eceb3cd40597a687e9a58ac

rename i386-linux-gnu to x86-linux-gnu


74 files changed, 2635 insertions(+), 2635 deletions(-)

lib/libc/include/i386-linux-gnu/bits/a.out.h deleted-11
......@@ -1,11 +0,0 @@
1#ifndef __A_OUT_GNU_H__
2# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
3#endif
4
5#ifdef __x86_64__
6
7/* Signal to users of this header that this architecture really doesn't
8 support a.out binary format. */
9#define __NO_A_OUT_SUPPORT 1
10
11#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/endianness.h deleted-11
......@@ -1,11 +0,0 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* i386/x86_64 are little-endian. */
9#define __BYTE_ORDER __LITTLE_ENDIAN
10
11#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/environments.h deleted-105
......@@ -1,105 +0,0 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _UNISTD_H
19# error "Never include this file directly. Use <unistd.h> instead"
20#endif
21
22#include <bits/wordsize.h>
23
24/* This header should define the following symbols under the described
25 situations. A value `1' means that the model is always supported,
26 `-1' means it is never supported. Undefined means it cannot be
27 statically decided.
28
29 _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type
30 _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type
31
32 _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type
33 _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type
34
35 The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
36 _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
37 _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
38 used in previous versions of the Unix standard and are available
39 only for compatibility.
40*/
41
42#if __WORDSIZE == 64
43
44/* Environments with 32-bit wide pointers are optionally provided.
45 Therefore following macros aren't defined:
46 # undef _POSIX_V7_ILP32_OFF32
47 # undef _POSIX_V7_ILP32_OFFBIG
48 # undef _POSIX_V6_ILP32_OFF32
49 # undef _POSIX_V6_ILP32_OFFBIG
50 # undef _XBS5_ILP32_OFF32
51 # undef _XBS5_ILP32_OFFBIG
52 and users need to check at runtime. */
53
54/* We also have no use (for now) for an environment with bigger pointers
55 and offsets. */
56# define _POSIX_V7_LPBIG_OFFBIG -1
57# define _POSIX_V6_LPBIG_OFFBIG -1
58# define _XBS5_LPBIG_OFFBIG -1
59
60/* By default we have 64-bit wide `long int', pointers and `off_t'. */
61# define _POSIX_V7_LP64_OFF64 1
62# define _POSIX_V6_LP64_OFF64 1
63# define _XBS5_LP64_OFF64 1
64
65#else /* __WORDSIZE == 32 */
66
67/* We have 32-bit wide `int', `long int' and pointers and all platforms
68 support LFS. -mx32 has 64-bit wide `off_t'. */
69# define _POSIX_V7_ILP32_OFFBIG 1
70# define _POSIX_V6_ILP32_OFFBIG 1
71# define _XBS5_ILP32_OFFBIG 1
72
73# ifndef __x86_64__
74/* -m32 has 32-bit wide `off_t'. */
75# define _POSIX_V7_ILP32_OFF32 1
76# define _POSIX_V6_ILP32_OFF32 1
77# define _XBS5_ILP32_OFF32 1
78# endif
79
80/* We optionally provide an environment with the above size but an 64-bit
81 side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */
82
83/* Environments with 64-bit wide pointers can be provided,
84 so these macros aren't defined:
85 # undef _POSIX_V7_LP64_OFF64
86 # undef _POSIX_V7_LPBIG_OFFBIG
87 # undef _POSIX_V6_LP64_OFF64
88 # undef _POSIX_V6_LPBIG_OFFBIG
89 # undef _XBS5_LP64_OFF64
90 # undef _XBS5_LPBIG_OFFBIG
91 and sysconf tests for it at runtime. */
92
93#endif /* __WORDSIZE == 32 */
94
95#define __ILP32_OFF32_CFLAGS "-m32"
96#define __ILP32_OFF32_LDFLAGS "-m32"
97#if defined __x86_64__ && defined __ILP32__
98# define __ILP32_OFFBIG_CFLAGS "-mx32"
99# define __ILP32_OFFBIG_LDFLAGS "-mx32"
100#else
101# define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
102# define __ILP32_OFFBIG_LDFLAGS "-m32"
103#endif
104#define __LP64_OFF64_CFLAGS "-m64"
105#define __LP64_OFF64_LDFLAGS "-m64"
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/epoll.h deleted-29
......@@ -1,29 +0,0 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_EPOLL_H
19# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
20#endif
21
22/* Flags to be passed to epoll_create1. */
23enum
24 {
25 EPOLL_CLOEXEC = 02000000
26#define EPOLL_CLOEXEC EPOLL_CLOEXEC
27 };
28
29#define __EPOLL_PACKED __attribute__ ((__packed__))
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/fcntl.h deleted-61
......@@ -1,61 +0,0 @@
1/* O_*, F_*, FD_* bit values for Linux/x86.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _FCNTL_H
20# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
21#endif
22
23#ifdef __x86_64__
24# define __O_LARGEFILE 0
25#endif
26
27#ifdef __x86_64__
28/* Not necessary, we always have 64-bit offsets. */
29# define F_GETLK64 5 /* Get record locking info. */
30# define F_SETLK64 6 /* Set record locking info (non-blocking). */
31# define F_SETLKW64 7 /* Set record locking info (blocking). */
32#endif
33
34
35struct flock
36 {
37 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
38 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
39#ifndef __USE_FILE_OFFSET64
40 __off_t l_start; /* Offset where the lock begins. */
41 __off_t l_len; /* Size of the locked area; zero means until EOF. */
42#else
43 __off64_t l_start; /* Offset where the lock begins. */
44 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
45#endif
46 __pid_t l_pid; /* Process holding the lock. */
47 };
48
49#ifdef __USE_LARGEFILE64
50struct flock64
51 {
52 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
53 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
54 __off64_t l_start; /* Offset where the lock begins. */
55 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
56 __pid_t l_pid; /* Process holding the lock. */
57 };
58#endif
59
60/* Include generic Linux declarations. */
61#include <bits/fcntl-linux.h>
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/fenv.h deleted-116
......@@ -1,116 +0,0 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _FENV_H
19# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
20#endif
21
22/* Define bits representing the exception. We use the bit positions
23 of the appropriate bits in the FPU control word. */
24enum
25 {
26 FE_INVALID =
27#define FE_INVALID 0x01
28 FE_INVALID,
29 __FE_DENORM = 0x02,
30 FE_DIVBYZERO =
31#define FE_DIVBYZERO 0x04
32 FE_DIVBYZERO,
33 FE_OVERFLOW =
34#define FE_OVERFLOW 0x08
35 FE_OVERFLOW,
36 FE_UNDERFLOW =
37#define FE_UNDERFLOW 0x10
38 FE_UNDERFLOW,
39 FE_INEXACT =
40#define FE_INEXACT 0x20
41 FE_INEXACT
42 };
43
44#define FE_ALL_EXCEPT \
45 (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
46
47/* The ix87 FPU supports all of the four defined rounding modes. We
48 use again the bit positions in the FPU control word as the values
49 for the appropriate macros. */
50enum
51 {
52 FE_TONEAREST =
53#define FE_TONEAREST 0
54 FE_TONEAREST,
55 FE_DOWNWARD =
56#define FE_DOWNWARD 0x400
57 FE_DOWNWARD,
58 FE_UPWARD =
59#define FE_UPWARD 0x800
60 FE_UPWARD,
61 FE_TOWARDZERO =
62#define FE_TOWARDZERO 0xc00
63 FE_TOWARDZERO
64 };
65
66
67/* Type representing exception flags. */
68typedef unsigned short int fexcept_t;
69
70
71/* Type representing floating-point environment. This structure
72 corresponds to the layout of the block written by the `fstenv'
73 instruction and has additional fields for the contents of the MXCSR
74 register as written by the `stmxcsr' instruction. */
75typedef struct
76 {
77 unsigned short int __control_word;
78 unsigned short int __glibc_reserved1;
79 unsigned short int __status_word;
80 unsigned short int __glibc_reserved2;
81 unsigned short int __tags;
82 unsigned short int __glibc_reserved3;
83 unsigned int __eip;
84 unsigned short int __cs_selector;
85 unsigned int __opcode:11;
86 unsigned int __glibc_reserved4:5;
87 unsigned int __data_offset;
88 unsigned short int __data_selector;
89 unsigned short int __glibc_reserved5;
90#ifdef __x86_64__
91 unsigned int __mxcsr;
92#endif
93 }
94fenv_t;
95
96/* If the default argument is used we use this value. */
97#define FE_DFL_ENV ((const fenv_t *) -1)
98
99#ifdef __USE_GNU
100/* Floating-point environment where none of the exception is masked. */
101# define FE_NOMASK_ENV ((const fenv_t *) -2)
102#endif
103
104#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
105/* Type representing floating-point control modes. */
106typedef struct
107 {
108 unsigned short int __control_word;
109 unsigned short int __glibc_reserved;
110 unsigned int __mxcsr;
111 }
112femode_t;
113
114/* Default floating-point control modes. */
115# define FE_DFL_MODE ((const femode_t *) -1L)
116#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/floatn.h deleted-121
......@@ -1,121 +0,0 @@
1/* Macros to control TS 18661-3 glibc features on x86.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23
24/* Defined to 1 if the current compiler invocation provides a
25 floating-point type with the IEEE 754 binary128 format, and this
26 glibc includes corresponding *f128 interfaces for it. The required
27 libgcc support was added some time after the basic compiler
28 support, for x86_64 and x86. */
29#if (defined __x86_64__ \
30 ? __GNUC_PREREQ (4, 3) \
31 : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4)))
32# define __HAVE_FLOAT128 1
33#else
34# define __HAVE_FLOAT128 0
35#endif
36
37/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
38 from the default float, double and long double types in this glibc. */
39#if __HAVE_FLOAT128
40# define __HAVE_DISTINCT_FLOAT128 1
41#else
42# define __HAVE_DISTINCT_FLOAT128 0
43#endif
44
45/* Defined to 1 if the current compiler invocation provides a
46 floating-point type with the right format for _Float64x, and this
47 glibc includes corresponding *f64x interfaces for it. */
48#define __HAVE_FLOAT64X 1
49
50/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
51 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
52 the format of _Float128, which must be different from that of long
53 double. */
54#define __HAVE_FLOAT64X_LONG_DOUBLE 1
55
56#ifndef __ASSEMBLER__
57
58/* Defined to concatenate the literal suffix to be used with _Float128
59 types, if __HAVE_FLOAT128 is 1. */
60# if __HAVE_FLOAT128
61# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
62/* The literal suffix f128 exists only since GCC 7.0. */
63# define __f128(x) x##q
64# else
65# define __f128(x) x##f128
66# endif
67# endif
68
69/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
70# if __HAVE_FLOAT128
71# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
72/* Add a typedef for older GCC compilers which don't natively support
73 _Complex _Float128. */
74typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
75# define __CFLOAT128 __cfloat128
76# else
77# define __CFLOAT128 _Complex _Float128
78# endif
79# endif
80
81/* The remaining of this file provides support for older compilers. */
82# if __HAVE_FLOAT128
83
84/* The type _Float128 exists only since GCC 7.0. */
85# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
86typedef __float128 _Float128;
87# endif
88
89/* __builtin_huge_valf128 doesn't exist before GCC 7.0. */
90# if !__GNUC_PREREQ (7, 0)
91# define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ())
92# endif
93
94/* Older GCC has only a subset of built-in functions for _Float128 on
95 x86, and __builtin_infq is not usable in static initializers.
96 Converting a narrower sNaN to _Float128 produces a quiet NaN, so
97 attempts to use _Float128 sNaNs will not work properly with older
98 compilers. */
99# if !__GNUC_PREREQ (7, 0)
100# define __builtin_copysignf128 __builtin_copysignq
101# define __builtin_fabsf128 __builtin_fabsq
102# define __builtin_inff128() ((_Float128) __builtin_inf ())
103# define __builtin_nanf128(x) ((_Float128) __builtin_nan (x))
104# define __builtin_nansf128(x) ((_Float128) __builtin_nans (x))
105# endif
106
107/* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*,
108 e.g.: __builtin_signbitf128, before GCC 6. However, there has never
109 been a __builtin_signbitf128 in GCC and the type-generic builtin is
110 only available since GCC 6. */
111# if !__GNUC_PREREQ (6, 0)
112# define __builtin_signbitf128 __signbitf128
113# endif
114
115# endif
116
117#endif /* !__ASSEMBLER__. */
118
119#include <bits/floatn-common.h>
120
121#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/flt-eval-method.h deleted-33
......@@ -1,33 +0,0 @@
1/* Define __GLIBC_FLT_EVAL_METHOD. x86 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _MATH_H
20# error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead."
21#endif
22
23#ifdef __FLT_EVAL_METHOD__
24# if __FLT_EVAL_METHOD__ == -1
25# define __GLIBC_FLT_EVAL_METHOD 2
26# else
27# define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__
28# endif
29#elif defined __x86_64__
30# define __GLIBC_FLT_EVAL_METHOD 0
31#else
32# define __GLIBC_FLT_EVAL_METHOD 2
33#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/fp-logb.h deleted-24
......@@ -1,24 +0,0 @@
1/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _MATH_H
20# error "Never use <bits/fp-logb.h> directly; include <math.h> instead."
21#endif
22
23#define __FP_LOGB0_IS_MIN 1
24#define __FP_LOGBNAN_IS_MIN 1
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/indirect-return.h deleted-37
......@@ -1,37 +0,0 @@
1/* Definition of __INDIRECT_RETURN. x86 version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _UCONTEXT_H
20# error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead."
21#endif
22
23/* On x86, swapcontext returns via indirect branch when the shadow stack
24 is enabled. Define __INDIRECT_RETURN to indicate whether swapcontext
25 returns via indirect branch. */
26#if defined __CET__ && (__CET__ & 2) != 0
27# if __glibc_has_attribute (__indirect_return__)
28# define __INDIRECT_RETURN __attribute__ ((__indirect_return__))
29# else
30/* Newer compilers provide the indirect_return attribute, but without
31 it we can use returns_twice to affect the optimizer in the same
32 way and avoid unsafe optimizations. */
33# define __INDIRECT_RETURN __attribute__ ((__returns_twice__))
34# endif
35#else
36# define __INDIRECT_RETURN
37#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/ipctypes.h deleted-33
......@@ -1,33 +0,0 @@
1/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_IPC_H
20# error "Never use <bits/ipctypes.h> directly; include <sys/ipc.h> instead."
21#endif
22
23#ifndef _BITS_IPCTYPES_H
24#define _BITS_IPCTYPES_H 1
25
26/* Used in `struct shmid_ds'. */
27# ifdef __x86_64__
28typedef int __ipc_pid_t;
29# else
30typedef unsigned short int __ipc_pid_t;
31# endif
32
33#endif /* bits/ipctypes.h */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/iscanonical.h deleted-54
......@@ -1,54 +0,0 @@
1/* Define iscanonical macro. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _MATH_H
20# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
21#endif
22
23extern int __iscanonicall (long double __x)
24 __THROW __attribute__ ((__const__));
25#define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
26#define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
27#if __HAVE_DISTINCT_FLOAT128
28# define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1)
29#endif
30
31/* Return nonzero value if X is canonical. In IEEE interchange binary
32 formats, all values are canonical, but the argument must still be
33 converted to its semantic type for any exceptions arising from the
34 conversion, before being discarded; in extended precision, there
35 are encodings that are not consistently handled as corresponding to
36 any particular value of the type, and we return 0 for those. */
37#ifndef __cplusplus
38# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
39#else
40/* In C++ mode, __MATH_TG cannot be used, because it relies on
41 __builtin_types_compatible_p, which is a C-only builtin. On the
42 other hand, overloading provides the means to distinguish between
43 the floating-point types. The overloading resolution will match
44 the correct parameter (regardless of type qualifiers (i.e.: const
45 and volatile)). */
46extern "C++" {
47inline int iscanonical (float __val) { return __iscanonicalf (__val); }
48inline int iscanonical (double __val) { return __iscanonical (__val); }
49inline int iscanonical (long double __val) { return __iscanonicall (__val); }
50# if __HAVE_DISTINCT_FLOAT128
51inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); }
52# endif
53}
54#endif /* __cplusplus */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/link.h deleted-159
......@@ -1,159 +0,0 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _LINK_H
19# error "Never include <bits/link.h> directly; use <link.h> instead."
20#endif
21
22
23#ifndef __x86_64__
24/* Registers for entry into PLT on IA-32. */
25typedef struct La_i86_regs
26{
27 uint32_t lr_edx;
28 uint32_t lr_ecx;
29 uint32_t lr_eax;
30 uint32_t lr_ebp;
31 uint32_t lr_esp;
32} La_i86_regs;
33
34/* Return values for calls from PLT on IA-32. */
35typedef struct La_i86_retval
36{
37 uint32_t lrv_eax;
38 uint32_t lrv_edx;
39 long double lrv_st0;
40 long double lrv_st1;
41 uint64_t lrv_bnd0;
42 uint64_t lrv_bnd1;
43} La_i86_retval;
44
45
46__BEGIN_DECLS
47
48extern Elf32_Addr la_i86_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
49 uintptr_t *__refcook,
50 uintptr_t *__defcook,
51 La_i86_regs *__regs,
52 unsigned int *__flags,
53 const char *__symname,
54 long int *__framesizep);
55extern unsigned int la_i86_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
56 uintptr_t *__refcook,
57 uintptr_t *__defcook,
58 const La_i86_regs *__inregs,
59 La_i86_retval *__outregs,
60 const char *symname);
61
62__END_DECLS
63
64#else
65
66/* Registers for entry into PLT on x86-64. */
67# if __GNUC_PREREQ (4,0)
68typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16)));
69typedef float La_x86_64_ymm
70 __attribute__ ((__vector_size__ (32), __aligned__ (16)));
71typedef double La_x86_64_zmm
72 __attribute__ ((__vector_size__ (64), __aligned__ (16)));
73# else
74typedef float La_x86_64_xmm __attribute__ ((__mode__ (__V4SF__)));
75# endif
76
77typedef union
78{
79# if __GNUC_PREREQ (4,0)
80 La_x86_64_ymm ymm[2];
81 La_x86_64_zmm zmm[1];
82# endif
83 La_x86_64_xmm xmm[4];
84} La_x86_64_vector __attribute__ ((__aligned__ (16)));
85
86typedef struct La_x86_64_regs
87{
88 uint64_t lr_rdx;
89 uint64_t lr_r8;
90 uint64_t lr_r9;
91 uint64_t lr_rcx;
92 uint64_t lr_rsi;
93 uint64_t lr_rdi;
94 uint64_t lr_rbp;
95 uint64_t lr_rsp;
96 La_x86_64_xmm lr_xmm[8];
97 La_x86_64_vector lr_vector[8];
98#ifndef __ILP32__
99 __int128_t lr_bnd[4];
100#endif
101} La_x86_64_regs;
102
103/* Return values for calls from PLT on x86-64. */
104typedef struct La_x86_64_retval
105{
106 uint64_t lrv_rax;
107 uint64_t lrv_rdx;
108 La_x86_64_xmm lrv_xmm0;
109 La_x86_64_xmm lrv_xmm1;
110 long double lrv_st0;
111 long double lrv_st1;
112 La_x86_64_vector lrv_vector0;
113 La_x86_64_vector lrv_vector1;
114#ifndef __ILP32__
115 __int128_t lrv_bnd0;
116 __int128_t lrv_bnd1;
117#endif
118} La_x86_64_retval;
119
120#define La_x32_regs La_x86_64_regs
121#define La_x32_retval La_x86_64_retval
122
123__BEGIN_DECLS
124
125extern Elf64_Addr la_x86_64_gnu_pltenter (Elf64_Sym *__sym,
126 unsigned int __ndx,
127 uintptr_t *__refcook,
128 uintptr_t *__defcook,
129 La_x86_64_regs *__regs,
130 unsigned int *__flags,
131 const char *__symname,
132 long int *__framesizep);
133extern unsigned int la_x86_64_gnu_pltexit (Elf64_Sym *__sym,
134 unsigned int __ndx,
135 uintptr_t *__refcook,
136 uintptr_t *__defcook,
137 const La_x86_64_regs *__inregs,
138 La_x86_64_retval *__outregs,
139 const char *__symname);
140
141extern Elf32_Addr la_x32_gnu_pltenter (Elf32_Sym *__sym,
142 unsigned int __ndx,
143 uintptr_t *__refcook,
144 uintptr_t *__defcook,
145 La_x32_regs *__regs,
146 unsigned int *__flags,
147 const char *__symname,
148 long int *__framesizep);
149extern unsigned int la_x32_gnu_pltexit (Elf32_Sym *__sym,
150 unsigned int __ndx,
151 uintptr_t *__refcook,
152 uintptr_t *__defcook,
153 const La_x32_regs *__inregs,
154 La_x32_retval *__outregs,
155 const char *__symname);
156
157__END_DECLS
158
159#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/long-double.h deleted-21
......@@ -1,21 +0,0 @@
1/* Properties of long double type. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19/* long double is distinct from double, so there is nothing to
20 define here. */
21#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/math-vector.h deleted-63
......@@ -1,63 +0,0 @@
1/* Platform-specific SIMD declarations of math functions.
2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _MATH_H
20# error "Never include <bits/math-vector.h> directly;\
21 include <math.h> instead."
22#endif
23
24/* Get default empty definitions for simd declarations. */
25#include <bits/libm-simd-decl-stubs.h>
26
27#if defined __x86_64__ && defined __FAST_MATH__
28# if defined _OPENMP && _OPENMP >= 201307
29/* OpenMP case. */
30# define __DECL_SIMD_x86_64 _Pragma ("omp declare simd notinbranch")
31# elif __GNUC_PREREQ (6,0)
32/* W/o OpenMP use GCC 6.* __attribute__ ((__simd__)). */
33# define __DECL_SIMD_x86_64 __attribute__ ((__simd__ ("notinbranch")))
34# endif
35
36# ifdef __DECL_SIMD_x86_64
37# undef __DECL_SIMD_cos
38# define __DECL_SIMD_cos __DECL_SIMD_x86_64
39# undef __DECL_SIMD_cosf
40# define __DECL_SIMD_cosf __DECL_SIMD_x86_64
41# undef __DECL_SIMD_sin
42# define __DECL_SIMD_sin __DECL_SIMD_x86_64
43# undef __DECL_SIMD_sinf
44# define __DECL_SIMD_sinf __DECL_SIMD_x86_64
45# undef __DECL_SIMD_sincos
46# define __DECL_SIMD_sincos __DECL_SIMD_x86_64
47# undef __DECL_SIMD_sincosf
48# define __DECL_SIMD_sincosf __DECL_SIMD_x86_64
49# undef __DECL_SIMD_log
50# define __DECL_SIMD_log __DECL_SIMD_x86_64
51# undef __DECL_SIMD_logf
52# define __DECL_SIMD_logf __DECL_SIMD_x86_64
53# undef __DECL_SIMD_exp
54# define __DECL_SIMD_exp __DECL_SIMD_x86_64
55# undef __DECL_SIMD_expf
56# define __DECL_SIMD_expf __DECL_SIMD_x86_64
57# undef __DECL_SIMD_pow
58# define __DECL_SIMD_pow __DECL_SIMD_x86_64
59# undef __DECL_SIMD_powf
60# define __DECL_SIMD_powf __DECL_SIMD_x86_64
61
62# endif
63#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/mman.h deleted-34
......@@ -1,34 +0,0 @@
1/* Definitions for POSIX memory map interface. Linux/x86_64 version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_MMAN_H
20# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
21#endif
22
23/* The following definitions basically come from the kernel headers.
24 But the kernel header is not namespace clean. */
25
26/* Other flags. */
27#ifdef __USE_MISC
28# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */
29#endif
30
31#include <bits/mman-map-flags-generic.h>
32
33/* Include generic Linux declarations. */
34#include <bits/mman-linux.h>
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/procfs-id.h deleted-30
......@@ -1,30 +0,0 @@
1/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <https://www.gnu.org/licenses/>. */
19
20#ifndef _SYS_PROCFS_H
21# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
22#endif
23
24#if __WORDSIZE == 32
25typedef unsigned short int __pr_uid_t;
26typedef unsigned short int __pr_gid_t;
27#else
28typedef unsigned int __pr_uid_t;
29typedef unsigned int __pr_gid_t;
30#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/procfs.h deleted-50
......@@ -1,50 +0,0 @@
1/* Types for registers for sys/procfs.h. x86 version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_PROCFS_H
20# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
21#endif
22
23/* Type for a general-purpose register. */
24#ifdef __x86_64__
25__extension__ typedef unsigned long long elf_greg_t;
26#else
27typedef unsigned long elf_greg_t;
28#endif
29
30/* And the whole bunch of them. We could have used `struct
31 user_regs_struct' directly in the typedef, but tradition says that
32 the register set is an array, which does have some peculiar
33 semantics, so leave it that way. */
34#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
35typedef elf_greg_t elf_gregset_t[ELF_NGREG];
36
37#ifndef __x86_64__
38/* Register set for the floating-point registers. */
39typedef struct user_fpregs_struct elf_fpregset_t;
40
41/* Register set for the extended floating-point registers. Includes
42 the Pentium III SSE registers in addition to the classic
43 floating-point stuff. */
44typedef struct user_fpxregs_struct elf_fpxregset_t;
45#else
46/* Register set for the extended floating-point registers. Includes
47 the Pentium III SSE registers in addition to the classic
48 floating-point stuff. */
49typedef struct user_fpregs_struct elf_fpregset_t;
50#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/pthreadtypes-arch.h deleted-55
......@@ -1,55 +0,0 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _BITS_PTHREADTYPES_ARCH_H
19#define _BITS_PTHREADTYPES_ARCH_H 1
20
21#include <bits/wordsize.h>
22
23#ifdef __x86_64__
24# if __WORDSIZE == 64
25# define __SIZEOF_PTHREAD_MUTEX_T 40
26# define __SIZEOF_PTHREAD_ATTR_T 56
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29# else
30# define __SIZEOF_PTHREAD_MUTEX_T 32
31# define __SIZEOF_PTHREAD_ATTR_T 32
32# define __SIZEOF_PTHREAD_RWLOCK_T 44
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34# endif
35#else
36# define __SIZEOF_PTHREAD_MUTEX_T 24
37# define __SIZEOF_PTHREAD_ATTR_T 36
38# define __SIZEOF_PTHREAD_RWLOCK_T 32
39# define __SIZEOF_PTHREAD_BARRIER_T 20
40#endif
41#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
42#define __SIZEOF_PTHREAD_COND_T 48
43#define __SIZEOF_PTHREAD_CONDATTR_T 4
44#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
45#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
46
47#define __LOCK_ALIGNMENT
48#define __ONCE_ALIGNMENT
49
50#ifndef __x86_64__
51/* Extra attributes for the cleanup functions. */
52# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
53#endif
54
55#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/setjmp.h deleted-40
......@@ -1,40 +0,0 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18/* Define the machine-dependent type `jmp_buf'. x86-64 version. */
19#ifndef _BITS_SETJMP_H
20#define _BITS_SETJMP_H 1
21
22#if !defined _SETJMP_H && !defined _PTHREAD_H
23# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
24#endif
25
26#include <bits/wordsize.h>
27
28#ifndef _ASM
29
30# if __WORDSIZE == 64
31typedef long int __jmp_buf[8];
32# elif defined __x86_64__
33__extension__ typedef long long int __jmp_buf[8];
34# else
35typedef int __jmp_buf[6];
36# endif
37
38#endif
39
40#endif /* bits/setjmp.h */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/sigcontext.h deleted-196
......@@ -1,196 +0,0 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _BITS_SIGCONTEXT_H
19#define _BITS_SIGCONTEXT_H 1
20
21#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
22# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
23#endif
24
25#include <bits/types.h>
26
27#define FP_XSTATE_MAGIC1 0x46505853U
28#define FP_XSTATE_MAGIC2 0x46505845U
29#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2)
30
31struct _fpx_sw_bytes
32{
33 __uint32_t magic1;
34 __uint32_t extended_size;
35 __uint64_t xstate_bv;
36 __uint32_t xstate_size;
37 __uint32_t __glibc_reserved1[7];
38};
39
40struct _fpreg
41{
42 unsigned short significand[4];
43 unsigned short exponent;
44};
45
46struct _fpxreg
47{
48 unsigned short significand[4];
49 unsigned short exponent;
50 unsigned short __glibc_reserved1[3];
51};
52
53struct _xmmreg
54{
55 __uint32_t element[4];
56};
57
58
59
60#ifndef __x86_64__
61
62struct _fpstate
63{
64 /* Regular FPU environment. */
65 __uint32_t cw;
66 __uint32_t sw;
67 __uint32_t tag;
68 __uint32_t ipoff;
69 __uint32_t cssel;
70 __uint32_t dataoff;
71 __uint32_t datasel;
72 struct _fpreg _st[8];
73 unsigned short status;
74 unsigned short magic;
75
76 /* FXSR FPU environment. */
77 __uint32_t _fxsr_env[6];
78 __uint32_t mxcsr;
79 __uint32_t __glibc_reserved1;
80 struct _fpxreg _fxsr_st[8];
81 struct _xmmreg _xmm[8];
82 __uint32_t __glibc_reserved2[56];
83};
84
85#ifndef sigcontext_struct
86/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
87 we need sigcontext. Some packages have come to rely on
88 sigcontext_struct being defined on 32-bit x86, so define this for
89 their benefit. */
90# define sigcontext_struct sigcontext
91#endif
92
93#define X86_FXSR_MAGIC 0x0000
94
95struct sigcontext
96{
97 unsigned short gs, __gsh;
98 unsigned short fs, __fsh;
99 unsigned short es, __esh;
100 unsigned short ds, __dsh;
101 unsigned long edi;
102 unsigned long esi;
103 unsigned long ebp;
104 unsigned long esp;
105 unsigned long ebx;
106 unsigned long edx;
107 unsigned long ecx;
108 unsigned long eax;
109 unsigned long trapno;
110 unsigned long err;
111 unsigned long eip;
112 unsigned short cs, __csh;
113 unsigned long eflags;
114 unsigned long esp_at_signal;
115 unsigned short ss, __ssh;
116 struct _fpstate * fpstate;
117 unsigned long oldmask;
118 unsigned long cr2;
119};
120
121#else /* __x86_64__ */
122
123struct _fpstate
124{
125 /* FPU environment matching the 64-bit FXSAVE layout. */
126 __uint16_t cwd;
127 __uint16_t swd;
128 __uint16_t ftw;
129 __uint16_t fop;
130 __uint64_t rip;
131 __uint64_t rdp;
132 __uint32_t mxcsr;
133 __uint32_t mxcr_mask;
134 struct _fpxreg _st[8];
135 struct _xmmreg _xmm[16];
136 __uint32_t __glibc_reserved1[24];
137};
138
139struct sigcontext
140{
141 __uint64_t r8;
142 __uint64_t r9;
143 __uint64_t r10;
144 __uint64_t r11;
145 __uint64_t r12;
146 __uint64_t r13;
147 __uint64_t r14;
148 __uint64_t r15;
149 __uint64_t rdi;
150 __uint64_t rsi;
151 __uint64_t rbp;
152 __uint64_t rbx;
153 __uint64_t rdx;
154 __uint64_t rax;
155 __uint64_t rcx;
156 __uint64_t rsp;
157 __uint64_t rip;
158 __uint64_t eflags;
159 unsigned short cs;
160 unsigned short gs;
161 unsigned short fs;
162 unsigned short __pad0;
163 __uint64_t err;
164 __uint64_t trapno;
165 __uint64_t oldmask;
166 __uint64_t cr2;
167 __extension__ union
168 {
169 struct _fpstate * fpstate;
170 __uint64_t __fpstate_word;
171 };
172 __uint64_t __reserved1 [8];
173};
174
175#endif /* __x86_64__ */
176
177struct _xsave_hdr
178{
179 __uint64_t xstate_bv;
180 __uint64_t __glibc_reserved1[2];
181 __uint64_t __glibc_reserved2[5];
182};
183
184struct _ymmh_state
185{
186 __uint32_t ymmh_space[64];
187};
188
189struct _xstate
190{
191 struct _fpstate fpstate;
192 struct _xsave_hdr xstate_hdr;
193 struct _ymmh_state ymmh;
194};
195
196#endif /* _BITS_SIGCONTEXT_H */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/siginfo-arch.h deleted-17
......@@ -1,17 +0,0 @@
1/* Architecture-specific adjustments to siginfo_t. x86 version. */
2#ifndef _BITS_SIGINFO_ARCH_H
3#define _BITS_SIGINFO_ARCH_H 1
4
5#if defined __x86_64__ && __WORDSIZE == 32
6/* si_utime and si_stime must be 4 byte aligned for x32 to match the
7 kernel. We align siginfo_t to 8 bytes so that si_utime and
8 si_stime are actually aligned to 8 bytes since their offsets are
9 multiple of 8 bytes. Note: with some compilers, the alignment
10 attribute would be ignored if it were put in __SI_CLOCK_T instead
11 of encapsulated in a typedef. */
12typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t;
13# define __SI_ALIGNMENT __attribute__ ((__aligned__ (8)))
14# define __SI_CLOCK_T __sigchld_clock_t
15#endif
16
17#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/struct_mutex.h deleted-63
......@@ -1,63 +0,0 @@
1/* x86 internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#ifdef __x86_64__
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#ifdef __x86_64__
34 short __spins;
35 short __elision;
36 __pthread_list_t __list;
37# define __PTHREAD_MUTEX_HAVE_PREV 1
38#else
39 unsigned int __nusers;
40 __extension__ union
41 {
42 struct
43 {
44 short __espins;
45 short __eelision;
46# define __spins __elision_data.__espins
47# define __elision __elision_data.__eelision
48 } __elision_data;
49 __pthread_slist_t __list;
50 };
51# define __PTHREAD_MUTEX_HAVE_PREV 0
52#endif
53};
54
55#ifdef __x86_64__
56# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
57 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
58#else
59# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
60 0, 0, 0, __kind, 0, { { 0, 0 } }
61#endif
62
63#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/struct_rwlock.h deleted-65
......@@ -1,65 +0,0 @@
1/* x86 internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#ifdef __x86_64__
32 int __cur_writer;
33 int __shared;
34 signed char __rwelision;
35# ifdef __ILP32__
36 unsigned char __pad1[3];
37# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
38# else
39 unsigned char __pad1[7];
40# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
41# endif
42 unsigned long int __pad2;
43 /* FLAGS must stay at this position in the structure to maintain
44 binary compatibility. */
45 unsigned int __flags;
46#else /* __x86_64__ */
47 /* FLAGS must stay at this position in the structure to maintain
48 binary compatibility. */
49 unsigned char __flags;
50 unsigned char __shared;
51 signed char __rwelision;
52 unsigned char __pad2;
53 int __cur_writer;
54#endif
55};
56
57#ifdef __x86_64__
58# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
59 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
60#else
61# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
62 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
63#endif
64
65#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/struct_stat.h deleted-165
......@@ -1,165 +0,0 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
18
19#if !defined _SYS_STAT_H && !defined _FCNTL_H
20# error "Never include <bits/struct_stat.h> directly; use <sys/stat.h> instead."
21#endif
22
23#ifndef _BITS_STRUCT_STAT_H
24#define _BITS_STRUCT_STAT_H 1
25
26struct stat
27 {
28#ifdef __USE_TIME_BITS64
29# include <bits/struct_stat_time64_helper.h>
30#else
31 __dev_t st_dev; /* Device. */
32# ifndef __x86_64__
33 unsigned short int __pad1;
34# endif
35# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
36 __ino_t st_ino; /* File serial number. */
37# else
38 __ino_t __st_ino; /* 32bit file serial number. */
39# endif
40# ifndef __x86_64__
41 __mode_t st_mode; /* File mode. */
42 __nlink_t st_nlink; /* Link count. */
43# else
44 __nlink_t st_nlink; /* Link count. */
45 __mode_t st_mode; /* File mode. */
46# endif
47 __uid_t st_uid; /* User ID of the file's owner. */
48 __gid_t st_gid; /* Group ID of the file's group.*/
49# ifdef __x86_64__
50 int __pad0;
51# endif
52 __dev_t st_rdev; /* Device number, if device. */
53# ifndef __x86_64__
54 unsigned short int __pad2;
55# endif
56# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
57 __off_t st_size; /* Size of file, in bytes. */
58# else
59 __off64_t st_size; /* Size of file, in bytes. */
60# endif
61 __blksize_t st_blksize; /* Optimal block size for I/O. */
62# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
63 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
64# else
65 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
66# endif
67# ifdef __USE_XOPEN2K8
68 /* Nanosecond resolution timestamps are stored in a format
69 equivalent to 'struct timespec'. This is the type used
70 whenever possible but the Unix namespace rules do not allow the
71 identifier 'timespec' to appear in the <sys/stat.h> header.
72 Therefore we have to handle the use of this header in strictly
73 standard-compliant sources special. */
74 struct timespec st_atim; /* Time of last access. */
75 struct timespec st_mtim; /* Time of last modification. */
76 struct timespec st_ctim; /* Time of last status change. */
77# define st_atime st_atim.tv_sec /* Backward compatibility. */
78# define st_mtime st_mtim.tv_sec
79# define st_ctime st_ctim.tv_sec
80# else
81 __time_t st_atime; /* Time of last access. */
82 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
83 __time_t st_mtime; /* Time of last modification. */
84 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
85 __time_t st_ctime; /* Time of last status change. */
86 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
87# endif
88# ifdef __x86_64__
89 __syscall_slong_t __glibc_reserved[3];
90# else
91# ifndef __USE_FILE_OFFSET64
92 unsigned long int __glibc_reserved4;
93 unsigned long int __glibc_reserved5;
94# else
95 __ino64_t st_ino; /* File serial number. */
96# endif
97# endif
98#endif /* __USE_TIME_BITS64 */
99 };
100
101#ifdef __USE_LARGEFILE64
102/* Note stat64 has the same shape as stat for x86-64. */
103struct stat64
104 {
105# ifdef __USE_TIME_BITS64
106# include <bits/struct_stat_time64_helper.h>
107# else
108 __dev_t st_dev; /* Device. */
109# ifdef __x86_64__
110 __ino64_t st_ino; /* File serial number. */
111 __nlink_t st_nlink; /* Link count. */
112 __mode_t st_mode; /* File mode. */
113# else
114 unsigned int __pad1;
115 __ino_t __st_ino; /* 32bit file serial number. */
116 __mode_t st_mode; /* File mode. */
117 __nlink_t st_nlink; /* Link count. */
118# endif
119 __uid_t st_uid; /* User ID of the file's owner. */
120 __gid_t st_gid; /* Group ID of the file's group.*/
121# ifdef __x86_64__
122 int __pad0;
123 __dev_t st_rdev; /* Device number, if device. */
124 __off_t st_size; /* Size of file, in bytes. */
125# else
126 __dev_t st_rdev; /* Device number, if device. */
127 unsigned int __pad2;
128 __off64_t st_size; /* Size of file, in bytes. */
129# endif
130 __blksize_t st_blksize; /* Optimal block size for I/O. */
131 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
132# ifdef __USE_XOPEN2K8
133 /* Nanosecond resolution timestamps are stored in a format
134 equivalent to 'struct timespec'. This is the type used
135 whenever possible but the Unix namespace rules do not allow the
136 identifier 'timespec' to appear in the <sys/stat.h> header.
137 Therefore we have to handle the use of this header in strictly
138 standard-compliant sources special. */
139 struct timespec st_atim; /* Time of last access. */
140 struct timespec st_mtim; /* Time of last modification. */
141 struct timespec st_ctim; /* Time of last status change. */
142# else
143 __time_t st_atime; /* Time of last access. */
144 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
145 __time_t st_mtime; /* Time of last modification. */
146 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
147 __time_t st_ctime; /* Time of last status change. */
148 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
149# endif
150# ifdef __x86_64__
151 __syscall_slong_t __glibc_reserved[3];
152# else
153 __ino64_t st_ino; /* File serial number. */
154# endif
155# endif /* __USE_TIME_BITS64 */
156 };
157#endif
158
159/* Tell code we have these members. */
160#define _STATBUF_ST_BLKSIZE
161#define _STATBUF_ST_RDEV
162/* Nanosecond resolution time values are supported. */
163#define _STATBUF_ST_NSEC
164
165#endif /* _BITS_STRUCT_STAT_H */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/timesize.h deleted-25
......@@ -1,25 +0,0 @@
1/* Bit size of the time_t type at glibc build time, x86-64 and x32 case.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#if defined __x86_64__ && defined __ILP32__
20/* For x32, time is 64-bit even though word size is 32-bit. */
21# define __TIMESIZE 64
22#else
23/* For others, time size is word size. */
24# define __TIMESIZE __WORDSIZE
25#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/types/struct_semid_ds.h deleted-38
......@@ -1,38 +0,0 @@
1/* x86 implementation of the semaphore struct semid_ds.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_SEM_H
20# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead."
21#endif
22
23/* Data structure describing a set of semaphores. */
24struct semid_ds
25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
29 struct ipc_perm sem_perm; /* operation permission struct */
30 __time_t sem_otime; /* last semop() time */
31 __syscall_ulong_t __sem_otime_high;
32 __time_t sem_ctime; /* last time changed by semctl() */
33 __syscall_ulong_t __sem_ctime_high;
34 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
35 __syscall_ulong_t __glibc_reserved3;
36 __syscall_ulong_t __glibc_reserved4;
37#endif
38};
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/typesizes.h deleted-106
......@@ -1,106 +0,0 @@
1/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28
29/* X32 kernel interface is 64-bit. */
30#if defined __x86_64__ && defined __ILP32__
31# define __SYSCALL_SLONG_TYPE __SQUAD_TYPE
32# define __SYSCALL_ULONG_TYPE __UQUAD_TYPE
33#else
34# define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
35# define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
36#endif
37
38#define __DEV_T_TYPE __UQUAD_TYPE
39#define __UID_T_TYPE __U32_TYPE
40#define __GID_T_TYPE __U32_TYPE
41#define __INO_T_TYPE __SYSCALL_ULONG_TYPE
42#define __INO64_T_TYPE __UQUAD_TYPE
43#define __MODE_T_TYPE __U32_TYPE
44#ifdef __x86_64__
45# define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
46# define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
47#else
48# define __NLINK_T_TYPE __UWORD_TYPE
49# define __FSWORD_T_TYPE __SWORD_TYPE
50#endif
51#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE
52#define __OFF64_T_TYPE __SQUAD_TYPE
53#define __PID_T_TYPE __S32_TYPE
54#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE
55#define __RLIM64_T_TYPE __UQUAD_TYPE
56#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE
57#define __BLKCNT64_T_TYPE __SQUAD_TYPE
58#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE
59#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
60#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE
61#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
62#define __ID_T_TYPE __U32_TYPE
63#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE
64#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
67#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
68#define __DADDR_T_TYPE __S32_TYPE
69#define __KEY_T_TYPE __S32_TYPE
70#define __CLOCKID_T_TYPE __S32_TYPE
71#define __TIMER_T_TYPE void *
72#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE
73#define __FSID_T_TYPE struct { int __val[2]; }
74#define __SSIZE_T_TYPE __SWORD_TYPE
75#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE
76
77#ifdef __x86_64__
78/* Tell the libc code that off_t and off64_t are actually the same type
79 for all ABI purposes, even if possibly expressed as different base types
80 for C type-checking purposes. */
81# define __OFF_T_MATCHES_OFF64_T 1
82
83/* Same for ino_t and ino64_t. */
84# define __INO_T_MATCHES_INO64_T 1
85
86/* And for __rlim_t and __rlim64_t. */
87# define __RLIM_T_MATCHES_RLIM64_T 1
88
89/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
90# define __STATFS_MATCHES_STATFS64 1
91
92/* And for getitimer, setitimer and rusage */
93# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
94#else
95# define __RLIM_T_MATCHES_RLIM64_T 0
96
97# define __STATFS_MATCHES_STATFS64 0
98
99# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
100#endif
101
102/* Number of descriptors that can fit in an `fd_set'. */
103#define __FD_SETSIZE 1024
104
105
106#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/wordsize.h deleted-17
......@@ -1,17 +0,0 @@
1/* Determine the wordsize from the preprocessor defines. */
2
3#if defined __x86_64__ && !defined __ILP32__
4# define __WORDSIZE 64
5#else
6# define __WORDSIZE 32
7#define __WORDSIZE32_SIZE_ULONG 0
8#define __WORDSIZE32_PTRDIFF_LONG 0
9#endif
10
11#ifdef __x86_64__
12# define __WORDSIZE_TIME64_COMPAT32 1
13/* Both x86-64 and x32 use the 64-bit system call interface. */
14# define __SYSCALL_WORDSIZE 64
15#else
16# define __WORDSIZE_TIME64_COMPAT32 0
17#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/finclude/math-vector-fortran.h deleted-43
......@@ -1,43 +0,0 @@
1! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 2019-2021 Free Software Foundation, Inc.
3! This file is part of the GNU C Library.
4!
5! The GNU C Library is free software; you can redistribute it and/or
6! modify it under the terms of the GNU Lesser General Public
7! License as published by the Free Software Foundation; either
8! version 2.1 of the License, or (at your option) any later version.
9!
10! The GNU C Library is distributed in the hope that it will be useful,
11! but WITHOUT ANY WARRANTY; without even the implied warranty of
12! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13! Lesser General Public License for more details.
14!
15! You should have received a copy of the GNU Lesser General Public
16! License along with the GNU C Library; if not, see
17! <https://www.gnu.org/licenses/>.
18
19!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
20!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
21!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64')
22!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')
23!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64')
24!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64')
25!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64')
26!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64')
27!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64')
28!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
29!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
30!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31
32!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
33!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
34!GCC$ builtin (sin) attributes simd (notinbranch) if('x32')
35!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32')
36!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32')
37!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32')
38!GCC$ builtin (log) attributes simd (notinbranch) if('x32')
39!GCC$ builtin (logf) attributes simd (notinbranch) if('x32')
40!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
41!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
42!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/i386-linux-gnu/fpu_control.h deleted-109
......@@ -1,109 +0,0 @@
1/* FPU control word bits. x86 version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Olaf Flebbe.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <https://www.gnu.org/licenses/>. */
19
20#ifndef _FPU_CONTROL_H
21#define _FPU_CONTROL_H 1
22
23/* Note that this file sets on x86-64 only the x87 FPU, it does not
24 touch the SSE unit. */
25
26/* Here is the dirty part. Set up your 387 through the control word
27 * (cw) register.
28 *
29 * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0
30 * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM
31 *
32 * IM: Invalid operation mask
33 * DM: Denormalized operand mask
34 * ZM: Zero-divide mask
35 * OM: Overflow mask
36 * UM: Underflow mask
37 * PM: Precision (inexact result) mask
38 *
39 * Mask bit is 1 means no interrupt.
40 *
41 * PC: Precision control
42 * 11 - round to extended precision
43 * 10 - round to double precision
44 * 00 - round to single precision
45 *
46 * RC: Rounding control
47 * 00 - rounding to nearest
48 * 01 - rounding down (toward - infinity)
49 * 10 - rounding up (toward + infinity)
50 * 11 - rounding toward zero
51 *
52 * IC: Infinity control
53 * That is for 8087 and 80287 only.
54 *
55 * The hardware default is 0x037f which we use.
56 */
57
58#include <features.h>
59
60/* masking of interrupts */
61#define _FPU_MASK_IM 0x01
62#define _FPU_MASK_DM 0x02
63#define _FPU_MASK_ZM 0x04
64#define _FPU_MASK_OM 0x08
65#define _FPU_MASK_UM 0x10
66#define _FPU_MASK_PM 0x20
67
68/* precision control */
69#define _FPU_EXTENDED 0x300 /* libm requires double extended precision. */
70#define _FPU_DOUBLE 0x200
71#define _FPU_SINGLE 0x0
72
73/* rounding control */
74#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
75#define _FPU_RC_DOWN 0x400
76#define _FPU_RC_UP 0x800
77#define _FPU_RC_ZERO 0xC00
78
79#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */
80
81
82/* The fdlibm code requires strict IEEE double precision arithmetic,
83 and no interrupts for exceptions, rounding to nearest. */
84
85#define _FPU_DEFAULT 0x037f
86
87/* IEEE: same as above. */
88#define _FPU_IEEE 0x037f
89
90/* Type of the control word. */
91typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
92
93/* Macros for accessing the hardware control word. "*&" is used to
94 work around a bug in older versions of GCC. __volatile__ is used
95 to support combination of writing the control register and reading
96 it back. Without __volatile__, the old value may be used for reading
97 back under compiler optimization.
98
99 Note that the use of these macros is not sufficient anymore with
100 recent hardware nor on x86-64. Some floating point operations are
101 executed in the SSE/SSE2 engines which have their own control and
102 status register. */
103#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
104#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
105
106/* Default control word set at startup. */
107extern fpu_control_t __fpu_control;
108
109#endif /* fpu_control.h */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/gnu/lib-names.h deleted-17
......@@ -1,17 +0,0 @@
1/* This file is automatically generated.
2 It defines macros to allow user program to find the shared
3 library files which come as part of GNU libc. */
4#ifndef __GNU_LIB_NAMES_H
5#define __GNU_LIB_NAMES_H 1
6
7#if !defined __x86_64__
8# include <gnu/lib-names-32.h>
9#endif
10#if defined __x86_64__ && defined __LP64__
11# include <gnu/lib-names-64.h>
12#endif
13#if defined __x86_64__ && defined __ILP32__
14# include <gnu/lib-names-x32.h>
15#endif
16
17#endif /* gnu/lib-names.h */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/gnu/stubs.h deleted-14
......@@ -1,14 +0,0 @@
1/* This file is automatically generated.
2 This file selects the right generated file of `__stub_FUNCTION' macros
3 based on the architecture being compiled for. */
4
5
6#if !defined __x86_64__
7# include <gnu/stubs-32.h>
8#endif
9#if defined __x86_64__ && defined __LP64__
10# include <gnu/stubs-64.h>
11#endif
12#if defined __x86_64__ && defined __ILP32__
13# include <gnu/stubs-x32.h>
14#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/sys/elf.h deleted-29
......@@ -1,29 +0,0 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_ELF_H
19#define _SYS_ELF_H 1
20
21#ifdef __x86_64__
22# error This header is unsupported on x86-64.
23#else
24# warning "This header is obsolete; use <sys/procfs.h> instead."
25
26# include <sys/procfs.h>
27#endif
28
29#endif /* _SYS_ELF_H */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/sys/ptrace.h deleted-202
......@@ -1,202 +0,0 @@
1/* `ptrace' debugger support interface. Linux/x86 version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <https://www.gnu.org/licenses/>. */
19
20#ifndef _SYS_PTRACE_H
21#define _SYS_PTRACE_H 1
22
23#include <features.h>
24#include <bits/types.h>
25
26__BEGIN_DECLS
27
28/* Type of the REQUEST argument to `ptrace.' */
29enum __ptrace_request
30{
31 /* Indicate that the process making this request should be traced.
32 All signals received by this process can be intercepted by its
33 parent, and its parent can use the other `ptrace' requests. */
34 PTRACE_TRACEME = 0,
35#define PT_TRACE_ME PTRACE_TRACEME
36
37 /* Return the word in the process's text space at address ADDR. */
38 PTRACE_PEEKTEXT = 1,
39#define PT_READ_I PTRACE_PEEKTEXT
40
41 /* Return the word in the process's data space at address ADDR. */
42 PTRACE_PEEKDATA = 2,
43#define PT_READ_D PTRACE_PEEKDATA
44
45 /* Return the word in the process's user area at offset ADDR. */
46 PTRACE_PEEKUSER = 3,
47#define PT_READ_U PTRACE_PEEKUSER
48
49 /* Write the word DATA into the process's text space at address ADDR. */
50 PTRACE_POKETEXT = 4,
51#define PT_WRITE_I PTRACE_POKETEXT
52
53 /* Write the word DATA into the process's data space at address ADDR. */
54 PTRACE_POKEDATA = 5,
55#define PT_WRITE_D PTRACE_POKEDATA
56
57 /* Write the word DATA into the process's user area at offset ADDR. */
58 PTRACE_POKEUSER = 6,
59#define PT_WRITE_U PTRACE_POKEUSER
60
61 /* Continue the process. */
62 PTRACE_CONT = 7,
63#define PT_CONTINUE PTRACE_CONT
64
65 /* Kill the process. */
66 PTRACE_KILL = 8,
67#define PT_KILL PTRACE_KILL
68
69 /* Single step the process. */
70 PTRACE_SINGLESTEP = 9,
71#define PT_STEP PTRACE_SINGLESTEP
72
73 /* Get all general purpose registers used by a processes. */
74 PTRACE_GETREGS = 12,
75#define PT_GETREGS PTRACE_GETREGS
76
77 /* Set all general purpose registers used by a processes. */
78 PTRACE_SETREGS = 13,
79#define PT_SETREGS PTRACE_SETREGS
80
81 /* Get all floating point registers used by a processes. */
82 PTRACE_GETFPREGS = 14,
83#define PT_GETFPREGS PTRACE_GETFPREGS
84
85 /* Set all floating point registers used by a processes. */
86 PTRACE_SETFPREGS = 15,
87#define PT_SETFPREGS PTRACE_SETFPREGS
88
89 /* Attach to a process that is already running. */
90 PTRACE_ATTACH = 16,
91#define PT_ATTACH PTRACE_ATTACH
92
93 /* Detach from a process attached to with PTRACE_ATTACH. */
94 PTRACE_DETACH = 17,
95#define PT_DETACH PTRACE_DETACH
96
97 /* Get all extended floating point registers used by a processes. */
98 PTRACE_GETFPXREGS = 18,
99#define PT_GETFPXREGS PTRACE_GETFPXREGS
100
101 /* Set all extended floating point registers used by a processes. */
102 PTRACE_SETFPXREGS = 19,
103#define PT_SETFPXREGS PTRACE_SETFPXREGS
104
105 /* Continue and stop at the next entry to or return from syscall. */
106 PTRACE_SYSCALL = 24,
107#define PT_SYSCALL PTRACE_SYSCALL
108
109 /* Get a TLS entry in the GDT. */
110 PTRACE_GET_THREAD_AREA = 25,
111#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
112
113 /* Change a TLS entry in the GDT. */
114 PTRACE_SET_THREAD_AREA = 26,
115#define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA
116
117#ifdef __x86_64__
118 /* Access TLS data. */
119 PTRACE_ARCH_PRCTL = 30,
120# define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL
121#endif
122
123 /* Continue and stop at the next syscall, it will not be executed. */
124 PTRACE_SYSEMU = 31,
125#define PT_SYSEMU PTRACE_SYSEMU
126
127 /* Single step the process, the next syscall will not be executed. */
128 PTRACE_SYSEMU_SINGLESTEP = 32,
129#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
130
131 /* Execute process until next taken branch. */
132 PTRACE_SINGLEBLOCK = 33,
133#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
134
135 /* Set ptrace filter options. */
136 PTRACE_SETOPTIONS = 0x4200,
137#define PT_SETOPTIONS PTRACE_SETOPTIONS
138
139 /* Get last ptrace message. */
140 PTRACE_GETEVENTMSG = 0x4201,
141#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
142
143 /* Get siginfo for process. */
144 PTRACE_GETSIGINFO = 0x4202,
145#define PT_GETSIGINFO PTRACE_GETSIGINFO
146
147 /* Set new siginfo for process. */
148 PTRACE_SETSIGINFO = 0x4203,
149#define PT_SETSIGINFO PTRACE_SETSIGINFO
150
151 /* Get register content. */
152 PTRACE_GETREGSET = 0x4204,
153#define PTRACE_GETREGSET PTRACE_GETREGSET
154
155 /* Set register content. */
156 PTRACE_SETREGSET = 0x4205,
157#define PTRACE_SETREGSET PTRACE_SETREGSET
158
159 /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
160 signal or group stop state. */
161 PTRACE_SEIZE = 0x4206,
162#define PTRACE_SEIZE PTRACE_SEIZE
163
164 /* Trap seized tracee. */
165 PTRACE_INTERRUPT = 0x4207,
166#define PTRACE_INTERRUPT PTRACE_INTERRUPT
167
168 /* Wait for next group event. */
169 PTRACE_LISTEN = 0x4208,
170#define PTRACE_LISTEN PTRACE_LISTEN
171
172 /* Retrieve siginfo_t structures without removing signals from a queue. */
173 PTRACE_PEEKSIGINFO = 0x4209,
174#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
175
176 /* Get the mask of blocked signals. */
177 PTRACE_GETSIGMASK = 0x420a,
178#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
179
180 /* Change the mask of blocked signals. */
181 PTRACE_SETSIGMASK = 0x420b,
182#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
183
184 /* Get seccomp BPF filters. */
185 PTRACE_SECCOMP_GET_FILTER = 0x420c,
186#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
187
188 /* Get seccomp BPF filter metadata. */
189 PTRACE_SECCOMP_GET_METADATA = 0x420d,
190#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
191
192 /* Get information about system call. */
193 PTRACE_GET_SYSCALL_INFO = 0x420e
194#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
195};
196
197
198#include <bits/ptrace-shared.h>
199
200__END_DECLS
201
202#endif /* _SYS_PTRACE_H */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/sys/ucontext.h deleted-262
......@@ -1,262 +0,0 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_UCONTEXT_H
19#define _SYS_UCONTEXT_H 1
20
21#include <features.h>
22
23#include <bits/types.h>
24#include <bits/types/sigset_t.h>
25#include <bits/types/stack_t.h>
26
27
28#ifdef __USE_MISC
29# define __ctx(fld) fld
30#else
31# define __ctx(fld) __ ## fld
32#endif
33
34#ifdef __x86_64__
35
36/* Type for general register. */
37__extension__ typedef long long int greg_t;
38
39/* Number of general registers. */
40#define __NGREG 23
41#ifdef __USE_MISC
42# define NGREG __NGREG
43#endif
44
45/* Container for all general registers. */
46typedef greg_t gregset_t[__NGREG];
47
48#ifdef __USE_GNU
49/* Number of each register in the `gregset_t' array. */
50enum
51{
52 REG_R8 = 0,
53# define REG_R8 REG_R8
54 REG_R9,
55# define REG_R9 REG_R9
56 REG_R10,
57# define REG_R10 REG_R10
58 REG_R11,
59# define REG_R11 REG_R11
60 REG_R12,
61# define REG_R12 REG_R12
62 REG_R13,
63# define REG_R13 REG_R13
64 REG_R14,
65# define REG_R14 REG_R14
66 REG_R15,
67# define REG_R15 REG_R15
68 REG_RDI,
69# define REG_RDI REG_RDI
70 REG_RSI,
71# define REG_RSI REG_RSI
72 REG_RBP,
73# define REG_RBP REG_RBP
74 REG_RBX,
75# define REG_RBX REG_RBX
76 REG_RDX,
77# define REG_RDX REG_RDX
78 REG_RAX,
79# define REG_RAX REG_RAX
80 REG_RCX,
81# define REG_RCX REG_RCX
82 REG_RSP,
83# define REG_RSP REG_RSP
84 REG_RIP,
85# define REG_RIP REG_RIP
86 REG_EFL,
87# define REG_EFL REG_EFL
88 REG_CSGSFS, /* Actually short cs, gs, fs, __pad0. */
89# define REG_CSGSFS REG_CSGSFS
90 REG_ERR,
91# define REG_ERR REG_ERR
92 REG_TRAPNO,
93# define REG_TRAPNO REG_TRAPNO
94 REG_OLDMASK,
95# define REG_OLDMASK REG_OLDMASK
96 REG_CR2
97# define REG_CR2 REG_CR2
98};
99#endif
100
101struct _libc_fpxreg
102{
103 unsigned short int __ctx(significand)[4];
104 unsigned short int __ctx(exponent);
105 unsigned short int __glibc_reserved1[3];
106};
107
108struct _libc_xmmreg
109{
110 __uint32_t __ctx(element)[4];
111};
112
113struct _libc_fpstate
114{
115 /* 64-bit FXSAVE format. */
116 __uint16_t __ctx(cwd);
117 __uint16_t __ctx(swd);
118 __uint16_t __ctx(ftw);
119 __uint16_t __ctx(fop);
120 __uint64_t __ctx(rip);
121 __uint64_t __ctx(rdp);
122 __uint32_t __ctx(mxcsr);
123 __uint32_t __ctx(mxcr_mask);
124 struct _libc_fpxreg _st[8];
125 struct _libc_xmmreg _xmm[16];
126 __uint32_t __glibc_reserved1[24];
127};
128
129/* Structure to describe FPU registers. */
130typedef struct _libc_fpstate *fpregset_t;
131
132/* Context to describe whole processor state. */
133typedef struct
134 {
135 gregset_t __ctx(gregs);
136 /* Note that fpregs is a pointer. */
137 fpregset_t __ctx(fpregs);
138 __extension__ unsigned long long __reserved1 [8];
139} mcontext_t;
140
141/* Userlevel context. */
142typedef struct ucontext_t
143 {
144 unsigned long int __ctx(uc_flags);
145 struct ucontext_t *uc_link;
146 stack_t uc_stack;
147 mcontext_t uc_mcontext;
148 sigset_t uc_sigmask;
149 struct _libc_fpstate __fpregs_mem;
150 __extension__ unsigned long long int __ssp[4];
151 } ucontext_t;
152
153#else /* !__x86_64__ */
154
155/* Type for general register. */
156typedef int greg_t;
157
158/* Number of general registers. */
159#define __NGREG 19
160#ifdef __USE_MISC
161# define NGREG __NGREG
162#endif
163
164/* Container for all general registers. */
165typedef greg_t gregset_t[__NGREG];
166
167#ifdef __USE_GNU
168/* Number of each register is the `gregset_t' array. */
169enum
170{
171 REG_GS = 0,
172# define REG_GS REG_GS
173 REG_FS,
174# define REG_FS REG_FS
175 REG_ES,
176# define REG_ES REG_ES
177 REG_DS,
178# define REG_DS REG_DS
179 REG_EDI,
180# define REG_EDI REG_EDI
181 REG_ESI,
182# define REG_ESI REG_ESI
183 REG_EBP,
184# define REG_EBP REG_EBP
185 REG_ESP,
186# define REG_ESP REG_ESP
187 REG_EBX,
188# define REG_EBX REG_EBX
189 REG_EDX,
190# define REG_EDX REG_EDX
191 REG_ECX,
192# define REG_ECX REG_ECX
193 REG_EAX,
194# define REG_EAX REG_EAX
195 REG_TRAPNO,
196# define REG_TRAPNO REG_TRAPNO
197 REG_ERR,
198# define REG_ERR REG_ERR
199 REG_EIP,
200# define REG_EIP REG_EIP
201 REG_CS,
202# define REG_CS REG_CS
203 REG_EFL,
204# define REG_EFL REG_EFL
205 REG_UESP,
206# define REG_UESP REG_UESP
207 REG_SS
208# define REG_SS REG_SS
209};
210#endif
211
212/* Definitions taken from the kernel headers. */
213struct _libc_fpreg
214{
215 unsigned short int __ctx(significand)[4];
216 unsigned short int __ctx(exponent);
217};
218
219struct _libc_fpstate
220{
221 unsigned long int __ctx(cw);
222 unsigned long int __ctx(sw);
223 unsigned long int __ctx(tag);
224 unsigned long int __ctx(ipoff);
225 unsigned long int __ctx(cssel);
226 unsigned long int __ctx(dataoff);
227 unsigned long int __ctx(datasel);
228 struct _libc_fpreg _st[8];
229 unsigned long int __ctx(status);
230};
231
232/* Structure to describe FPU registers. */
233typedef struct _libc_fpstate *fpregset_t;
234
235/* Context to describe whole processor state. */
236typedef struct
237 {
238 gregset_t __ctx(gregs);
239 /* Due to Linux's history we have to use a pointer here. The SysV/i386
240 ABI requires a struct with the values. */
241 fpregset_t __ctx(fpregs);
242 unsigned long int __ctx(oldmask);
243 unsigned long int __ctx(cr2);
244 } mcontext_t;
245
246/* Userlevel context. */
247typedef struct ucontext_t
248 {
249 unsigned long int __ctx(uc_flags);
250 struct ucontext_t *uc_link;
251 stack_t uc_stack;
252 mcontext_t uc_mcontext;
253 sigset_t uc_sigmask;
254 struct _libc_fpstate __fpregs_mem;
255 unsigned long int __ssp[4];
256 } ucontext_t;
257
258#endif /* !__x86_64__ */
259
260#undef __ctx
261
262#endif /* sys/ucontext.h */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/sys/user.h deleted-180
......@@ -1,180 +0,0 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_USER_H
19#define _SYS_USER_H 1
20
21/* The whole purpose of this file is for GDB and GDB only. Don't read
22 too much into it. Don't use it for anything other than GDB unless
23 you know what you are doing. */
24
25#ifdef __x86_64__
26
27struct user_fpregs_struct
28{
29 unsigned short int cwd;
30 unsigned short int swd;
31 unsigned short int ftw;
32 unsigned short int fop;
33 __extension__ unsigned long long int rip;
34 __extension__ unsigned long long int rdp;
35 unsigned int mxcsr;
36 unsigned int mxcr_mask;
37 unsigned int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
38 unsigned int xmm_space[64]; /* 16*16 bytes for each XMM-reg = 256 bytes */
39 unsigned int padding[24];
40};
41
42struct user_regs_struct
43{
44 __extension__ unsigned long long int r15;
45 __extension__ unsigned long long int r14;
46 __extension__ unsigned long long int r13;
47 __extension__ unsigned long long int r12;
48 __extension__ unsigned long long int rbp;
49 __extension__ unsigned long long int rbx;
50 __extension__ unsigned long long int r11;
51 __extension__ unsigned long long int r10;
52 __extension__ unsigned long long int r9;
53 __extension__ unsigned long long int r8;
54 __extension__ unsigned long long int rax;
55 __extension__ unsigned long long int rcx;
56 __extension__ unsigned long long int rdx;
57 __extension__ unsigned long long int rsi;
58 __extension__ unsigned long long int rdi;
59 __extension__ unsigned long long int orig_rax;
60 __extension__ unsigned long long int rip;
61 __extension__ unsigned long long int cs;
62 __extension__ unsigned long long int eflags;
63 __extension__ unsigned long long int rsp;
64 __extension__ unsigned long long int ss;
65 __extension__ unsigned long long int fs_base;
66 __extension__ unsigned long long int gs_base;
67 __extension__ unsigned long long int ds;
68 __extension__ unsigned long long int es;
69 __extension__ unsigned long long int fs;
70 __extension__ unsigned long long int gs;
71};
72
73struct user
74{
75 struct user_regs_struct regs;
76 int u_fpvalid;
77 struct user_fpregs_struct i387;
78 __extension__ unsigned long long int u_tsize;
79 __extension__ unsigned long long int u_dsize;
80 __extension__ unsigned long long int u_ssize;
81 __extension__ unsigned long long int start_code;
82 __extension__ unsigned long long int start_stack;
83 __extension__ long long int signal;
84 int reserved;
85 __extension__ union
86 {
87 struct user_regs_struct* u_ar0;
88 __extension__ unsigned long long int __u_ar0_word;
89 };
90 __extension__ union
91 {
92 struct user_fpregs_struct* u_fpstate;
93 __extension__ unsigned long long int __u_fpstate_word;
94 };
95 __extension__ unsigned long long int magic;
96 char u_comm [32];
97 __extension__ unsigned long long int u_debugreg [8];
98};
99
100#else
101/* These are the 32-bit x86 structures. */
102struct user_fpregs_struct
103{
104 long int cwd;
105 long int swd;
106 long int twd;
107 long int fip;
108 long int fcs;
109 long int foo;
110 long int fos;
111 long int st_space [20];
112};
113
114struct user_fpxregs_struct
115{
116 unsigned short int cwd;
117 unsigned short int swd;
118 unsigned short int twd;
119 unsigned short int fop;
120 long int fip;
121 long int fcs;
122 long int foo;
123 long int fos;
124 long int mxcsr;
125 long int reserved;
126 long int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
127 long int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
128 long int padding[56];
129};
130
131struct user_regs_struct
132{
133 long int ebx;
134 long int ecx;
135 long int edx;
136 long int esi;
137 long int edi;
138 long int ebp;
139 long int eax;
140 long int xds;
141 long int xes;
142 long int xfs;
143 long int xgs;
144 long int orig_eax;
145 long int eip;
146 long int xcs;
147 long int eflags;
148 long int esp;
149 long int xss;
150};
151
152struct user
153{
154 struct user_regs_struct regs;
155 int u_fpvalid;
156 struct user_fpregs_struct i387;
157 unsigned long int u_tsize;
158 unsigned long int u_dsize;
159 unsigned long int u_ssize;
160 unsigned long int start_code;
161 unsigned long int start_stack;
162 long int signal;
163 int reserved;
164 struct user_regs_struct* u_ar0;
165 struct user_fpregs_struct* u_fpstate;
166 unsigned long int magic;
167 char u_comm [32];
168 int u_debugreg [8];
169};
170#endif /* __x86_64__ */
171
172#define PAGE_SHIFT 12
173#define PAGE_SIZE (1UL << PAGE_SHIFT)
174#define PAGE_MASK (~(PAGE_SIZE-1))
175#define NBPG PAGE_SIZE
176#define UPAGES 1
177#define HOST_TEXT_START_ADDR (u.start_code)
178#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
179
180#endif /* _SYS_USER_H */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/a.out.h created+11
......@@ -0,0 +1,11 @@
1#ifndef __A_OUT_GNU_H__
2# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
3#endif
4
5#ifdef __x86_64__
6
7/* Signal to users of this header that this architecture really doesn't
8 support a.out binary format. */
9#define __NO_A_OUT_SUPPORT 1
10
11#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* i386/x86_64 are little-endian. */
9#define __BYTE_ORDER __LITTLE_ENDIAN
10
11#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/environments.h created+105
......@@ -0,0 +1,105 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _UNISTD_H
19# error "Never include this file directly. Use <unistd.h> instead"
20#endif
21
22#include <bits/wordsize.h>
23
24/* This header should define the following symbols under the described
25 situations. A value `1' means that the model is always supported,
26 `-1' means it is never supported. Undefined means it cannot be
27 statically decided.
28
29 _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type
30 _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type
31
32 _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type
33 _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type
34
35 The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
36 _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
37 _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
38 used in previous versions of the Unix standard and are available
39 only for compatibility.
40*/
41
42#if __WORDSIZE == 64
43
44/* Environments with 32-bit wide pointers are optionally provided.
45 Therefore following macros aren't defined:
46 # undef _POSIX_V7_ILP32_OFF32
47 # undef _POSIX_V7_ILP32_OFFBIG
48 # undef _POSIX_V6_ILP32_OFF32
49 # undef _POSIX_V6_ILP32_OFFBIG
50 # undef _XBS5_ILP32_OFF32
51 # undef _XBS5_ILP32_OFFBIG
52 and users need to check at runtime. */
53
54/* We also have no use (for now) for an environment with bigger pointers
55 and offsets. */
56# define _POSIX_V7_LPBIG_OFFBIG -1
57# define _POSIX_V6_LPBIG_OFFBIG -1
58# define _XBS5_LPBIG_OFFBIG -1
59
60/* By default we have 64-bit wide `long int', pointers and `off_t'. */
61# define _POSIX_V7_LP64_OFF64 1
62# define _POSIX_V6_LP64_OFF64 1
63# define _XBS5_LP64_OFF64 1
64
65#else /* __WORDSIZE == 32 */
66
67/* We have 32-bit wide `int', `long int' and pointers and all platforms
68 support LFS. -mx32 has 64-bit wide `off_t'. */
69# define _POSIX_V7_ILP32_OFFBIG 1
70# define _POSIX_V6_ILP32_OFFBIG 1
71# define _XBS5_ILP32_OFFBIG 1
72
73# ifndef __x86_64__
74/* -m32 has 32-bit wide `off_t'. */
75# define _POSIX_V7_ILP32_OFF32 1
76# define _POSIX_V6_ILP32_OFF32 1
77# define _XBS5_ILP32_OFF32 1
78# endif
79
80/* We optionally provide an environment with the above size but an 64-bit
81 side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */
82
83/* Environments with 64-bit wide pointers can be provided,
84 so these macros aren't defined:
85 # undef _POSIX_V7_LP64_OFF64
86 # undef _POSIX_V7_LPBIG_OFFBIG
87 # undef _POSIX_V6_LP64_OFF64
88 # undef _POSIX_V6_LPBIG_OFFBIG
89 # undef _XBS5_LP64_OFF64
90 # undef _XBS5_LPBIG_OFFBIG
91 and sysconf tests for it at runtime. */
92
93#endif /* __WORDSIZE == 32 */
94
95#define __ILP32_OFF32_CFLAGS "-m32"
96#define __ILP32_OFF32_LDFLAGS "-m32"
97#if defined __x86_64__ && defined __ILP32__
98# define __ILP32_OFFBIG_CFLAGS "-mx32"
99# define __ILP32_OFFBIG_LDFLAGS "-mx32"
100#else
101# define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
102# define __ILP32_OFFBIG_LDFLAGS "-m32"
103#endif
104#define __LP64_OFF64_CFLAGS "-m64"
105#define __LP64_OFF64_LDFLAGS "-m64"
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/epoll.h created+29
......@@ -0,0 +1,29 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_EPOLL_H
19# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
20#endif
21
22/* Flags to be passed to epoll_create1. */
23enum
24 {
25 EPOLL_CLOEXEC = 02000000
26#define EPOLL_CLOEXEC EPOLL_CLOEXEC
27 };
28
29#define __EPOLL_PACKED __attribute__ ((__packed__))
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/fcntl.h created+61
......@@ -0,0 +1,61 @@
1/* O_*, F_*, FD_* bit values for Linux/x86.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _FCNTL_H
20# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
21#endif
22
23#ifdef __x86_64__
24# define __O_LARGEFILE 0
25#endif
26
27#ifdef __x86_64__
28/* Not necessary, we always have 64-bit offsets. */
29# define F_GETLK64 5 /* Get record locking info. */
30# define F_SETLK64 6 /* Set record locking info (non-blocking). */
31# define F_SETLKW64 7 /* Set record locking info (blocking). */
32#endif
33
34
35struct flock
36 {
37 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
38 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
39#ifndef __USE_FILE_OFFSET64
40 __off_t l_start; /* Offset where the lock begins. */
41 __off_t l_len; /* Size of the locked area; zero means until EOF. */
42#else
43 __off64_t l_start; /* Offset where the lock begins. */
44 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
45#endif
46 __pid_t l_pid; /* Process holding the lock. */
47 };
48
49#ifdef __USE_LARGEFILE64
50struct flock64
51 {
52 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
53 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
54 __off64_t l_start; /* Offset where the lock begins. */
55 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
56 __pid_t l_pid; /* Process holding the lock. */
57 };
58#endif
59
60/* Include generic Linux declarations. */
61#include <bits/fcntl-linux.h>
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/fenv.h created+116
......@@ -0,0 +1,116 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _FENV_H
19# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
20#endif
21
22/* Define bits representing the exception. We use the bit positions
23 of the appropriate bits in the FPU control word. */
24enum
25 {
26 FE_INVALID =
27#define FE_INVALID 0x01
28 FE_INVALID,
29 __FE_DENORM = 0x02,
30 FE_DIVBYZERO =
31#define FE_DIVBYZERO 0x04
32 FE_DIVBYZERO,
33 FE_OVERFLOW =
34#define FE_OVERFLOW 0x08
35 FE_OVERFLOW,
36 FE_UNDERFLOW =
37#define FE_UNDERFLOW 0x10
38 FE_UNDERFLOW,
39 FE_INEXACT =
40#define FE_INEXACT 0x20
41 FE_INEXACT
42 };
43
44#define FE_ALL_EXCEPT \
45 (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
46
47/* The ix87 FPU supports all of the four defined rounding modes. We
48 use again the bit positions in the FPU control word as the values
49 for the appropriate macros. */
50enum
51 {
52 FE_TONEAREST =
53#define FE_TONEAREST 0
54 FE_TONEAREST,
55 FE_DOWNWARD =
56#define FE_DOWNWARD 0x400
57 FE_DOWNWARD,
58 FE_UPWARD =
59#define FE_UPWARD 0x800
60 FE_UPWARD,
61 FE_TOWARDZERO =
62#define FE_TOWARDZERO 0xc00
63 FE_TOWARDZERO
64 };
65
66
67/* Type representing exception flags. */
68typedef unsigned short int fexcept_t;
69
70
71/* Type representing floating-point environment. This structure
72 corresponds to the layout of the block written by the `fstenv'
73 instruction and has additional fields for the contents of the MXCSR
74 register as written by the `stmxcsr' instruction. */
75typedef struct
76 {
77 unsigned short int __control_word;
78 unsigned short int __glibc_reserved1;
79 unsigned short int __status_word;
80 unsigned short int __glibc_reserved2;
81 unsigned short int __tags;
82 unsigned short int __glibc_reserved3;
83 unsigned int __eip;
84 unsigned short int __cs_selector;
85 unsigned int __opcode:11;
86 unsigned int __glibc_reserved4:5;
87 unsigned int __data_offset;
88 unsigned short int __data_selector;
89 unsigned short int __glibc_reserved5;
90#ifdef __x86_64__
91 unsigned int __mxcsr;
92#endif
93 }
94fenv_t;
95
96/* If the default argument is used we use this value. */
97#define FE_DFL_ENV ((const fenv_t *) -1)
98
99#ifdef __USE_GNU
100/* Floating-point environment where none of the exception is masked. */
101# define FE_NOMASK_ENV ((const fenv_t *) -2)
102#endif
103
104#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
105/* Type representing floating-point control modes. */
106typedef struct
107 {
108 unsigned short int __control_word;
109 unsigned short int __glibc_reserved;
110 unsigned int __mxcsr;
111 }
112femode_t;
113
114/* Default floating-point control modes. */
115# define FE_DFL_MODE ((const femode_t *) -1L)
116#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/floatn.h created+121
......@@ -0,0 +1,121 @@
1/* Macros to control TS 18661-3 glibc features on x86.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23
24/* Defined to 1 if the current compiler invocation provides a
25 floating-point type with the IEEE 754 binary128 format, and this
26 glibc includes corresponding *f128 interfaces for it. The required
27 libgcc support was added some time after the basic compiler
28 support, for x86_64 and x86. */
29#if (defined __x86_64__ \
30 ? __GNUC_PREREQ (4, 3) \
31 : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4)))
32# define __HAVE_FLOAT128 1
33#else
34# define __HAVE_FLOAT128 0
35#endif
36
37/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
38 from the default float, double and long double types in this glibc. */
39#if __HAVE_FLOAT128
40# define __HAVE_DISTINCT_FLOAT128 1
41#else
42# define __HAVE_DISTINCT_FLOAT128 0
43#endif
44
45/* Defined to 1 if the current compiler invocation provides a
46 floating-point type with the right format for _Float64x, and this
47 glibc includes corresponding *f64x interfaces for it. */
48#define __HAVE_FLOAT64X 1
49
50/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
51 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
52 the format of _Float128, which must be different from that of long
53 double. */
54#define __HAVE_FLOAT64X_LONG_DOUBLE 1
55
56#ifndef __ASSEMBLER__
57
58/* Defined to concatenate the literal suffix to be used with _Float128
59 types, if __HAVE_FLOAT128 is 1. */
60# if __HAVE_FLOAT128
61# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
62/* The literal suffix f128 exists only since GCC 7.0. */
63# define __f128(x) x##q
64# else
65# define __f128(x) x##f128
66# endif
67# endif
68
69/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
70# if __HAVE_FLOAT128
71# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
72/* Add a typedef for older GCC compilers which don't natively support
73 _Complex _Float128. */
74typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
75# define __CFLOAT128 __cfloat128
76# else
77# define __CFLOAT128 _Complex _Float128
78# endif
79# endif
80
81/* The remaining of this file provides support for older compilers. */
82# if __HAVE_FLOAT128
83
84/* The type _Float128 exists only since GCC 7.0. */
85# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
86typedef __float128 _Float128;
87# endif
88
89/* __builtin_huge_valf128 doesn't exist before GCC 7.0. */
90# if !__GNUC_PREREQ (7, 0)
91# define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ())
92# endif
93
94/* Older GCC has only a subset of built-in functions for _Float128 on
95 x86, and __builtin_infq is not usable in static initializers.
96 Converting a narrower sNaN to _Float128 produces a quiet NaN, so
97 attempts to use _Float128 sNaNs will not work properly with older
98 compilers. */
99# if !__GNUC_PREREQ (7, 0)
100# define __builtin_copysignf128 __builtin_copysignq
101# define __builtin_fabsf128 __builtin_fabsq
102# define __builtin_inff128() ((_Float128) __builtin_inf ())
103# define __builtin_nanf128(x) ((_Float128) __builtin_nan (x))
104# define __builtin_nansf128(x) ((_Float128) __builtin_nans (x))
105# endif
106
107/* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*,
108 e.g.: __builtin_signbitf128, before GCC 6. However, there has never
109 been a __builtin_signbitf128 in GCC and the type-generic builtin is
110 only available since GCC 6. */
111# if !__GNUC_PREREQ (6, 0)
112# define __builtin_signbitf128 __signbitf128
113# endif
114
115# endif
116
117#endif /* !__ASSEMBLER__. */
118
119#include <bits/floatn-common.h>
120
121#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/flt-eval-method.h created+33
......@@ -0,0 +1,33 @@
1/* Define __GLIBC_FLT_EVAL_METHOD. x86 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _MATH_H
20# error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead."
21#endif
22
23#ifdef __FLT_EVAL_METHOD__
24# if __FLT_EVAL_METHOD__ == -1
25# define __GLIBC_FLT_EVAL_METHOD 2
26# else
27# define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__
28# endif
29#elif defined __x86_64__
30# define __GLIBC_FLT_EVAL_METHOD 0
31#else
32# define __GLIBC_FLT_EVAL_METHOD 2
33#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/fp-logb.h created+24
......@@ -0,0 +1,24 @@
1/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _MATH_H
20# error "Never use <bits/fp-logb.h> directly; include <math.h> instead."
21#endif
22
23#define __FP_LOGB0_IS_MIN 1
24#define __FP_LOGBNAN_IS_MIN 1
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/indirect-return.h created+37
......@@ -0,0 +1,37 @@
1/* Definition of __INDIRECT_RETURN. x86 version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _UCONTEXT_H
20# error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead."
21#endif
22
23/* On x86, swapcontext returns via indirect branch when the shadow stack
24 is enabled. Define __INDIRECT_RETURN to indicate whether swapcontext
25 returns via indirect branch. */
26#if defined __CET__ && (__CET__ & 2) != 0
27# if __glibc_has_attribute (__indirect_return__)
28# define __INDIRECT_RETURN __attribute__ ((__indirect_return__))
29# else
30/* Newer compilers provide the indirect_return attribute, but without
31 it we can use returns_twice to affect the optimizer in the same
32 way and avoid unsafe optimizations. */
33# define __INDIRECT_RETURN __attribute__ ((__returns_twice__))
34# endif
35#else
36# define __INDIRECT_RETURN
37#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/ipctypes.h created+33
......@@ -0,0 +1,33 @@
1/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_IPC_H
20# error "Never use <bits/ipctypes.h> directly; include <sys/ipc.h> instead."
21#endif
22
23#ifndef _BITS_IPCTYPES_H
24#define _BITS_IPCTYPES_H 1
25
26/* Used in `struct shmid_ds'. */
27# ifdef __x86_64__
28typedef int __ipc_pid_t;
29# else
30typedef unsigned short int __ipc_pid_t;
31# endif
32
33#endif /* bits/ipctypes.h */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/iscanonical.h created+54
......@@ -0,0 +1,54 @@
1/* Define iscanonical macro. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _MATH_H
20# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
21#endif
22
23extern int __iscanonicall (long double __x)
24 __THROW __attribute__ ((__const__));
25#define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
26#define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
27#if __HAVE_DISTINCT_FLOAT128
28# define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1)
29#endif
30
31/* Return nonzero value if X is canonical. In IEEE interchange binary
32 formats, all values are canonical, but the argument must still be
33 converted to its semantic type for any exceptions arising from the
34 conversion, before being discarded; in extended precision, there
35 are encodings that are not consistently handled as corresponding to
36 any particular value of the type, and we return 0 for those. */
37#ifndef __cplusplus
38# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
39#else
40/* In C++ mode, __MATH_TG cannot be used, because it relies on
41 __builtin_types_compatible_p, which is a C-only builtin. On the
42 other hand, overloading provides the means to distinguish between
43 the floating-point types. The overloading resolution will match
44 the correct parameter (regardless of type qualifiers (i.e.: const
45 and volatile)). */
46extern "C++" {
47inline int iscanonical (float __val) { return __iscanonicalf (__val); }
48inline int iscanonical (double __val) { return __iscanonical (__val); }
49inline int iscanonical (long double __val) { return __iscanonicall (__val); }
50# if __HAVE_DISTINCT_FLOAT128
51inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); }
52# endif
53}
54#endif /* __cplusplus */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/link.h created+159
......@@ -0,0 +1,159 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _LINK_H
19# error "Never include <bits/link.h> directly; use <link.h> instead."
20#endif
21
22
23#ifndef __x86_64__
24/* Registers for entry into PLT on IA-32. */
25typedef struct La_i86_regs
26{
27 uint32_t lr_edx;
28 uint32_t lr_ecx;
29 uint32_t lr_eax;
30 uint32_t lr_ebp;
31 uint32_t lr_esp;
32} La_i86_regs;
33
34/* Return values for calls from PLT on IA-32. */
35typedef struct La_i86_retval
36{
37 uint32_t lrv_eax;
38 uint32_t lrv_edx;
39 long double lrv_st0;
40 long double lrv_st1;
41 uint64_t lrv_bnd0;
42 uint64_t lrv_bnd1;
43} La_i86_retval;
44
45
46__BEGIN_DECLS
47
48extern Elf32_Addr la_i86_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
49 uintptr_t *__refcook,
50 uintptr_t *__defcook,
51 La_i86_regs *__regs,
52 unsigned int *__flags,
53 const char *__symname,
54 long int *__framesizep);
55extern unsigned int la_i86_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
56 uintptr_t *__refcook,
57 uintptr_t *__defcook,
58 const La_i86_regs *__inregs,
59 La_i86_retval *__outregs,
60 const char *symname);
61
62__END_DECLS
63
64#else
65
66/* Registers for entry into PLT on x86-64. */
67# if __GNUC_PREREQ (4,0)
68typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16)));
69typedef float La_x86_64_ymm
70 __attribute__ ((__vector_size__ (32), __aligned__ (16)));
71typedef double La_x86_64_zmm
72 __attribute__ ((__vector_size__ (64), __aligned__ (16)));
73# else
74typedef float La_x86_64_xmm __attribute__ ((__mode__ (__V4SF__)));
75# endif
76
77typedef union
78{
79# if __GNUC_PREREQ (4,0)
80 La_x86_64_ymm ymm[2];
81 La_x86_64_zmm zmm[1];
82# endif
83 La_x86_64_xmm xmm[4];
84} La_x86_64_vector __attribute__ ((__aligned__ (16)));
85
86typedef struct La_x86_64_regs
87{
88 uint64_t lr_rdx;
89 uint64_t lr_r8;
90 uint64_t lr_r9;
91 uint64_t lr_rcx;
92 uint64_t lr_rsi;
93 uint64_t lr_rdi;
94 uint64_t lr_rbp;
95 uint64_t lr_rsp;
96 La_x86_64_xmm lr_xmm[8];
97 La_x86_64_vector lr_vector[8];
98#ifndef __ILP32__
99 __int128_t lr_bnd[4];
100#endif
101} La_x86_64_regs;
102
103/* Return values for calls from PLT on x86-64. */
104typedef struct La_x86_64_retval
105{
106 uint64_t lrv_rax;
107 uint64_t lrv_rdx;
108 La_x86_64_xmm lrv_xmm0;
109 La_x86_64_xmm lrv_xmm1;
110 long double lrv_st0;
111 long double lrv_st1;
112 La_x86_64_vector lrv_vector0;
113 La_x86_64_vector lrv_vector1;
114#ifndef __ILP32__
115 __int128_t lrv_bnd0;
116 __int128_t lrv_bnd1;
117#endif
118} La_x86_64_retval;
119
120#define La_x32_regs La_x86_64_regs
121#define La_x32_retval La_x86_64_retval
122
123__BEGIN_DECLS
124
125extern Elf64_Addr la_x86_64_gnu_pltenter (Elf64_Sym *__sym,
126 unsigned int __ndx,
127 uintptr_t *__refcook,
128 uintptr_t *__defcook,
129 La_x86_64_regs *__regs,
130 unsigned int *__flags,
131 const char *__symname,
132 long int *__framesizep);
133extern unsigned int la_x86_64_gnu_pltexit (Elf64_Sym *__sym,
134 unsigned int __ndx,
135 uintptr_t *__refcook,
136 uintptr_t *__defcook,
137 const La_x86_64_regs *__inregs,
138 La_x86_64_retval *__outregs,
139 const char *__symname);
140
141extern Elf32_Addr la_x32_gnu_pltenter (Elf32_Sym *__sym,
142 unsigned int __ndx,
143 uintptr_t *__refcook,
144 uintptr_t *__defcook,
145 La_x32_regs *__regs,
146 unsigned int *__flags,
147 const char *__symname,
148 long int *__framesizep);
149extern unsigned int la_x32_gnu_pltexit (Elf32_Sym *__sym,
150 unsigned int __ndx,
151 uintptr_t *__refcook,
152 uintptr_t *__defcook,
153 const La_x32_regs *__inregs,
154 La_x32_retval *__outregs,
155 const char *__symname);
156
157__END_DECLS
158
159#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/long-double.h created+21
......@@ -0,0 +1,21 @@
1/* Properties of long double type. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19/* long double is distinct from double, so there is nothing to
20 define here. */
21#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/math-vector.h created+63
......@@ -0,0 +1,63 @@
1/* Platform-specific SIMD declarations of math functions.
2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _MATH_H
20# error "Never include <bits/math-vector.h> directly;\
21 include <math.h> instead."
22#endif
23
24/* Get default empty definitions for simd declarations. */
25#include <bits/libm-simd-decl-stubs.h>
26
27#if defined __x86_64__ && defined __FAST_MATH__
28# if defined _OPENMP && _OPENMP >= 201307
29/* OpenMP case. */
30# define __DECL_SIMD_x86_64 _Pragma ("omp declare simd notinbranch")
31# elif __GNUC_PREREQ (6,0)
32/* W/o OpenMP use GCC 6.* __attribute__ ((__simd__)). */
33# define __DECL_SIMD_x86_64 __attribute__ ((__simd__ ("notinbranch")))
34# endif
35
36# ifdef __DECL_SIMD_x86_64
37# undef __DECL_SIMD_cos
38# define __DECL_SIMD_cos __DECL_SIMD_x86_64
39# undef __DECL_SIMD_cosf
40# define __DECL_SIMD_cosf __DECL_SIMD_x86_64
41# undef __DECL_SIMD_sin
42# define __DECL_SIMD_sin __DECL_SIMD_x86_64
43# undef __DECL_SIMD_sinf
44# define __DECL_SIMD_sinf __DECL_SIMD_x86_64
45# undef __DECL_SIMD_sincos
46# define __DECL_SIMD_sincos __DECL_SIMD_x86_64
47# undef __DECL_SIMD_sincosf
48# define __DECL_SIMD_sincosf __DECL_SIMD_x86_64
49# undef __DECL_SIMD_log
50# define __DECL_SIMD_log __DECL_SIMD_x86_64
51# undef __DECL_SIMD_logf
52# define __DECL_SIMD_logf __DECL_SIMD_x86_64
53# undef __DECL_SIMD_exp
54# define __DECL_SIMD_exp __DECL_SIMD_x86_64
55# undef __DECL_SIMD_expf
56# define __DECL_SIMD_expf __DECL_SIMD_x86_64
57# undef __DECL_SIMD_pow
58# define __DECL_SIMD_pow __DECL_SIMD_x86_64
59# undef __DECL_SIMD_powf
60# define __DECL_SIMD_powf __DECL_SIMD_x86_64
61
62# endif
63#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/mman.h created+34
......@@ -0,0 +1,34 @@
1/* Definitions for POSIX memory map interface. Linux/x86_64 version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_MMAN_H
20# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
21#endif
22
23/* The following definitions basically come from the kernel headers.
24 But the kernel header is not namespace clean. */
25
26/* Other flags. */
27#ifdef __USE_MISC
28# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */
29#endif
30
31#include <bits/mman-map-flags-generic.h>
32
33/* Include generic Linux declarations. */
34#include <bits/mman-linux.h>
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/procfs-id.h created+30
......@@ -0,0 +1,30 @@
1/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <https://www.gnu.org/licenses/>. */
19
20#ifndef _SYS_PROCFS_H
21# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
22#endif
23
24#if __WORDSIZE == 32
25typedef unsigned short int __pr_uid_t;
26typedef unsigned short int __pr_gid_t;
27#else
28typedef unsigned int __pr_uid_t;
29typedef unsigned int __pr_gid_t;
30#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/procfs.h created+50
......@@ -0,0 +1,50 @@
1/* Types for registers for sys/procfs.h. x86 version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_PROCFS_H
20# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
21#endif
22
23/* Type for a general-purpose register. */
24#ifdef __x86_64__
25__extension__ typedef unsigned long long elf_greg_t;
26#else
27typedef unsigned long elf_greg_t;
28#endif
29
30/* And the whole bunch of them. We could have used `struct
31 user_regs_struct' directly in the typedef, but tradition says that
32 the register set is an array, which does have some peculiar
33 semantics, so leave it that way. */
34#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
35typedef elf_greg_t elf_gregset_t[ELF_NGREG];
36
37#ifndef __x86_64__
38/* Register set for the floating-point registers. */
39typedef struct user_fpregs_struct elf_fpregset_t;
40
41/* Register set for the extended floating-point registers. Includes
42 the Pentium III SSE registers in addition to the classic
43 floating-point stuff. */
44typedef struct user_fpxregs_struct elf_fpxregset_t;
45#else
46/* Register set for the extended floating-point registers. Includes
47 the Pentium III SSE registers in addition to the classic
48 floating-point stuff. */
49typedef struct user_fpregs_struct elf_fpregset_t;
50#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/pthreadtypes-arch.h created+55
......@@ -0,0 +1,55 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _BITS_PTHREADTYPES_ARCH_H
19#define _BITS_PTHREADTYPES_ARCH_H 1
20
21#include <bits/wordsize.h>
22
23#ifdef __x86_64__
24# if __WORDSIZE == 64
25# define __SIZEOF_PTHREAD_MUTEX_T 40
26# define __SIZEOF_PTHREAD_ATTR_T 56
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29# else
30# define __SIZEOF_PTHREAD_MUTEX_T 32
31# define __SIZEOF_PTHREAD_ATTR_T 32
32# define __SIZEOF_PTHREAD_RWLOCK_T 44
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34# endif
35#else
36# define __SIZEOF_PTHREAD_MUTEX_T 24
37# define __SIZEOF_PTHREAD_ATTR_T 36
38# define __SIZEOF_PTHREAD_RWLOCK_T 32
39# define __SIZEOF_PTHREAD_BARRIER_T 20
40#endif
41#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
42#define __SIZEOF_PTHREAD_COND_T 48
43#define __SIZEOF_PTHREAD_CONDATTR_T 4
44#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
45#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
46
47#define __LOCK_ALIGNMENT
48#define __ONCE_ALIGNMENT
49
50#ifndef __x86_64__
51/* Extra attributes for the cleanup functions. */
52# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
53#endif
54
55#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/setjmp.h created+40
......@@ -0,0 +1,40 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18/* Define the machine-dependent type `jmp_buf'. x86-64 version. */
19#ifndef _BITS_SETJMP_H
20#define _BITS_SETJMP_H 1
21
22#if !defined _SETJMP_H && !defined _PTHREAD_H
23# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
24#endif
25
26#include <bits/wordsize.h>
27
28#ifndef _ASM
29
30# if __WORDSIZE == 64
31typedef long int __jmp_buf[8];
32# elif defined __x86_64__
33__extension__ typedef long long int __jmp_buf[8];
34# else
35typedef int __jmp_buf[6];
36# endif
37
38#endif
39
40#endif /* bits/setjmp.h */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/sigcontext.h created+196
......@@ -0,0 +1,196 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _BITS_SIGCONTEXT_H
19#define _BITS_SIGCONTEXT_H 1
20
21#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
22# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
23#endif
24
25#include <bits/types.h>
26
27#define FP_XSTATE_MAGIC1 0x46505853U
28#define FP_XSTATE_MAGIC2 0x46505845U
29#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2)
30
31struct _fpx_sw_bytes
32{
33 __uint32_t magic1;
34 __uint32_t extended_size;
35 __uint64_t xstate_bv;
36 __uint32_t xstate_size;
37 __uint32_t __glibc_reserved1[7];
38};
39
40struct _fpreg
41{
42 unsigned short significand[4];
43 unsigned short exponent;
44};
45
46struct _fpxreg
47{
48 unsigned short significand[4];
49 unsigned short exponent;
50 unsigned short __glibc_reserved1[3];
51};
52
53struct _xmmreg
54{
55 __uint32_t element[4];
56};
57
58
59
60#ifndef __x86_64__
61
62struct _fpstate
63{
64 /* Regular FPU environment. */
65 __uint32_t cw;
66 __uint32_t sw;
67 __uint32_t tag;
68 __uint32_t ipoff;
69 __uint32_t cssel;
70 __uint32_t dataoff;
71 __uint32_t datasel;
72 struct _fpreg _st[8];
73 unsigned short status;
74 unsigned short magic;
75
76 /* FXSR FPU environment. */
77 __uint32_t _fxsr_env[6];
78 __uint32_t mxcsr;
79 __uint32_t __glibc_reserved1;
80 struct _fpxreg _fxsr_st[8];
81 struct _xmmreg _xmm[8];
82 __uint32_t __glibc_reserved2[56];
83};
84
85#ifndef sigcontext_struct
86/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
87 we need sigcontext. Some packages have come to rely on
88 sigcontext_struct being defined on 32-bit x86, so define this for
89 their benefit. */
90# define sigcontext_struct sigcontext
91#endif
92
93#define X86_FXSR_MAGIC 0x0000
94
95struct sigcontext
96{
97 unsigned short gs, __gsh;
98 unsigned short fs, __fsh;
99 unsigned short es, __esh;
100 unsigned short ds, __dsh;
101 unsigned long edi;
102 unsigned long esi;
103 unsigned long ebp;
104 unsigned long esp;
105 unsigned long ebx;
106 unsigned long edx;
107 unsigned long ecx;
108 unsigned long eax;
109 unsigned long trapno;
110 unsigned long err;
111 unsigned long eip;
112 unsigned short cs, __csh;
113 unsigned long eflags;
114 unsigned long esp_at_signal;
115 unsigned short ss, __ssh;
116 struct _fpstate * fpstate;
117 unsigned long oldmask;
118 unsigned long cr2;
119};
120
121#else /* __x86_64__ */
122
123struct _fpstate
124{
125 /* FPU environment matching the 64-bit FXSAVE layout. */
126 __uint16_t cwd;
127 __uint16_t swd;
128 __uint16_t ftw;
129 __uint16_t fop;
130 __uint64_t rip;
131 __uint64_t rdp;
132 __uint32_t mxcsr;
133 __uint32_t mxcr_mask;
134 struct _fpxreg _st[8];
135 struct _xmmreg _xmm[16];
136 __uint32_t __glibc_reserved1[24];
137};
138
139struct sigcontext
140{
141 __uint64_t r8;
142 __uint64_t r9;
143 __uint64_t r10;
144 __uint64_t r11;
145 __uint64_t r12;
146 __uint64_t r13;
147 __uint64_t r14;
148 __uint64_t r15;
149 __uint64_t rdi;
150 __uint64_t rsi;
151 __uint64_t rbp;
152 __uint64_t rbx;
153 __uint64_t rdx;
154 __uint64_t rax;
155 __uint64_t rcx;
156 __uint64_t rsp;
157 __uint64_t rip;
158 __uint64_t eflags;
159 unsigned short cs;
160 unsigned short gs;
161 unsigned short fs;
162 unsigned short __pad0;
163 __uint64_t err;
164 __uint64_t trapno;
165 __uint64_t oldmask;
166 __uint64_t cr2;
167 __extension__ union
168 {
169 struct _fpstate * fpstate;
170 __uint64_t __fpstate_word;
171 };
172 __uint64_t __reserved1 [8];
173};
174
175#endif /* __x86_64__ */
176
177struct _xsave_hdr
178{
179 __uint64_t xstate_bv;
180 __uint64_t __glibc_reserved1[2];
181 __uint64_t __glibc_reserved2[5];
182};
183
184struct _ymmh_state
185{
186 __uint32_t ymmh_space[64];
187};
188
189struct _xstate
190{
191 struct _fpstate fpstate;
192 struct _xsave_hdr xstate_hdr;
193 struct _ymmh_state ymmh;
194};
195
196#endif /* _BITS_SIGCONTEXT_H */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/siginfo-arch.h created+17
......@@ -0,0 +1,17 @@
1/* Architecture-specific adjustments to siginfo_t. x86 version. */
2#ifndef _BITS_SIGINFO_ARCH_H
3#define _BITS_SIGINFO_ARCH_H 1
4
5#if defined __x86_64__ && __WORDSIZE == 32
6/* si_utime and si_stime must be 4 byte aligned for x32 to match the
7 kernel. We align siginfo_t to 8 bytes so that si_utime and
8 si_stime are actually aligned to 8 bytes since their offsets are
9 multiple of 8 bytes. Note: with some compilers, the alignment
10 attribute would be ignored if it were put in __SI_CLOCK_T instead
11 of encapsulated in a typedef. */
12typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t;
13# define __SI_ALIGNMENT __attribute__ ((__aligned__ (8)))
14# define __SI_CLOCK_T __sigchld_clock_t
15#endif
16
17#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/struct_mutex.h created+63
......@@ -0,0 +1,63 @@
1/* x86 internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#ifdef __x86_64__
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#ifdef __x86_64__
34 short __spins;
35 short __elision;
36 __pthread_list_t __list;
37# define __PTHREAD_MUTEX_HAVE_PREV 1
38#else
39 unsigned int __nusers;
40 __extension__ union
41 {
42 struct
43 {
44 short __espins;
45 short __eelision;
46# define __spins __elision_data.__espins
47# define __elision __elision_data.__eelision
48 } __elision_data;
49 __pthread_slist_t __list;
50 };
51# define __PTHREAD_MUTEX_HAVE_PREV 0
52#endif
53};
54
55#ifdef __x86_64__
56# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
57 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
58#else
59# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
60 0, 0, 0, __kind, 0, { { 0, 0 } }
61#endif
62
63#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/struct_rwlock.h created+65
......@@ -0,0 +1,65 @@
1/* x86 internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#ifdef __x86_64__
32 int __cur_writer;
33 int __shared;
34 signed char __rwelision;
35# ifdef __ILP32__
36 unsigned char __pad1[3];
37# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
38# else
39 unsigned char __pad1[7];
40# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
41# endif
42 unsigned long int __pad2;
43 /* FLAGS must stay at this position in the structure to maintain
44 binary compatibility. */
45 unsigned int __flags;
46#else /* __x86_64__ */
47 /* FLAGS must stay at this position in the structure to maintain
48 binary compatibility. */
49 unsigned char __flags;
50 unsigned char __shared;
51 signed char __rwelision;
52 unsigned char __pad2;
53 int __cur_writer;
54#endif
55};
56
57#ifdef __x86_64__
58# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
59 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
60#else
61# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
62 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
63#endif
64
65#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/struct_stat.h created+165
......@@ -0,0 +1,165 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
18
19#if !defined _SYS_STAT_H && !defined _FCNTL_H
20# error "Never include <bits/struct_stat.h> directly; use <sys/stat.h> instead."
21#endif
22
23#ifndef _BITS_STRUCT_STAT_H
24#define _BITS_STRUCT_STAT_H 1
25
26struct stat
27 {
28#ifdef __USE_TIME_BITS64
29# include <bits/struct_stat_time64_helper.h>
30#else
31 __dev_t st_dev; /* Device. */
32# ifndef __x86_64__
33 unsigned short int __pad1;
34# endif
35# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
36 __ino_t st_ino; /* File serial number. */
37# else
38 __ino_t __st_ino; /* 32bit file serial number. */
39# endif
40# ifndef __x86_64__
41 __mode_t st_mode; /* File mode. */
42 __nlink_t st_nlink; /* Link count. */
43# else
44 __nlink_t st_nlink; /* Link count. */
45 __mode_t st_mode; /* File mode. */
46# endif
47 __uid_t st_uid; /* User ID of the file's owner. */
48 __gid_t st_gid; /* Group ID of the file's group.*/
49# ifdef __x86_64__
50 int __pad0;
51# endif
52 __dev_t st_rdev; /* Device number, if device. */
53# ifndef __x86_64__
54 unsigned short int __pad2;
55# endif
56# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
57 __off_t st_size; /* Size of file, in bytes. */
58# else
59 __off64_t st_size; /* Size of file, in bytes. */
60# endif
61 __blksize_t st_blksize; /* Optimal block size for I/O. */
62# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
63 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
64# else
65 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
66# endif
67# ifdef __USE_XOPEN2K8
68 /* Nanosecond resolution timestamps are stored in a format
69 equivalent to 'struct timespec'. This is the type used
70 whenever possible but the Unix namespace rules do not allow the
71 identifier 'timespec' to appear in the <sys/stat.h> header.
72 Therefore we have to handle the use of this header in strictly
73 standard-compliant sources special. */
74 struct timespec st_atim; /* Time of last access. */
75 struct timespec st_mtim; /* Time of last modification. */
76 struct timespec st_ctim; /* Time of last status change. */
77# define st_atime st_atim.tv_sec /* Backward compatibility. */
78# define st_mtime st_mtim.tv_sec
79# define st_ctime st_ctim.tv_sec
80# else
81 __time_t st_atime; /* Time of last access. */
82 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
83 __time_t st_mtime; /* Time of last modification. */
84 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
85 __time_t st_ctime; /* Time of last status change. */
86 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
87# endif
88# ifdef __x86_64__
89 __syscall_slong_t __glibc_reserved[3];
90# else
91# ifndef __USE_FILE_OFFSET64
92 unsigned long int __glibc_reserved4;
93 unsigned long int __glibc_reserved5;
94# else
95 __ino64_t st_ino; /* File serial number. */
96# endif
97# endif
98#endif /* __USE_TIME_BITS64 */
99 };
100
101#ifdef __USE_LARGEFILE64
102/* Note stat64 has the same shape as stat for x86-64. */
103struct stat64
104 {
105# ifdef __USE_TIME_BITS64
106# include <bits/struct_stat_time64_helper.h>
107# else
108 __dev_t st_dev; /* Device. */
109# ifdef __x86_64__
110 __ino64_t st_ino; /* File serial number. */
111 __nlink_t st_nlink; /* Link count. */
112 __mode_t st_mode; /* File mode. */
113# else
114 unsigned int __pad1;
115 __ino_t __st_ino; /* 32bit file serial number. */
116 __mode_t st_mode; /* File mode. */
117 __nlink_t st_nlink; /* Link count. */
118# endif
119 __uid_t st_uid; /* User ID of the file's owner. */
120 __gid_t st_gid; /* Group ID of the file's group.*/
121# ifdef __x86_64__
122 int __pad0;
123 __dev_t st_rdev; /* Device number, if device. */
124 __off_t st_size; /* Size of file, in bytes. */
125# else
126 __dev_t st_rdev; /* Device number, if device. */
127 unsigned int __pad2;
128 __off64_t st_size; /* Size of file, in bytes. */
129# endif
130 __blksize_t st_blksize; /* Optimal block size for I/O. */
131 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
132# ifdef __USE_XOPEN2K8
133 /* Nanosecond resolution timestamps are stored in a format
134 equivalent to 'struct timespec'. This is the type used
135 whenever possible but the Unix namespace rules do not allow the
136 identifier 'timespec' to appear in the <sys/stat.h> header.
137 Therefore we have to handle the use of this header in strictly
138 standard-compliant sources special. */
139 struct timespec st_atim; /* Time of last access. */
140 struct timespec st_mtim; /* Time of last modification. */
141 struct timespec st_ctim; /* Time of last status change. */
142# else
143 __time_t st_atime; /* Time of last access. */
144 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
145 __time_t st_mtime; /* Time of last modification. */
146 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
147 __time_t st_ctime; /* Time of last status change. */
148 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
149# endif
150# ifdef __x86_64__
151 __syscall_slong_t __glibc_reserved[3];
152# else
153 __ino64_t st_ino; /* File serial number. */
154# endif
155# endif /* __USE_TIME_BITS64 */
156 };
157#endif
158
159/* Tell code we have these members. */
160#define _STATBUF_ST_BLKSIZE
161#define _STATBUF_ST_RDEV
162/* Nanosecond resolution time values are supported. */
163#define _STATBUF_ST_NSEC
164
165#endif /* _BITS_STRUCT_STAT_H */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/timesize.h created+25
......@@ -0,0 +1,25 @@
1/* Bit size of the time_t type at glibc build time, x86-64 and x32 case.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#if defined __x86_64__ && defined __ILP32__
20/* For x32, time is 64-bit even though word size is 32-bit. */
21# define __TIMESIZE 64
22#else
23/* For others, time size is word size. */
24# define __TIMESIZE __WORDSIZE
25#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/types/struct_semid_ds.h created+38
......@@ -0,0 +1,38 @@
1/* x86 implementation of the semaphore struct semid_ds.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_SEM_H
20# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead."
21#endif
22
23/* Data structure describing a set of semaphores. */
24struct semid_ds
25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
29 struct ipc_perm sem_perm; /* operation permission struct */
30 __time_t sem_otime; /* last semop() time */
31 __syscall_ulong_t __sem_otime_high;
32 __time_t sem_ctime; /* last time changed by semctl() */
33 __syscall_ulong_t __sem_ctime_high;
34 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
35 __syscall_ulong_t __glibc_reserved3;
36 __syscall_ulong_t __glibc_reserved4;
37#endif
38};
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/typesizes.h created+106
......@@ -0,0 +1,106 @@
1/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28
29/* X32 kernel interface is 64-bit. */
30#if defined __x86_64__ && defined __ILP32__
31# define __SYSCALL_SLONG_TYPE __SQUAD_TYPE
32# define __SYSCALL_ULONG_TYPE __UQUAD_TYPE
33#else
34# define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
35# define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
36#endif
37
38#define __DEV_T_TYPE __UQUAD_TYPE
39#define __UID_T_TYPE __U32_TYPE
40#define __GID_T_TYPE __U32_TYPE
41#define __INO_T_TYPE __SYSCALL_ULONG_TYPE
42#define __INO64_T_TYPE __UQUAD_TYPE
43#define __MODE_T_TYPE __U32_TYPE
44#ifdef __x86_64__
45# define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
46# define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
47#else
48# define __NLINK_T_TYPE __UWORD_TYPE
49# define __FSWORD_T_TYPE __SWORD_TYPE
50#endif
51#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE
52#define __OFF64_T_TYPE __SQUAD_TYPE
53#define __PID_T_TYPE __S32_TYPE
54#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE
55#define __RLIM64_T_TYPE __UQUAD_TYPE
56#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE
57#define __BLKCNT64_T_TYPE __SQUAD_TYPE
58#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE
59#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
60#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE
61#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
62#define __ID_T_TYPE __U32_TYPE
63#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE
64#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
67#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
68#define __DADDR_T_TYPE __S32_TYPE
69#define __KEY_T_TYPE __S32_TYPE
70#define __CLOCKID_T_TYPE __S32_TYPE
71#define __TIMER_T_TYPE void *
72#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE
73#define __FSID_T_TYPE struct { int __val[2]; }
74#define __SSIZE_T_TYPE __SWORD_TYPE
75#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE
76
77#ifdef __x86_64__
78/* Tell the libc code that off_t and off64_t are actually the same type
79 for all ABI purposes, even if possibly expressed as different base types
80 for C type-checking purposes. */
81# define __OFF_T_MATCHES_OFF64_T 1
82
83/* Same for ino_t and ino64_t. */
84# define __INO_T_MATCHES_INO64_T 1
85
86/* And for __rlim_t and __rlim64_t. */
87# define __RLIM_T_MATCHES_RLIM64_T 1
88
89/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
90# define __STATFS_MATCHES_STATFS64 1
91
92/* And for getitimer, setitimer and rusage */
93# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
94#else
95# define __RLIM_T_MATCHES_RLIM64_T 0
96
97# define __STATFS_MATCHES_STATFS64 0
98
99# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
100#endif
101
102/* Number of descriptors that can fit in an `fd_set'. */
103#define __FD_SETSIZE 1024
104
105
106#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/wordsize.h created+17
......@@ -0,0 +1,17 @@
1/* Determine the wordsize from the preprocessor defines. */
2
3#if defined __x86_64__ && !defined __ILP32__
4# define __WORDSIZE 64
5#else
6# define __WORDSIZE 32
7#define __WORDSIZE32_SIZE_ULONG 0
8#define __WORDSIZE32_PTRDIFF_LONG 0
9#endif
10
11#ifdef __x86_64__
12# define __WORDSIZE_TIME64_COMPAT32 1
13/* Both x86-64 and x32 use the 64-bit system call interface. */
14# define __SYSCALL_WORDSIZE 64
15#else
16# define __WORDSIZE_TIME64_COMPAT32 0
17#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/finclude/math-vector-fortran.h created+43
......@@ -0,0 +1,43 @@
1! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 2019-2021 Free Software Foundation, Inc.
3! This file is part of the GNU C Library.
4!
5! The GNU C Library is free software; you can redistribute it and/or
6! modify it under the terms of the GNU Lesser General Public
7! License as published by the Free Software Foundation; either
8! version 2.1 of the License, or (at your option) any later version.
9!
10! The GNU C Library is distributed in the hope that it will be useful,
11! but WITHOUT ANY WARRANTY; without even the implied warranty of
12! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13! Lesser General Public License for more details.
14!
15! You should have received a copy of the GNU Lesser General Public
16! License along with the GNU C Library; if not, see
17! <https://www.gnu.org/licenses/>.
18
19!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
20!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
21!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64')
22!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')
23!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64')
24!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64')
25!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64')
26!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64')
27!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64')
28!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
29!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
30!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31
32!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
33!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
34!GCC$ builtin (sin) attributes simd (notinbranch) if('x32')
35!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32')
36!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32')
37!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32')
38!GCC$ builtin (log) attributes simd (notinbranch) if('x32')
39!GCC$ builtin (logf) attributes simd (notinbranch) if('x32')
40!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
41!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
42!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/x86-linux-gnu/fpu_control.h created+109
......@@ -0,0 +1,109 @@
1/* FPU control word bits. x86 version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Olaf Flebbe.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <https://www.gnu.org/licenses/>. */
19
20#ifndef _FPU_CONTROL_H
21#define _FPU_CONTROL_H 1
22
23/* Note that this file sets on x86-64 only the x87 FPU, it does not
24 touch the SSE unit. */
25
26/* Here is the dirty part. Set up your 387 through the control word
27 * (cw) register.
28 *
29 * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0
30 * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM
31 *
32 * IM: Invalid operation mask
33 * DM: Denormalized operand mask
34 * ZM: Zero-divide mask
35 * OM: Overflow mask
36 * UM: Underflow mask
37 * PM: Precision (inexact result) mask
38 *
39 * Mask bit is 1 means no interrupt.
40 *
41 * PC: Precision control
42 * 11 - round to extended precision
43 * 10 - round to double precision
44 * 00 - round to single precision
45 *
46 * RC: Rounding control
47 * 00 - rounding to nearest
48 * 01 - rounding down (toward - infinity)
49 * 10 - rounding up (toward + infinity)
50 * 11 - rounding toward zero
51 *
52 * IC: Infinity control
53 * That is for 8087 and 80287 only.
54 *
55 * The hardware default is 0x037f which we use.
56 */
57
58#include <features.h>
59
60/* masking of interrupts */
61#define _FPU_MASK_IM 0x01
62#define _FPU_MASK_DM 0x02
63#define _FPU_MASK_ZM 0x04
64#define _FPU_MASK_OM 0x08
65#define _FPU_MASK_UM 0x10
66#define _FPU_MASK_PM 0x20
67
68/* precision control */
69#define _FPU_EXTENDED 0x300 /* libm requires double extended precision. */
70#define _FPU_DOUBLE 0x200
71#define _FPU_SINGLE 0x0
72
73/* rounding control */
74#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
75#define _FPU_RC_DOWN 0x400
76#define _FPU_RC_UP 0x800
77#define _FPU_RC_ZERO 0xC00
78
79#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */
80
81
82/* The fdlibm code requires strict IEEE double precision arithmetic,
83 and no interrupts for exceptions, rounding to nearest. */
84
85#define _FPU_DEFAULT 0x037f
86
87/* IEEE: same as above. */
88#define _FPU_IEEE 0x037f
89
90/* Type of the control word. */
91typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
92
93/* Macros for accessing the hardware control word. "*&" is used to
94 work around a bug in older versions of GCC. __volatile__ is used
95 to support combination of writing the control register and reading
96 it back. Without __volatile__, the old value may be used for reading
97 back under compiler optimization.
98
99 Note that the use of these macros is not sufficient anymore with
100 recent hardware nor on x86-64. Some floating point operations are
101 executed in the SSE/SSE2 engines which have their own control and
102 status register. */
103#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
104#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
105
106/* Default control word set at startup. */
107extern fpu_control_t __fpu_control;
108
109#endif /* fpu_control.h */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/gnu/lib-names.h created+17
......@@ -0,0 +1,17 @@
1/* This file is automatically generated.
2 It defines macros to allow user program to find the shared
3 library files which come as part of GNU libc. */
4#ifndef __GNU_LIB_NAMES_H
5#define __GNU_LIB_NAMES_H 1
6
7#if !defined __x86_64__
8# include <gnu/lib-names-32.h>
9#endif
10#if defined __x86_64__ && defined __LP64__
11# include <gnu/lib-names-64.h>
12#endif
13#if defined __x86_64__ && defined __ILP32__
14# include <gnu/lib-names-x32.h>
15#endif
16
17#endif /* gnu/lib-names.h */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/gnu/stubs.h created+14
......@@ -0,0 +1,14 @@
1/* This file is automatically generated.
2 This file selects the right generated file of `__stub_FUNCTION' macros
3 based on the architecture being compiled for. */
4
5
6#if !defined __x86_64__
7# include <gnu/stubs-32.h>
8#endif
9#if defined __x86_64__ && defined __LP64__
10# include <gnu/stubs-64.h>
11#endif
12#if defined __x86_64__ && defined __ILP32__
13# include <gnu/stubs-x32.h>
14#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/sys/elf.h created+29
......@@ -0,0 +1,29 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_ELF_H
19#define _SYS_ELF_H 1
20
21#ifdef __x86_64__
22# error This header is unsupported on x86-64.
23#else
24# warning "This header is obsolete; use <sys/procfs.h> instead."
25
26# include <sys/procfs.h>
27#endif
28
29#endif /* _SYS_ELF_H */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/sys/ptrace.h created+202
......@@ -0,0 +1,202 @@
1/* `ptrace' debugger support interface. Linux/x86 version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <https://www.gnu.org/licenses/>. */
19
20#ifndef _SYS_PTRACE_H
21#define _SYS_PTRACE_H 1
22
23#include <features.h>
24#include <bits/types.h>
25
26__BEGIN_DECLS
27
28/* Type of the REQUEST argument to `ptrace.' */
29enum __ptrace_request
30{
31 /* Indicate that the process making this request should be traced.
32 All signals received by this process can be intercepted by its
33 parent, and its parent can use the other `ptrace' requests. */
34 PTRACE_TRACEME = 0,
35#define PT_TRACE_ME PTRACE_TRACEME
36
37 /* Return the word in the process's text space at address ADDR. */
38 PTRACE_PEEKTEXT = 1,
39#define PT_READ_I PTRACE_PEEKTEXT
40
41 /* Return the word in the process's data space at address ADDR. */
42 PTRACE_PEEKDATA = 2,
43#define PT_READ_D PTRACE_PEEKDATA
44
45 /* Return the word in the process's user area at offset ADDR. */
46 PTRACE_PEEKUSER = 3,
47#define PT_READ_U PTRACE_PEEKUSER
48
49 /* Write the word DATA into the process's text space at address ADDR. */
50 PTRACE_POKETEXT = 4,
51#define PT_WRITE_I PTRACE_POKETEXT
52
53 /* Write the word DATA into the process's data space at address ADDR. */
54 PTRACE_POKEDATA = 5,
55#define PT_WRITE_D PTRACE_POKEDATA
56
57 /* Write the word DATA into the process's user area at offset ADDR. */
58 PTRACE_POKEUSER = 6,
59#define PT_WRITE_U PTRACE_POKEUSER
60
61 /* Continue the process. */
62 PTRACE_CONT = 7,
63#define PT_CONTINUE PTRACE_CONT
64
65 /* Kill the process. */
66 PTRACE_KILL = 8,
67#define PT_KILL PTRACE_KILL
68
69 /* Single step the process. */
70 PTRACE_SINGLESTEP = 9,
71#define PT_STEP PTRACE_SINGLESTEP
72
73 /* Get all general purpose registers used by a processes. */
74 PTRACE_GETREGS = 12,
75#define PT_GETREGS PTRACE_GETREGS
76
77 /* Set all general purpose registers used by a processes. */
78 PTRACE_SETREGS = 13,
79#define PT_SETREGS PTRACE_SETREGS
80
81 /* Get all floating point registers used by a processes. */
82 PTRACE_GETFPREGS = 14,
83#define PT_GETFPREGS PTRACE_GETFPREGS
84
85 /* Set all floating point registers used by a processes. */
86 PTRACE_SETFPREGS = 15,
87#define PT_SETFPREGS PTRACE_SETFPREGS
88
89 /* Attach to a process that is already running. */
90 PTRACE_ATTACH = 16,
91#define PT_ATTACH PTRACE_ATTACH
92
93 /* Detach from a process attached to with PTRACE_ATTACH. */
94 PTRACE_DETACH = 17,
95#define PT_DETACH PTRACE_DETACH
96
97 /* Get all extended floating point registers used by a processes. */
98 PTRACE_GETFPXREGS = 18,
99#define PT_GETFPXREGS PTRACE_GETFPXREGS
100
101 /* Set all extended floating point registers used by a processes. */
102 PTRACE_SETFPXREGS = 19,
103#define PT_SETFPXREGS PTRACE_SETFPXREGS
104
105 /* Continue and stop at the next entry to or return from syscall. */
106 PTRACE_SYSCALL = 24,
107#define PT_SYSCALL PTRACE_SYSCALL
108
109 /* Get a TLS entry in the GDT. */
110 PTRACE_GET_THREAD_AREA = 25,
111#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
112
113 /* Change a TLS entry in the GDT. */
114 PTRACE_SET_THREAD_AREA = 26,
115#define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA
116
117#ifdef __x86_64__
118 /* Access TLS data. */
119 PTRACE_ARCH_PRCTL = 30,
120# define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL
121#endif
122
123 /* Continue and stop at the next syscall, it will not be executed. */
124 PTRACE_SYSEMU = 31,
125#define PT_SYSEMU PTRACE_SYSEMU
126
127 /* Single step the process, the next syscall will not be executed. */
128 PTRACE_SYSEMU_SINGLESTEP = 32,
129#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
130
131 /* Execute process until next taken branch. */
132 PTRACE_SINGLEBLOCK = 33,
133#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
134
135 /* Set ptrace filter options. */
136 PTRACE_SETOPTIONS = 0x4200,
137#define PT_SETOPTIONS PTRACE_SETOPTIONS
138
139 /* Get last ptrace message. */
140 PTRACE_GETEVENTMSG = 0x4201,
141#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
142
143 /* Get siginfo for process. */
144 PTRACE_GETSIGINFO = 0x4202,
145#define PT_GETSIGINFO PTRACE_GETSIGINFO
146
147 /* Set new siginfo for process. */
148 PTRACE_SETSIGINFO = 0x4203,
149#define PT_SETSIGINFO PTRACE_SETSIGINFO
150
151 /* Get register content. */
152 PTRACE_GETREGSET = 0x4204,
153#define PTRACE_GETREGSET PTRACE_GETREGSET
154
155 /* Set register content. */
156 PTRACE_SETREGSET = 0x4205,
157#define PTRACE_SETREGSET PTRACE_SETREGSET
158
159 /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
160 signal or group stop state. */
161 PTRACE_SEIZE = 0x4206,
162#define PTRACE_SEIZE PTRACE_SEIZE
163
164 /* Trap seized tracee. */
165 PTRACE_INTERRUPT = 0x4207,
166#define PTRACE_INTERRUPT PTRACE_INTERRUPT
167
168 /* Wait for next group event. */
169 PTRACE_LISTEN = 0x4208,
170#define PTRACE_LISTEN PTRACE_LISTEN
171
172 /* Retrieve siginfo_t structures without removing signals from a queue. */
173 PTRACE_PEEKSIGINFO = 0x4209,
174#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
175
176 /* Get the mask of blocked signals. */
177 PTRACE_GETSIGMASK = 0x420a,
178#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
179
180 /* Change the mask of blocked signals. */
181 PTRACE_SETSIGMASK = 0x420b,
182#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
183
184 /* Get seccomp BPF filters. */
185 PTRACE_SECCOMP_GET_FILTER = 0x420c,
186#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
187
188 /* Get seccomp BPF filter metadata. */
189 PTRACE_SECCOMP_GET_METADATA = 0x420d,
190#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
191
192 /* Get information about system call. */
193 PTRACE_GET_SYSCALL_INFO = 0x420e
194#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
195};
196
197
198#include <bits/ptrace-shared.h>
199
200__END_DECLS
201
202#endif /* _SYS_PTRACE_H */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/sys/ucontext.h created+262
......@@ -0,0 +1,262 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_UCONTEXT_H
19#define _SYS_UCONTEXT_H 1
20
21#include <features.h>
22
23#include <bits/types.h>
24#include <bits/types/sigset_t.h>
25#include <bits/types/stack_t.h>
26
27
28#ifdef __USE_MISC
29# define __ctx(fld) fld
30#else
31# define __ctx(fld) __ ## fld
32#endif
33
34#ifdef __x86_64__
35
36/* Type for general register. */
37__extension__ typedef long long int greg_t;
38
39/* Number of general registers. */
40#define __NGREG 23
41#ifdef __USE_MISC
42# define NGREG __NGREG
43#endif
44
45/* Container for all general registers. */
46typedef greg_t gregset_t[__NGREG];
47
48#ifdef __USE_GNU
49/* Number of each register in the `gregset_t' array. */
50enum
51{
52 REG_R8 = 0,
53# define REG_R8 REG_R8
54 REG_R9,
55# define REG_R9 REG_R9
56 REG_R10,
57# define REG_R10 REG_R10
58 REG_R11,
59# define REG_R11 REG_R11
60 REG_R12,
61# define REG_R12 REG_R12
62 REG_R13,
63# define REG_R13 REG_R13
64 REG_R14,
65# define REG_R14 REG_R14
66 REG_R15,
67# define REG_R15 REG_R15
68 REG_RDI,
69# define REG_RDI REG_RDI
70 REG_RSI,
71# define REG_RSI REG_RSI
72 REG_RBP,
73# define REG_RBP REG_RBP
74 REG_RBX,
75# define REG_RBX REG_RBX
76 REG_RDX,
77# define REG_RDX REG_RDX
78 REG_RAX,
79# define REG_RAX REG_RAX
80 REG_RCX,
81# define REG_RCX REG_RCX
82 REG_RSP,
83# define REG_RSP REG_RSP
84 REG_RIP,
85# define REG_RIP REG_RIP
86 REG_EFL,
87# define REG_EFL REG_EFL
88 REG_CSGSFS, /* Actually short cs, gs, fs, __pad0. */
89# define REG_CSGSFS REG_CSGSFS
90 REG_ERR,
91# define REG_ERR REG_ERR
92 REG_TRAPNO,
93# define REG_TRAPNO REG_TRAPNO
94 REG_OLDMASK,
95# define REG_OLDMASK REG_OLDMASK
96 REG_CR2
97# define REG_CR2 REG_CR2
98};
99#endif
100
101struct _libc_fpxreg
102{
103 unsigned short int __ctx(significand)[4];
104 unsigned short int __ctx(exponent);
105 unsigned short int __glibc_reserved1[3];
106};
107
108struct _libc_xmmreg
109{
110 __uint32_t __ctx(element)[4];
111};
112
113struct _libc_fpstate
114{
115 /* 64-bit FXSAVE format. */
116 __uint16_t __ctx(cwd);
117 __uint16_t __ctx(swd);
118 __uint16_t __ctx(ftw);
119 __uint16_t __ctx(fop);
120 __uint64_t __ctx(rip);
121 __uint64_t __ctx(rdp);
122 __uint32_t __ctx(mxcsr);
123 __uint32_t __ctx(mxcr_mask);
124 struct _libc_fpxreg _st[8];
125 struct _libc_xmmreg _xmm[16];
126 __uint32_t __glibc_reserved1[24];
127};
128
129/* Structure to describe FPU registers. */
130typedef struct _libc_fpstate *fpregset_t;
131
132/* Context to describe whole processor state. */
133typedef struct
134 {
135 gregset_t __ctx(gregs);
136 /* Note that fpregs is a pointer. */
137 fpregset_t __ctx(fpregs);
138 __extension__ unsigned long long __reserved1 [8];
139} mcontext_t;
140
141/* Userlevel context. */
142typedef struct ucontext_t
143 {
144 unsigned long int __ctx(uc_flags);
145 struct ucontext_t *uc_link;
146 stack_t uc_stack;
147 mcontext_t uc_mcontext;
148 sigset_t uc_sigmask;
149 struct _libc_fpstate __fpregs_mem;
150 __extension__ unsigned long long int __ssp[4];
151 } ucontext_t;
152
153#else /* !__x86_64__ */
154
155/* Type for general register. */
156typedef int greg_t;
157
158/* Number of general registers. */
159#define __NGREG 19
160#ifdef __USE_MISC
161# define NGREG __NGREG
162#endif
163
164/* Container for all general registers. */
165typedef greg_t gregset_t[__NGREG];
166
167#ifdef __USE_GNU
168/* Number of each register is the `gregset_t' array. */
169enum
170{
171 REG_GS = 0,
172# define REG_GS REG_GS
173 REG_FS,
174# define REG_FS REG_FS
175 REG_ES,
176# define REG_ES REG_ES
177 REG_DS,
178# define REG_DS REG_DS
179 REG_EDI,
180# define REG_EDI REG_EDI
181 REG_ESI,
182# define REG_ESI REG_ESI
183 REG_EBP,
184# define REG_EBP REG_EBP
185 REG_ESP,
186# define REG_ESP REG_ESP
187 REG_EBX,
188# define REG_EBX REG_EBX
189 REG_EDX,
190# define REG_EDX REG_EDX
191 REG_ECX,
192# define REG_ECX REG_ECX
193 REG_EAX,
194# define REG_EAX REG_EAX
195 REG_TRAPNO,
196# define REG_TRAPNO REG_TRAPNO
197 REG_ERR,
198# define REG_ERR REG_ERR
199 REG_EIP,
200# define REG_EIP REG_EIP
201 REG_CS,
202# define REG_CS REG_CS
203 REG_EFL,
204# define REG_EFL REG_EFL
205 REG_UESP,
206# define REG_UESP REG_UESP
207 REG_SS
208# define REG_SS REG_SS
209};
210#endif
211
212/* Definitions taken from the kernel headers. */
213struct _libc_fpreg
214{
215 unsigned short int __ctx(significand)[4];
216 unsigned short int __ctx(exponent);
217};
218
219struct _libc_fpstate
220{
221 unsigned long int __ctx(cw);
222 unsigned long int __ctx(sw);
223 unsigned long int __ctx(tag);
224 unsigned long int __ctx(ipoff);
225 unsigned long int __ctx(cssel);
226 unsigned long int __ctx(dataoff);
227 unsigned long int __ctx(datasel);
228 struct _libc_fpreg _st[8];
229 unsigned long int __ctx(status);
230};
231
232/* Structure to describe FPU registers. */
233typedef struct _libc_fpstate *fpregset_t;
234
235/* Context to describe whole processor state. */
236typedef struct
237 {
238 gregset_t __ctx(gregs);
239 /* Due to Linux's history we have to use a pointer here. The SysV/i386
240 ABI requires a struct with the values. */
241 fpregset_t __ctx(fpregs);
242 unsigned long int __ctx(oldmask);
243 unsigned long int __ctx(cr2);
244 } mcontext_t;
245
246/* Userlevel context. */
247typedef struct ucontext_t
248 {
249 unsigned long int __ctx(uc_flags);
250 struct ucontext_t *uc_link;
251 stack_t uc_stack;
252 mcontext_t uc_mcontext;
253 sigset_t uc_sigmask;
254 struct _libc_fpstate __fpregs_mem;
255 unsigned long int __ssp[4];
256 } ucontext_t;
257
258#endif /* !__x86_64__ */
259
260#undef __ctx
261
262#endif /* sys/ucontext.h */
\ No newline at end of file
lib/libc/include/x86-linux-gnu/sys/user.h created+180
......@@ -0,0 +1,180 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_USER_H
19#define _SYS_USER_H 1
20
21/* The whole purpose of this file is for GDB and GDB only. Don't read
22 too much into it. Don't use it for anything other than GDB unless
23 you know what you are doing. */
24
25#ifdef __x86_64__
26
27struct user_fpregs_struct
28{
29 unsigned short int cwd;
30 unsigned short int swd;
31 unsigned short int ftw;
32 unsigned short int fop;
33 __extension__ unsigned long long int rip;
34 __extension__ unsigned long long int rdp;
35 unsigned int mxcsr;
36 unsigned int mxcr_mask;
37 unsigned int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
38 unsigned int xmm_space[64]; /* 16*16 bytes for each XMM-reg = 256 bytes */
39 unsigned int padding[24];
40};
41
42struct user_regs_struct
43{
44 __extension__ unsigned long long int r15;
45 __extension__ unsigned long long int r14;
46 __extension__ unsigned long long int r13;
47 __extension__ unsigned long long int r12;
48 __extension__ unsigned long long int rbp;
49 __extension__ unsigned long long int rbx;
50 __extension__ unsigned long long int r11;
51 __extension__ unsigned long long int r10;
52 __extension__ unsigned long long int r9;
53 __extension__ unsigned long long int r8;
54 __extension__ unsigned long long int rax;
55 __extension__ unsigned long long int rcx;
56 __extension__ unsigned long long int rdx;
57 __extension__ unsigned long long int rsi;
58 __extension__ unsigned long long int rdi;
59 __extension__ unsigned long long int orig_rax;
60 __extension__ unsigned long long int rip;
61 __extension__ unsigned long long int cs;
62 __extension__ unsigned long long int eflags;
63 __extension__ unsigned long long int rsp;
64 __extension__ unsigned long long int ss;
65 __extension__ unsigned long long int fs_base;
66 __extension__ unsigned long long int gs_base;
67 __extension__ unsigned long long int ds;
68 __extension__ unsigned long long int es;
69 __extension__ unsigned long long int fs;
70 __extension__ unsigned long long int gs;
71};
72
73struct user
74{
75 struct user_regs_struct regs;
76 int u_fpvalid;
77 struct user_fpregs_struct i387;
78 __extension__ unsigned long long int u_tsize;
79 __extension__ unsigned long long int u_dsize;
80 __extension__ unsigned long long int u_ssize;
81 __extension__ unsigned long long int start_code;
82 __extension__ unsigned long long int start_stack;
83 __extension__ long long int signal;
84 int reserved;
85 __extension__ union
86 {
87 struct user_regs_struct* u_ar0;
88 __extension__ unsigned long long int __u_ar0_word;
89 };
90 __extension__ union
91 {
92 struct user_fpregs_struct* u_fpstate;
93 __extension__ unsigned long long int __u_fpstate_word;
94 };
95 __extension__ unsigned long long int magic;
96 char u_comm [32];
97 __extension__ unsigned long long int u_debugreg [8];
98};
99
100#else
101/* These are the 32-bit x86 structures. */
102struct user_fpregs_struct
103{
104 long int cwd;
105 long int swd;
106 long int twd;
107 long int fip;
108 long int fcs;
109 long int foo;
110 long int fos;
111 long int st_space [20];
112};
113
114struct user_fpxregs_struct
115{
116 unsigned short int cwd;
117 unsigned short int swd;
118 unsigned short int twd;
119 unsigned short int fop;
120 long int fip;
121 long int fcs;
122 long int foo;
123 long int fos;
124 long int mxcsr;
125 long int reserved;
126 long int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
127 long int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
128 long int padding[56];
129};
130
131struct user_regs_struct
132{
133 long int ebx;
134 long int ecx;
135 long int edx;
136 long int esi;
137 long int edi;
138 long int ebp;
139 long int eax;
140 long int xds;
141 long int xes;
142 long int xfs;
143 long int xgs;
144 long int orig_eax;
145 long int eip;
146 long int xcs;
147 long int eflags;
148 long int esp;
149 long int xss;
150};
151
152struct user
153{
154 struct user_regs_struct regs;
155 int u_fpvalid;
156 struct user_fpregs_struct i387;
157 unsigned long int u_tsize;
158 unsigned long int u_dsize;
159 unsigned long int u_ssize;
160 unsigned long int start_code;
161 unsigned long int start_stack;
162 long int signal;
163 int reserved;
164 struct user_regs_struct* u_ar0;
165 struct user_fpregs_struct* u_fpstate;
166 unsigned long int magic;
167 char u_comm [32];
168 int u_debugreg [8];
169};
170#endif /* __x86_64__ */
171
172#define PAGE_SHIFT 12
173#define PAGE_SIZE (1UL << PAGE_SHIFT)
174#define PAGE_MASK (~(PAGE_SIZE-1))
175#define NBPG PAGE_SIZE
176#define UPAGES 1
177#define HOST_TEXT_START_ADDR (u.start_code)
178#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
179
180#endif /* _SYS_USER_H */
\ No newline at end of file