This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, hjl/pr14117, created. glibc-2.15-1099-g4c7c46b
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 31 May 2012 00:39:05 -0000
- Subject: GNU C Library master sources branch, hjl/pr14117, created. glibc-2.15-1099-g4c7c46b
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr14117 has been created
at 4c7c46b43e54556afafbafd465cb89e0f0787044 (commit)
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4c7c46b43e54556afafbafd465cb89e0f0787044
commit 4c7c46b43e54556afafbafd465cb89e0f0787044
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed May 30 17:38:26 2012 -0700
Add missing ChangeLog entries.
diff --git a/ChangeLog.fpu b/ChangeLog.fpu
index 419162b..eed5135 100644
--- a/ChangeLog.fpu
+++ b/ChangeLog.fpu
@@ -5,3 +5,5 @@
* sysdeps/i386/fpu/bits/mathinline.h: Likewise.
* sysdeps/x86_64/fpu/bits/fenv.h: Likewise.
* sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/x86/fpu/bits/fenv.h: New file.
+ * sysdeps/x86/fpu/bits/mathinline.h: Likewise.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa391b60c9e38b0eef904d77a2cd312ec9d441dd
commit fa391b60c9e38b0eef904d77a2cd312ec9d441dd
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed May 30 17:23:40 2012 -0700
Add sysdeps/x86/fpu/bits/{fenv.h,mathinline.h}
diff --git a/ChangeLog.fpu b/ChangeLog.fpu
new file mode 100644
index 0000000..419162b
--- /dev/null
+++ b/ChangeLog.fpu
@@ -0,0 +1,7 @@
+2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14117]
+ * sysdeps/i386/fpu/bits/fenv.h: Removed.
+ * sysdeps/i386/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/x86_64/fpu/bits/fenv.h: Likewise.
+ * sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
diff --git a/sysdeps/i386/fpu/Implies b/sysdeps/i386/fpu/Implies
new file mode 100644
index 0000000..2b745a3
--- /dev/null
+++ b/sysdeps/i386/fpu/Implies
@@ -0,0 +1 @@
+x86/fpu
diff --git a/sysdeps/i386/fpu/bits/fenv.h b/sysdeps/x86/fpu/bits/fenv.h
similarity index 92%
rename from sysdeps/i386/fpu/bits/fenv.h
rename to sysdeps/x86/fpu/bits/fenv.h
index e71ceb7..b2c01c4 100644
--- a/sysdeps/i386/fpu/bits/fenv.h
+++ b/sysdeps/x86/fpu/bits/fenv.h
@@ -19,7 +19,6 @@
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
-
/* Define bits representing the exception. We use the bit positions
of the appropriate bits in the FPU control word. */
enum
@@ -60,8 +59,10 @@ enum
typedef unsigned short int fexcept_t;
-/* Type representing floating-point environment. This function corresponds
- to the layout of the block written by the `fstenv'. */
+/* Type representing floating-point environment. This structure
+ corresponds to the layout of the block written by the `fstenv'
+ instruction and has additional fields for the contents of the MXCSR
+ register as written by the `stmxcsr' instruction. */
typedef struct
{
unsigned short int __control_word;
@@ -77,6 +78,9 @@ typedef struct
unsigned int __data_offset;
unsigned short int __data_selector;
unsigned short int __unused5;
+#ifdef __x86_64__
+ unsigned int __mxcsr;
+#endif
}
fenv_t;
diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/x86/fpu/bits/mathinline.h
similarity index 65%
rename from sysdeps/i386/fpu/bits/mathinline.h
rename to sysdeps/x86/fpu/bits/mathinline.h
index 2a7e96b..a4e6df8 100644
--- a/sysdeps/i386/fpu/bits/mathinline.h
+++ b/sysdeps/x86/fpu/bits/mathinline.h
@@ -1,7 +1,6 @@
-/* Inline math functions for i387.
+/* Inline math functions for i387 and SSE.
Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by John C. Bowman <bowman@math.ualberta.ca>, 1995.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -21,10 +20,10 @@
# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
#endif
-#ifndef __extern_inline
+#ifndef __extern_always_inline
# define __MATH_INLINE __inline
#else
-# define __MATH_INLINE __extern_inline
+# define __MATH_INLINE __extern_always_inline
#endif
@@ -120,26 +119,42 @@
/* The gcc, version 2.7 or below, has problems with all this inlining
code. So disable it for this version of the compiler. */
-# if __GNUC_PREREQ (2, 8)
+# if __GNUC_PREREQ (2, 8) && defined __USE_ISOC99
+__BEGIN_NAMESPACE_C99
+
/* Test for negative number. Used in the signbit() macro. */
__MATH_INLINE int
__NTH (__signbitf (float __x))
{
+# ifndef __x86_64__
__extension__ union { float __f; int __i; } __u = { __f: __x };
return __u.__i < 0;
+# else
+ int __m;
+ __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
+ return __m & 0x8;
+# endif
}
__MATH_INLINE int
__NTH (__signbit (double __x))
{
+# ifndef __x86_64__
__extension__ union { double __d; int __i[2]; } __u = { __d: __x };
return __u.__i[1] < 0;
+# else
+ int __m;
+ __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
+ return __m & 0x80;
+# endif
}
__MATH_INLINE int
__NTH (__signbitl (long double __x))
{
__extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
- return (__u.__i[2] & 0x8000) != 0;
+ return __u.__i[2] & 0x8000;
}
+
+__END_NAMESPACE_C99
# endif
#endif
@@ -147,13 +162,232 @@ __NTH (__signbitl (long double __x))
/* The gcc, version 2.7 or below, has problems with all this inlining
code. So disable it for this version of the compiler. */
#if __GNUC_PREREQ (2, 8)
+# if !__GNUC_PREREQ (3, 4) && !defined __NO_MATH_INLINES \
+ && defined __OPTIMIZE__
+/* GCC 3.4 introduced builtins for all functions below, so
+ there's no need to define any of these inline functions. */
+
+# ifdef __USE_ISOC99
+__BEGIN_NAMESPACE_C99
+
+/* Round to nearest integer. */
+# ifdef __SSE_MATH__
+__MATH_INLINE long int
+__NTH (lrintf (float __x))
+{
+ long int __res;
+ /* Mark as volatile since the result is dependend on the state of
+ the SSE control register (the rounding mode). Otherwise GCC might
+ remove these assembler instructions since it does not know about
+ the rounding mode change and cannot currently be told. */
+ __asm __volatile__ ("cvtss2si %1, %0" : "=r" (__res) : "xm" (__x));
+ return __res;
+}
+# endif
+# ifdef __SSE2_MATH__
+__MATH_INLINE long int
+__NTH (lrint (double __x))
+{
+ long int __res;
+ /* Mark as volatile since the result is dependend on the state of
+ the SSE control register (the rounding mode). Otherwise GCC might
+ remove these assembler instructions since it does not know about
+ the rounding mode change and cannot currently be told. */
+ __asm __volatile__ ("cvtsd2si %1, %0" : "=r" (__res) : "xm" (__x));
+ return __res;
+}
+# endif
+# ifdef __x86_64__
+__MATH_INLINE long long int
+__NTH (llrintf (float __x))
+{
+ long long int __res;
+ /* Mark as volatile since the result is dependend on the state of
+ the SSE control register (the rounding mode). Otherwise GCC might
+ remove these assembler instructions since it does not know about
+ the rounding mode change and cannot currently be told. */
+ __asm __volatile__ ("cvtss2si %1, %0" : "=r" (__res) : "xm" (__x));
+ return __res;
+}
+__MATH_INLINE long long int
+__NTH (llrint (double __x))
+{
+ long long int __res;
+ /* Mark as volatile since the result is dependend on the state of
+ the SSE control register (the rounding mode). Otherwise GCC might
+ remove these assembler instructions since it does not know about
+ the rounding mode change and cannot currently be told. */
+ __asm __volatile__ ("cvtsd2si %1, %0" : "=r" (__res) : "xm" (__x));
+ return __res;
+}
+# endif
+
+# if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0 \
+ && defined __SSE2_MATH__
+/* Determine maximum of two values. */
+__MATH_INLINE float
+__NTH (fmaxf (float __x, float __y))
+{
+# ifdef __AVX__
+ float __res;
+ __asm ("vmaxss %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
+ return __res;
+# else
+ __asm ("maxss %1, %0" : "+x" (__x) : "xm" (__y));
+ return __x;
+# endif
+}
+__MATH_INLINE double
+__NTH (fmax (double __x, double __y))
+{
+# ifdef __AVX__
+ float __res;
+ __asm ("vmaxsd %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
+ return __res;
+# else
+ __asm ("maxsd %1, %0" : "+x" (__x) : "xm" (__y));
+ return __x;
+# endif
+}
+
+/* Determine minimum of two values. */
+__MATH_INLINE float
+__NTH (fminf (float __x, float __y))
+{
+# ifdef __AVX__
+ float __res;
+ __asm ("vminss %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
+ return __res;
+# else
+ __asm ("minss %1, %0" : "+x" (__x) : "xm" (__y));
+ return __x;
+# endif
+}
+__MATH_INLINE double
+__NTH (fmin (double __x, double __y))
+{
+# ifdef __AVX__
+ float __res;
+ __asm ("vminsd %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
+ return __res;
+# else
+ __asm ("minsd %1, %0" : "+x" (__x) : "xm" (__y));
+ return __x;
+# endif
+}
+# endif
+
+__END_NAMESPACE_C99
+# endif
+
+# if defined __SSE4_1__ && defined __SSE2_MATH__
+# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
+__BEGIN_NAMESPACE_C99
+
+/* Round to nearest integer. */
+__MATH_INLINE double
+__NTH (rint (double __x))
+{
+ double __res;
+ /* Mark as volatile since the result is dependend on the state of
+ the SSE control register (the rounding mode). Otherwise GCC might
+ remove these assembler instructions since it does not know about
+ the rounding mode change and cannot currently be told. */
+ __asm __volatile__ ("roundsd $4, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__MATH_INLINE float
+__NTH (rintf (float __x))
+{
+ float __res;
+ /* Mark as volatile since the result is dependend on the state of
+ the SSE control register (the rounding mode). Otherwise GCC might
+ remove these assembler instructions since it does not know about
+ the rounding mode change and cannot currently be told. */
+ __asm __volatile__ ("roundss $4, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
-#if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
- && defined __OPTIMIZE__)
+# ifdef __USE_ISOC99
+/* Round to nearest integer without raising inexact exception. */
+__MATH_INLINE double
+__NTH (nearbyint (double __x))
+{
+ double __res;
+ /* Mark as volatile since the result is dependend on the state of
+ the SSE control register (the rounding mode). Otherwise GCC might
+ remove these assembler instructions since it does not know about
+ the rounding mode change and cannot currently be told. */
+ __asm __volatile__ ("roundsd $0xc, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__MATH_INLINE float
+__NTH (nearbyintf (float __x))
+{
+ float __res;
+ /* Mark as volatile since the result is dependend on the state of
+ the SSE control register (the rounding mode). Otherwise GCC might
+ remove these assembler instructions since it does not know about
+ the rounding mode change and cannot currently be told. */
+ __asm __volatile__ ("roundss $0xc, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+# endif
+
+__END_NAMESPACE_C99
+# endif
+
+__BEGIN_NAMESPACE_STD
+/* Smallest integral value not less than X. */
+__MATH_INLINE double
+__NTH (ceil (double __x))
+{
+ double __res;
+ __asm ("roundsd $2, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__END_NAMESPACE_STD
+
+__BEGIN_NAMESPACE_C99
+__MATH_INLINE float
+__NTH (ceilf (float __x))
+{
+ float __res;
+ __asm ("roundss $2, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__END_NAMESPACE_C99
+
+__BEGIN_NAMESPACE_STD
+/* Largest integer not greater than X. */
+__MATH_INLINE double
+__NTH (floor (double __x))
+{
+ double __res;
+ __asm ("roundsd $1, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__END_NAMESPACE_STD
+
+__BEGIN_NAMESPACE_C99
+__MATH_INLINE float
+__NTH (floorf (float __x))
+{
+ float __res;
+ __asm ("roundss $1, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__END_NAMESPACE_C99
+# endif
+# endif
+
+# if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
+ && !defined __x86_64__ && defined __OPTIMIZE__)
+/* Not used for x86-64. */
/* The inline functions do not set errno or raise necessarily the
correct exceptions. */
-# undef math_errhandling
+# undef math_errhandling
/* A macro to define float, double, and long double versions of various
math functions for the ix87 FPU. FUNC is the function name (which will
@@ -162,49 +396,49 @@ __NTH (__signbitl (long double __x))
We define two sets of macros. The set with the additional NP
doesn't add a prototype declaration. */
-#if defined __USE_MISC || defined __USE_ISOC99
-# define __inline_mathop(func, op) \
+# if defined __USE_MISC || defined __USE_ISOC99
+# define __inline_mathop(func, op) \
__inline_mathop_ (double, func, op) \
__inline_mathop_ (float, __CONCAT(func,f), op) \
__inline_mathop_ (long double, __CONCAT(func,l), op)
-# define __inline_mathopNP(func, op) \
+# define __inline_mathopNP(func, op) \
__inline_mathopNP_ (double, func, op) \
__inline_mathopNP_ (float, __CONCAT(func,f), op) \
__inline_mathopNP_ (long double, __CONCAT(func,l), op)
-#else
-# define __inline_mathop(func, op) \
+# else
+# define __inline_mathop(func, op) \
__inline_mathop_ (double, func, op)
-# define __inline_mathopNP(func, op) \
+# define __inline_mathopNP(func, op) \
__inline_mathopNP_ (double, func, op)
-#endif
+# endif
-#define __inline_mathop_(float_type, func, op) \
+# define __inline_mathop_(float_type, func, op) \
__inline_mathop_decl_ (float_type, func, op, "0" (__x))
-#define __inline_mathopNP_(float_type, func, op) \
+# define __inline_mathopNP_(float_type, func, op) \
__inline_mathop_declNP_ (float_type, func, op, "0" (__x))
-#if defined __USE_MISC || defined __USE_ISOC99
-# define __inline_mathop_decl(func, op, params...) \
+# if defined __USE_MISC || defined __USE_ISOC99
+# define __inline_mathop_decl(func, op, params...) \
__inline_mathop_decl_ (double, func, op, params) \
__inline_mathop_decl_ (float, __CONCAT(func,f), op, params) \
__inline_mathop_decl_ (long double, __CONCAT(func,l), op, params)
-# define __inline_mathop_declNP(func, op, params...) \
+# define __inline_mathop_declNP(func, op, params...) \
__inline_mathop_declNP_ (double, func, op, params) \
__inline_mathop_declNP_ (float, __CONCAT(func,f), op, params) \
__inline_mathop_declNP_ (long double, __CONCAT(func,l), op, params)
-#else
-# define __inline_mathop_decl(func, op, params...) \
+# else
+# define __inline_mathop_decl(func, op, params...) \
__inline_mathop_decl_ (double, func, op, params)
-# define __inline_mathop_declNP(func, op, params...) \
+# define __inline_mathop_declNP(func, op, params...) \
__inline_mathop_declNP_ (double, func, op, params)
-#endif
+# endif
-#define __inline_mathop_decl_(float_type, func, op, params...) \
+# define __inline_mathop_decl_(float_type, func, op, params...) \
__MATH_INLINE float_type func (float_type) __THROW; \
__inline_mathop_declNP_ (float_type, func, op, params)
-#define __inline_mathop_declNP_(float_type, func, op, params...) \
+# define __inline_mathop_declNP_(float_type, func, op, params...) \
__MATH_INLINE float_type __NTH (func (float_type __x)) \
{ \
register float_type __result; \
@@ -213,87 +447,87 @@ __NTH (__signbitl (long double __x))
}
-#if defined __USE_MISC || defined __USE_ISOC99
-# define __inline_mathcode(func, arg, code) \
+# if defined __USE_MISC || defined __USE_ISOC99
+# define __inline_mathcode(func, arg, code) \
__inline_mathcode_ (double, func, arg, code) \
__inline_mathcode_ (float, __CONCAT(func,f), arg, code) \
__inline_mathcode_ (long double, __CONCAT(func,l), arg, code)
-# define __inline_mathcodeNP(func, arg, code) \
+# define __inline_mathcodeNP(func, arg, code) \
__inline_mathcodeNP_ (double, func, arg, code) \
__inline_mathcodeNP_ (float, __CONCAT(func,f), arg, code) \
__inline_mathcodeNP_ (long double, __CONCAT(func,l), arg, code)
-# define __inline_mathcode2(func, arg1, arg2, code) \
+# define __inline_mathcode2(func, arg1, arg2, code) \
__inline_mathcode2_ (double, func, arg1, arg2, code) \
__inline_mathcode2_ (float, __CONCAT(func,f), arg1, arg2, code) \
__inline_mathcode2_ (long double, __CONCAT(func,l), arg1, arg2, code)
-# define __inline_mathcodeNP2(func, arg1, arg2, code) \
+# define __inline_mathcodeNP2(func, arg1, arg2, code) \
__inline_mathcodeNP2_ (double, func, arg1, arg2, code) \
__inline_mathcodeNP2_ (float, __CONCAT(func,f), arg1, arg2, code) \
__inline_mathcodeNP2_ (long double, __CONCAT(func,l), arg1, arg2, code)
-# define __inline_mathcode3(func, arg1, arg2, arg3, code) \
+# define __inline_mathcode3(func, arg1, arg2, arg3, code) \
__inline_mathcode3_ (double, func, arg1, arg2, arg3, code) \
__inline_mathcode3_ (float, __CONCAT(func,f), arg1, arg2, arg3, code) \
__inline_mathcode3_ (long double, __CONCAT(func,l), arg1, arg2, arg3, code)
-# define __inline_mathcodeNP3(func, arg1, arg2, arg3, code) \
+# define __inline_mathcodeNP3(func, arg1, arg2, arg3, code) \
__inline_mathcodeNP3_ (double, func, arg1, arg2, arg3, code) \
__inline_mathcodeNP3_ (float, __CONCAT(func,f), arg1, arg2, arg3, code) \
__inline_mathcodeNP3_ (long double, __CONCAT(func,l), arg1, arg2, arg3, code)
-#else
-# define __inline_mathcode(func, arg, code) \
+# else
+# define __inline_mathcode(func, arg, code) \
__inline_mathcode_ (double, func, (arg), code)
-# define __inline_mathcodeNP(func, arg, code) \
+# define __inline_mathcodeNP(func, arg, code) \
__inline_mathcodeNP_ (double, func, (arg), code)
-# define __inline_mathcode2(func, arg1, arg2, code) \
+# define __inline_mathcode2(func, arg1, arg2, code) \
__inline_mathcode2_ (double, func, arg1, arg2, code)
-# define __inline_mathcodeNP2(func, arg1, arg2, code) \
+# define __inline_mathcodeNP2(func, arg1, arg2, code) \
__inline_mathcodeNP2_ (double, func, arg1, arg2, code)
-# define __inline_mathcode3(func, arg1, arg2, arg3, code) \
+# define __inline_mathcode3(func, arg1, arg2, arg3, code) \
__inline_mathcode3_ (double, func, arg1, arg2, arg3, code)
-# define __inline_mathcodeNP3(func, arg1, arg2, arg3, code) \
+# define __inline_mathcodeNP3(func, arg1, arg2, arg3, code) \
__inline_mathcodeNP3_ (double, func, arg1, arg2, arg3, code)
-#endif
+# endif
-#define __inline_mathcode_(float_type, func, arg, code) \
+# define __inline_mathcode_(float_type, func, arg, code) \
__MATH_INLINE float_type func (float_type) __THROW; \
__inline_mathcodeNP_(float_type, func, arg, code)
-#define __inline_mathcodeNP_(float_type, func, arg, code) \
+# define __inline_mathcodeNP_(float_type, func, arg, code) \
__MATH_INLINE float_type __NTH (func (float_type arg)) \
{ \
code; \
}
-#define __inline_mathcode2_(float_type, func, arg1, arg2, code) \
+# define __inline_mathcode2_(float_type, func, arg1, arg2, code) \
__MATH_INLINE float_type func (float_type, float_type) __THROW; \
__inline_mathcodeNP2_ (float_type, func, arg1, arg2, code)
-#define __inline_mathcodeNP2_(float_type, func, arg1, arg2, code) \
+# define __inline_mathcodeNP2_(float_type, func, arg1, arg2, code) \
__MATH_INLINE float_type __NTH (func (float_type arg1, float_type arg2)) \
{ \
code; \
}
-#define __inline_mathcode3_(float_type, func, arg1, arg2, arg3, code) \
+# define __inline_mathcode3_(float_type, func, arg1, arg2, arg3, code) \
__MATH_INLINE float_type func (float_type, float_type, float_type) __THROW; \
__inline_mathcodeNP3_(float_type, func, arg1, arg2, arg3, code)
-#define __inline_mathcodeNP3_(float_type, func, arg1, arg2, arg3, code) \
+# define __inline_mathcodeNP3_(float_type, func, arg1, arg2, arg3, code) \
__MATH_INLINE float_type __NTH (func (float_type arg1, float_type arg2, \
float_type arg3)) \
{ \
code; \
}
-#endif
+# endif
-#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
-/* Miscellaneous functions */
+# if !defined __x86_64__ && !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+/* Miscellaneous functions. Not used by x86-64. */
/* __FAST_MATH__ is defined by gcc -ffast-math. */
-#ifdef __FAST_MATH__
-# ifdef __USE_GNU
-# define __sincos_code \
+# ifdef __FAST_MATH__
+# ifdef __USE_GNU
+# define __sincos_code \
register long double __cosr; \
register long double __sinr; \
register unsigned int __swtmp; \
@@ -333,19 +567,19 @@ __NTH (__sincosl (long double __x, long double *__sinx, long double *__cosx))
{
__sincos_code;
}
-# endif
+# endif
/* Optimized inline implementation, sometimes with reduced precision
and/or argument range. */
-# if __GNUC_PREREQ (3, 5)
-# define __expm1_code \
+# if __GNUC_PREREQ (3, 5)
+# define __expm1_code \
register long double __temp; \
__temp = __builtin_expm1l (__x); \
return __temp ? __temp : __x
-# else
-# define __expm1_code \
+# else
+# define __expm1_code \
register long double __value; \
register long double __exponent; \
register long double __temp; \
@@ -365,13 +599,13 @@ __NTH (__sincosl (long double __x, long double *__sinx, long double *__cosx))
__temp -= 1.0; \
__temp += __value; \
return __temp ? __temp : __x
-# endif
+# endif
__inline_mathcodeNP_ (long double, __expm1l, __x, __expm1_code)
-# if __GNUC_PREREQ (3, 4)
+# if __GNUC_PREREQ (3, 4)
__inline_mathcodeNP_ (long double, __expl, __x, return __builtin_expl (__x))
-# else
-# define __exp_code \
+# else
+# define __exp_code \
register long double __value; \
register long double __exponent; \
__asm __volatile__ \
@@ -390,10 +624,10 @@ __inline_mathcodeNP_ (long double, __expl, __x, return __builtin_expl (__x))
return __value
__inline_mathcodeNP (exp, __x, __exp_code)
__inline_mathcodeNP_ (long double, __expl, __x, __exp_code)
-# endif
+# endif
-# if !__GNUC_PREREQ (3, 5)
+# if !__GNUC_PREREQ (3, 5)
__inline_mathcodeNP (tan, __x, \
register long double __value; \
register long double __value2 __attribute__ ((__unused__)); \
@@ -401,28 +635,28 @@ __inline_mathcodeNP (tan, __x, \
("fptan" \
: "=t" (__value2), "=u" (__value) : "0" (__x)); \
return __value)
-# endif
-#endif /* __FAST_MATH__ */
+# endif
+# endif /* __FAST_MATH__ */
-#if __GNUC_PREREQ (3, 4)
+# if __GNUC_PREREQ (3, 4)
__inline_mathcodeNP2_ (long double, __atan2l, __y, __x,
return __builtin_atan2l (__y, __x))
-#else
-# define __atan2_code \
+# else
+# define __atan2_code \
register long double __value; \
__asm __volatile__ \
("fpatan" \
: "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); \
return __value
-# ifdef __FAST_MATH__
+# ifdef __FAST_MATH__
__inline_mathcodeNP2 (atan2, __y, __x, __atan2_code)
-# endif
+# endif
__inline_mathcodeNP2_ (long double, __atan2l, __y, __x, __atan2_code)
-#endif
+# endif
-#if defined __FAST_MATH__ && !__GNUC_PREREQ (3, 5)
+# if defined __FAST_MATH__ && !__GNUC_PREREQ (3, 5)
__inline_mathcodeNP2 (fmod, __x, __y, \
register long double __value; \
__asm __volatile__ \
@@ -432,52 +666,52 @@ __inline_mathcodeNP2 (fmod, __x, __y, \
"jp 1b" \
: "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); \
return __value)
-#endif
+# endif
-#ifdef __FAST_MATH__
-# if !__GNUC_PREREQ (3,3)
+# ifdef __FAST_MATH__
+# if !__GNUC_PREREQ (3,3)
__inline_mathopNP (sqrt, "fsqrt")
__inline_mathopNP_ (long double, __sqrtl, "fsqrt")
-# define __libc_sqrtl(n) __sqrtl (n)
-# else
-# define __libc_sqrtl(n) __builtin_sqrtl (n)
-# endif
-#endif
+# define __libc_sqrtl(n) __sqrtl (n)
+# else
+# define __libc_sqrtl(n) __builtin_sqrtl (n)
+# endif
+# endif
-#if __GNUC_PREREQ (2, 8)
+# if __GNUC_PREREQ (2, 8)
__inline_mathcodeNP_ (double, fabs, __x, return __builtin_fabs (__x))
-# if defined __USE_MISC || defined __USE_ISOC99
+# if defined __USE_MISC || defined __USE_ISOC99
__inline_mathcodeNP_ (float, fabsf, __x, return __builtin_fabsf (__x))
__inline_mathcodeNP_ (long double, fabsl, __x, return __builtin_fabsl (__x))
-# endif
+# endif
__inline_mathcodeNP_ (long double, __fabsl, __x, return __builtin_fabsl (__x))
-#else
+# else
__inline_mathop (fabs, "fabs")
__inline_mathop_ (long double, __fabsl, "fabs")
-#endif
+# endif
-#ifdef __FAST_MATH__
-# if !__GNUC_PREREQ (3, 4)
+# ifdef __FAST_MATH__
+# if !__GNUC_PREREQ (3, 4)
/* The argument range of this inline version is reduced. */
__inline_mathopNP (sin, "fsin")
/* The argument range of this inline version is reduced. */
__inline_mathopNP (cos, "fcos")
__inline_mathop_declNP (log, "fldln2; fxch; fyl2x", "0" (__x) : "st(1)")
-# endif
+# endif
-# if !__GNUC_PREREQ (3, 5)
+# if !__GNUC_PREREQ (3, 5)
__inline_mathop_declNP (log10, "fldlg2; fxch; fyl2x", "0" (__x) : "st(1)")
__inline_mathcodeNP (asin, __x, return __atan2l (__x, __libc_sqrtl (1.0 - __x * __x)))
__inline_mathcodeNP (acos, __x, return __atan2l (__libc_sqrtl (1.0 - __x * __x), __x))
-# endif
+# endif
-# if !__GNUC_PREREQ (3, 4)
+# if !__GNUC_PREREQ (3, 4)
__inline_mathop_declNP (atan, "fld1; fpatan", "0" (__x) : "st(1)")
-# endif
-#endif /* __FAST_MATH__ */
+# endif
+# endif /* __FAST_MATH__ */
__inline_mathcode_ (long double, __sgn1l, __x, \
__extension__ union { long double __xld; unsigned int __xi[3]; } __n = \
@@ -488,7 +722,7 @@ __inline_mathcode_ (long double, __sgn1l, __x, \
return __n.__xld)
-#ifdef __FAST_MATH__
+# ifdef __FAST_MATH__
/* The argument range of the inline version of sinhl is slightly reduced. */
__inline_mathcodeNP (sinh, __x, \
register long double __exm1 = __expm1l (__fabsl (__x)); \
@@ -501,7 +735,7 @@ __inline_mathcodeNP (cosh, __x, \
__inline_mathcodeNP (tanh, __x, \
register long double __exm1 = __expm1l (-__fabsl (__x + __x)); \
return __exm1 / (__exm1 + 2.0) * __sgn1l (-__x))
-#endif
+# endif
__inline_mathcodeNP (floor, __x, \
register long double __value; \
@@ -539,8 +773,8 @@ __inline_mathcodeNP (ceil, __x, \
: "0" (__x)); \
return __value)
-#ifdef __FAST_MATH__
-# define __ldexp_code \
+# ifdef __FAST_MATH__
+# define __ldexp_code \
register long double __value; \
__asm __volatile__ \
("fscale" \
@@ -552,20 +786,20 @@ __NTH (ldexp (double __x, int __y))
{
__ldexp_code;
}
-#endif
+# endif
/* Optimized versions for some non-standardized functions. */
-#if defined __USE_ISOC99 || defined __USE_MISC
+# if defined __USE_ISOC99 || defined __USE_MISC
-# ifdef __FAST_MATH__
+# ifdef __FAST_MATH__
__inline_mathcodeNP (expm1, __x, __expm1_code)
/* We cannot rely on M_SQRT being defined. So we do it for ourself
here. */
-# define __M_SQRT2 1.41421356237309504880L /* sqrt(2) */
+# define __M_SQRT2 1.41421356237309504880L /* sqrt(2) */
-# if !__GNUC_PREREQ (3, 5)
+# if !__GNUC_PREREQ (3, 5)
__inline_mathcodeNP (log1p, __x, \
register long double __value; \
if (__fabsl (__x) >= 1.0 - 0.5 * __M_SQRT2) \
@@ -577,7 +811,7 @@ __inline_mathcodeNP (log1p, __x, \
"fyl2xp1" \
: "=t" (__value) : "0" (__x) : "st(1)"); \
return __value)
-# endif
+# endif
/* The argument range of the inline version of asinhl is slightly reduced. */
@@ -597,7 +831,7 @@ __inline_mathcodeNP (atanh, __x, \
__inline_mathcodeNP2 (hypot, __x, __y,
return __libc_sqrtl (__x * __x + __y * __y))
-# if !__GNUC_PREREQ (3, 5)
+# if !__GNUC_PREREQ (3, 5)
__inline_mathcodeNP(logb, __x, \
register long double __value; \
register long double __junk; \
@@ -605,17 +839,17 @@ __inline_mathcodeNP(logb, __x, \
("fxtract\n\t" \
: "=t" (__junk), "=u" (__value) : "0" (__x)); \
return __value)
-# endif
+# endif
-# endif
-#endif
+# endif
+# endif
-#ifdef __USE_ISOC99
-# ifdef __FAST_MATH__
+# ifdef __USE_ISOC99
+# ifdef __FAST_MATH__
-# if !__GNUC_PREREQ (3, 5)
+# if !__GNUC_PREREQ (3, 5)
__inline_mathop_declNP (log2, "fld1; fxch; fyl2x", "0" (__x) : "st(1)")
-# endif
+# endif
__MATH_INLINE float
__NTH (ldexpf (float __x, int __y))
@@ -630,9 +864,9 @@ __NTH (ldexpl (long double __x, int __y))
}
__inline_mathopNP (rint, "frndint")
-# endif /* __FAST_MATH__ */
+# endif /* __FAST_MATH__ */
-# define __lrint_code \
+# define __lrint_code \
long int __lrintres; \
__asm__ __volatile__ \
("fistpl %0" \
@@ -653,9 +887,9 @@ __NTH (lrintl (long double __x))
{
__lrint_code;
}
-# undef __lrint_code
+# undef __lrint_code
-# define __llrint_code \
+# define __llrint_code \
long long int __llrintres; \
__asm__ __volatile__ \
("fistpll %0" \
@@ -676,14 +910,14 @@ __NTH (llrintl (long double __x))
{
__llrint_code;
}
-# undef __llrint_code
+# undef __llrint_code
-#endif
+# endif
-#ifdef __USE_MISC
+# ifdef __USE_MISC
-# if defined __FAST_MATH__ && !__GNUC_PREREQ (3, 5)
+# if defined __FAST_MATH__ && !__GNUC_PREREQ (3, 5)
__inline_mathcodeNP2 (drem, __x, __y, \
register double __value; \
register int __clobbered; \
@@ -694,7 +928,7 @@ __inline_mathcodeNP2 (drem, __x, __y, \
"jp 1b" \
: "=t" (__value), "=&a" (__clobbered) : "0" (__x), "u" (__y) : "cc"); \
return __value)
-# endif
+# endif
/* This function is used in the `isfinite' macro. */
@@ -706,21 +940,21 @@ __NTH (__finite (double __x))
| 0x800fffffu) + 1) >> 31));
}
-#endif /* __USE_MISC */
+# endif /* __USE_MISC */
/* Undefine some of the large macros which are not used anymore. */
-#undef __atan2_code
-#ifdef __FAST_MATH__
-# undef __expm1_code
-# undef __exp_code
-# undef __sincos_code
-#endif /* __FAST_MATH__ */
+# undef __atan2_code
+# ifdef __FAST_MATH__
+# undef __expm1_code
+# undef __exp_code
+# undef __sincos_code
+# endif /* __FAST_MATH__ */
-#endif /* __NO_MATH_INLINES */
+# endif /* __NO_MATH_INLINES */
-/* This code is used internally in the GNU libc. */
-#ifdef __LIBC_INTERNAL_MATH_INLINES
+/* This code is used internally in the GNU libc. Not used by x86-64. */
+# if !defined __x86_64__ && defined __LIBC_INTERNAL_MATH_INLINES
__inline_mathop (__ieee754_sqrt, "fsqrt")
__inline_mathcode2 (__ieee754_atan2, __y, __x,
register long double __value;
@@ -728,6 +962,6 @@ __inline_mathcode2 (__ieee754_atan2, __y, __x,
: "=t" (__value)
: "0" (__x), "u" (__y) : "st(1)");
return __value;)
-#endif
+# endif
#endif /* __GNUC__ */
diff --git a/sysdeps/x86_64/fpu/Implies b/sysdeps/x86_64/fpu/Implies
new file mode 100644
index 0000000..2b745a3
--- /dev/null
+++ b/sysdeps/x86_64/fpu/Implies
@@ -0,0 +1 @@
+x86/fpu
diff --git a/sysdeps/x86_64/fpu/bits/fenv.h b/sysdeps/x86_64/fpu/bits/fenv.h
deleted file mode 100644
index bb790c9..0000000
--- a/sysdeps/x86_64/fpu/bits/fenv.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Copyright (C) 1997-2001,2004,2011,2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _FENV_H
-# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
-#endif
-
-/* Define bits representing the exception. We use the bit positions
- of the appropriate bits in the FPU control word. */
-enum
- {
- FE_INVALID = 0x01,
-#define FE_INVALID FE_INVALID
- __FE_DENORM = 0x02,
- FE_DIVBYZERO = 0x04,
-#define FE_DIVBYZERO FE_DIVBYZERO
- FE_OVERFLOW = 0x08,
-#define FE_OVERFLOW FE_OVERFLOW
- FE_UNDERFLOW = 0x10,
-#define FE_UNDERFLOW FE_UNDERFLOW
- FE_INEXACT = 0x20
-#define FE_INEXACT FE_INEXACT
- };
-
-#define FE_ALL_EXCEPT \
- (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
-
-/* The ix87 FPU supports all of the four defined rounding modes. We
- use again the bit positions in the FPU control word as the values
- for the appropriate macros. */
-enum
- {
- FE_TONEAREST = 0,
-#define FE_TONEAREST FE_TONEAREST
- FE_DOWNWARD = 0x400,
-#define FE_DOWNWARD FE_DOWNWARD
- FE_UPWARD = 0x800,
-#define FE_UPWARD FE_UPWARD
- FE_TOWARDZERO = 0xc00
-#define FE_TOWARDZERO FE_TOWARDZERO
- };
-
-
-/* Type representing exception flags. */
-typedef unsigned short int fexcept_t;
-
-
-/* Type representing floating-point environment. This structure
- corresponds to the layout of the block written by the `fstenv'
- instruction and has additional fields for the contents of the MXCSR
- register as written by the `stmxcsr' instruction. */
-typedef struct
- {
- unsigned short int __control_word;
- unsigned short int __unused1;
- unsigned short int __status_word;
- unsigned short int __unused2;
- unsigned short int __tags;
- unsigned short int __unused3;
- unsigned int __eip;
- unsigned short int __cs_selector;
- unsigned int __opcode:11;
- unsigned int __unused4:5;
- unsigned int __data_offset;
- unsigned short int __data_selector;
- unsigned short int __unused5;
-#ifdef __x86_64__
- unsigned int __mxcsr;
-#endif
- }
-fenv_t;
-
-/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((const fenv_t *) -1)
-
-#ifdef __USE_GNU
-/* Floating-point environment where none of the exception is masked. */
-# define FE_NOMASK_ENV ((const fenv_t *) -2)
-#endif
-
-
-#ifdef __USE_EXTERN_INLINES
-__BEGIN_DECLS
-
-/* Optimized versions. */
-extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept);
-__extern_inline int
-__NTH (feraiseexcept (int __excepts))
-{
- if (__builtin_constant_p (__excepts)
- && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0)
- {
- if ((FE_INVALID & __excepts) != 0)
- {
- /* One example of a invalid operation is 0.0 / 0.0. */
- float __f = 0.0;
-
- __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f));
- (void) &__f;
- }
- if ((FE_DIVBYZERO & __excepts) != 0)
- {
- float __f = 1.0;
- float __g = 0.0;
-
- __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
- (void) &__f;
- }
-
- return 0;
- }
-
- return __feraiseexcept_renamed (__excepts);
-}
-
-__END_DECLS
-#endif
diff --git a/sysdeps/x86_64/fpu/bits/mathinline.h b/sysdeps/x86_64/fpu/bits/mathinline.h
deleted file mode 100644
index 7cfe688..0000000
--- a/sysdeps/x86_64/fpu/bits/mathinline.h
+++ /dev/null
@@ -1,289 +0,0 @@
-/* Inline math functions for x86-64.
- Copyright (C) 2002-2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _MATH_H
-# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
-#endif
-
-#ifndef __extern_always_inline
-# define __MATH_INLINE __inline
-#else
-# define __MATH_INLINE __extern_always_inline
-#endif
-
-
-/* The gcc, version 2.7 or below, has problems with all this inlining
- code. So disable it for this version of the compiler. */
-#if __GNUC_PREREQ (2, 8) && defined __USE_ISOC99
-__BEGIN_NAMESPACE_C99
-
-/* Test for negative number. Used in the signbit() macro. */
-__MATH_INLINE int
-__NTH (__signbitf (float __x))
-{
-# ifndef __x86_64__
- __extension__ union { float __f; int __i; } __u = { __f: __x };
- return __u.__i < 0;
-# else
- int __m;
- __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
- return __m & 0x8;
-# endif
-}
-__MATH_INLINE int
-__NTH (__signbit (double __x))
-{
-# ifndef __x86_64__
- __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
- return __u.__i[1] < 0;
-# else
- int __m;
- __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
- return __m & 0x80;
-# endif
-}
-__MATH_INLINE int
-__NTH (__signbitl (long double __x))
-{
- __extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
- return __u.__i[2] & 0x8000;
-}
-
-__END_NAMESPACE_C99
-#endif
-
-
-#if __GNUC_PREREQ (2, 8) && !__GNUC_PREREQ (3, 4) \
- && !defined __NO_MATH_INLINES && defined __OPTIMIZE__
-/* GCC 3.4 introduced builtins for all functions below, so
- there's no need to define any of these inline functions. */
-
-# ifdef __USE_ISOC99
-__BEGIN_NAMESPACE_C99
-
-/* Round to nearest integer. */
-# ifdef __SSE_MATH__
-__MATH_INLINE long int
-__NTH (lrintf (float __x))
-{
- long int __res;
- /* Mark as volatile since the result is dependend on the state of
- the SSE control register (the rounding mode). Otherwise GCC might
- remove these assembler instructions since it does not know about
- the rounding mode change and cannot currently be told. */
- __asm __volatile__ ("cvtss2si %1, %0" : "=r" (__res) : "xm" (__x));
- return __res;
-}
-# endif
-# ifdef __SSE2_MATH__
-__MATH_INLINE long int
-__NTH (lrint (double __x))
-{
- long int __res;
- /* Mark as volatile since the result is dependend on the state of
- the SSE control register (the rounding mode). Otherwise GCC might
- remove these assembler instructions since it does not know about
- the rounding mode change and cannot currently be told. */
- __asm __volatile__ ("cvtsd2si %1, %0" : "=r" (__res) : "xm" (__x));
- return __res;
-}
-# endif
-# ifdef __x86_64__
-__MATH_INLINE long long int
-__NTH (llrintf (float __x))
-{
- long long int __res;
- /* Mark as volatile since the result is dependend on the state of
- the SSE control register (the rounding mode). Otherwise GCC might
- remove these assembler instructions since it does not know about
- the rounding mode change and cannot currently be told. */
- __asm __volatile__ ("cvtss2si %1, %0" : "=r" (__res) : "xm" (__x));
- return __res;
-}
-__MATH_INLINE long long int
-__NTH (llrint (double __x))
-{
- long long int __res;
- /* Mark as volatile since the result is dependend on the state of
- the SSE control register (the rounding mode). Otherwise GCC might
- remove these assembler instructions since it does not know about
- the rounding mode change and cannot currently be told. */
- __asm __volatile__ ("cvtsd2si %1, %0" : "=r" (__res) : "xm" (__x));
- return __res;
-}
-# endif
-
-# if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0 \
- && defined __SSE2_MATH__
-/* Determine maximum of two values. */
-__MATH_INLINE float
-__NTH (fmaxf (float __x, float __y))
-{
-# ifdef __AVX__
- float __res;
- __asm ("vmaxss %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
- return __res;
-# else
- __asm ("maxss %1, %0" : "+x" (__x) : "xm" (__y));
- return __x;
-# endif
-}
-__MATH_INLINE double
-__NTH (fmax (double __x, double __y))
-{
-# ifdef __AVX__
- float __res;
- __asm ("vmaxsd %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
- return __res;
-# else
- __asm ("maxsd %1, %0" : "+x" (__x) : "xm" (__y));
- return __x;
-# endif
-}
-
-/* Determine minimum of two values. */
-__MATH_INLINE float
-__NTH (fminf (float __x, float __y))
-{
-# ifdef __AVX__
- float __res;
- __asm ("vminss %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
- return __res;
-# else
- __asm ("minss %1, %0" : "+x" (__x) : "xm" (__y));
- return __x;
-# endif
-}
-__MATH_INLINE double
-__NTH (fmin (double __x, double __y))
-{
-# ifdef __AVX__
- float __res;
- __asm ("vminsd %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
- return __res;
-# else
- __asm ("minsd %1, %0" : "+x" (__x) : "xm" (__y));
- return __x;
-# endif
-}
-# endif
-
-__END_NAMESPACE_C99
-# endif
-
-# if defined __SSE4_1__ && defined __SSE2_MATH__
-# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
-__BEGIN_NAMESPACE_C99
-
-/* Round to nearest integer. */
-__MATH_INLINE double
-__NTH (rint (double __x))
-{
- double __res;
- /* Mark as volatile since the result is dependend on the state of
- the SSE control register (the rounding mode). Otherwise GCC might
- remove these assembler instructions since it does not know about
- the rounding mode change and cannot currently be told. */
- __asm __volatile__ ("roundsd $4, %1, %0" : "=x" (__res) : "xm" (__x));
- return __res;
-}
-__MATH_INLINE float
-__NTH (rintf (float __x))
-{
- float __res;
- /* Mark as volatile since the result is dependend on the state of
- the SSE control register (the rounding mode). Otherwise GCC might
- remove these assembler instructions since it does not know about
- the rounding mode change and cannot currently be told. */
- __asm __volatile__ ("roundss $4, %1, %0" : "=x" (__res) : "xm" (__x));
- return __res;
-}
-
-# ifdef __USE_ISOC99
-/* Round to nearest integer without raising inexact exception. */
-__MATH_INLINE double
-__NTH (nearbyint (double __x))
-{
- double __res;
- /* Mark as volatile since the result is dependend on the state of
- the SSE control register (the rounding mode). Otherwise GCC might
- remove these assembler instructions since it does not know about
- the rounding mode change and cannot currently be told. */
- __asm __volatile__ ("roundsd $0xc, %1, %0" : "=x" (__res) : "xm" (__x));
- return __res;
-}
-__MATH_INLINE float
-__NTH (nearbyintf (float __x))
-{
- float __res;
- /* Mark as volatile since the result is dependend on the state of
- the SSE control register (the rounding mode). Otherwise GCC might
- remove these assembler instructions since it does not know about
- the rounding mode change and cannot currently be told. */
- __asm __volatile__ ("roundss $0xc, %1, %0" : "=x" (__res) : "xm" (__x));
- return __res;
-}
-# endif
-
-__END_NAMESPACE_C99
-# endif
-
-__BEGIN_NAMESPACE_STD
-/* Smallest integral value not less than X. */
-__MATH_INLINE double
-__NTH (ceil (double __x))
-{
- double __res;
- __asm ("roundsd $2, %1, %0" : "=x" (__res) : "xm" (__x));
- return __res;
-}
-__END_NAMESPACE_STD
-
-__BEGIN_NAMESPACE_C99
-__MATH_INLINE float
-__NTH (ceilf (float __x))
-{
- float __res;
- __asm ("roundss $2, %1, %0" : "=x" (__res) : "xm" (__x));
- return __res;
-}
-__END_NAMESPACE_C99
-
-__BEGIN_NAMESPACE_STD
-/* Largest integer not greater than X. */
-__MATH_INLINE double
-__NTH (floor (double __x))
-{
- double __res;
- __asm ("roundsd $1, %1, %0" : "=x" (__res) : "xm" (__x));
- return __res;
-}
-__END_NAMESPACE_STD
-
-__BEGIN_NAMESPACE_C99
-__MATH_INLINE float
-__NTH (floorf (float __x))
-{
- float __res;
- __asm ("roundss $1, %1, %0" : "=x" (__res) : "xm" (__x));
- return __res;
-}
-__END_NAMESPACE_C99
-# endif
-
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=928ad045eddbed5454f1a8aa0837eda4eec77788
commit 928ad045eddbed5454f1a8aa0837eda4eec77788
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed May 30 11:38:38 2012 -0700
Use the same set of header files for x86-64 and i386
diff --git a/ChangeLog b/ChangeLog
index f7090ec..c1e552a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,60 @@
2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
[BZ #14117]
+ * sysdeps/unix/sysv/linux/x86_64/bits/a.out.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/a.out.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/environments.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/environments.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/epoll.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/epoll.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/fcntl.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/ipctypes.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/mman.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/msq.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/msq.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/sem.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/sem.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/shm.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/shm.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/sigcontext.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/siginfo.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/stat.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/sysctl.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/typesizes.h: This.
+ * sysdeps/unix/sysv/linux/i386/bits/wchar.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/bits/wchar.h: This. Support x86-64.
+ * sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/sys/debugreg.h: This.
+ * sysdeps/unix/sysv/linux/i386/sys/elf.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/sys/elf.h: This. Support x86-64.
+ * sysdeps/unix/sysv/linux/x86_64/sys/io.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/sys/io.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/sys/perm.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/sys/perm.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/sys/procfs.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/sys/procfs.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/sys/reg.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/sys/reg.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/sys/ucontext.h: This.
+ * sysdeps/unix/sysv/linux/x86_64/sys/user.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/sys/user.h: This.
+ * sysdeps/unix/sysv/linux/i386/sys/vm86.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/x86/sys/vm86.h: This. Support x86-64.
+ * sysdeps/x86_64/bits/string.h: Renamed to ...
+ * sysdeps/x86/bits/string.h: This.
+
+2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14117]
* sysdeps/x86_64/bits/xtitypes.h: Renamed to ...
* sysdeps/x86/bits/xtitypes.h: This.
diff --git a/sysdeps/unix/sysv/linux/i386/bits/a.out.h b/sysdeps/unix/sysv/linux/i386/bits/a.out.h
deleted file mode 100644
index 0fb52c3..0000000
--- a/sysdeps/unix/sysv/linux/i386/bits/a.out.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef __A_OUT_GNU_H__
-# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
-#endif
diff --git a/sysdeps/unix/sysv/linux/i386/bits/environments.h b/sysdeps/unix/sysv/linux/i386/bits/environments.h
deleted file mode 100644
index d4afd12..0000000
--- a/sysdeps/unix/sysv/linux/i386/bits/environments.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (C) 1999, 2001, 2004, 2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _UNISTD_H
-# error "Never include this file directly. Use <unistd.h> instead"
-#endif
-
-/* This header should define the following symbols under the described
- situations. A value `1' means that the model is always supported,
- `-1' means it is never supported. Undefined means it cannot be
- statically decided.
-
- _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type
- _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type
-
- _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type
- _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type
-
- The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
- _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
- _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
- used in previous versions of the Unix standard and are available
- only for compatibility.
-*/
-
-/* By default we have 32-bit wide `int', `long int', pointers and `off_t'
- and all platforms support LFS. */
-#define _POSIX_V7_ILP32_OFF32 1
-#define _POSIX_V7_ILP32_OFFBIG 1
-#define _POSIX_V6_ILP32_OFF32 1
-#define _POSIX_V6_ILP32_OFFBIG 1
-#define _XBS5_ILP32_OFF32 1
-#define _XBS5_ILP32_OFFBIG 1
-
-/* We optionally provide an environment with the above size but an 64-bit
- side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */
-
-/* Environments with 64-bit wide pointers can be provided,
- so these macros aren't defined:
- # undef _POSIX_V7_LP64_OFF64
- # undef _POSIX_V7_LPBIG_OFFBIG
- # undef _POSIX_V6_LP64_OFF64
- # undef _POSIX_V6_LPBIG_OFFBIG
- # undef _XBS5_LP64_OFF64
- # undef _XBS5_LPBIG_OFFBIG
- and sysconf tests for it at runtime. */
-
-#define __ILP32_OFF32_CFLAGS "-m32"
-#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
-#define __ILP32_OFF32_LDFLAGS "-m32"
-#define __ILP32_OFFBIG_LDFLAGS "-m32"
-#define __LP64_OFF64_CFLAGS "-m64"
-#define __LP64_OFF64_LDFLAGS "-m64"
diff --git a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
deleted file mode 100644
index 5406b4c..0000000
--- a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009, 2010, 2011
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _FCNTL_H
-# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
-#endif
-
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on a few file systems. */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_NDELAY O_NONBLOCK
-#define O_SYNC 04010000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY 0200000 /* Must be a directory. */
-# define O_NOFOLLOW 0400000 /* Do not follow links. */
-# define O_CLOEXEC 02000000 /* Set close_on_exec. */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT 040000 /* Direct disk access. */
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_PATH 010000000 /* Resolve pathname but do not open file. */
-#endif
-
-/* For now Linux has synchronisity options for data and read operations.
- We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC 010000 /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE 0100000
-#endif
-
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
-#ifndef __USE_FILE_OFFSET64
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
-#else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
-# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
-# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
-#endif
-#define F_GETLK64 12 /* Get record locking info. */
-#define F_SETLK64 13 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 14 /* Set record locking info (blocking). */
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
-# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG 10 /* Set number of signal to be sent. */
-# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
-# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set. */
-#endif
-
-/* For F_[GET|SET]FD. */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
-#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
-
-/* For old implementation of bsd flock(). */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation. */
-# define LOCK_SH 1 /* shared lock */
-# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-# define LOCK_UN 8 /* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
-# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY. */
-# define DN_ACCESS 0x00000001 /* File accessed. */
-# define DN_MODIFY 0x00000002 /* File modified. */
-# define DN_CREATE 0x00000004 /* File created. */
-# define DN_DELETE 0x00000008 /* File removed. */
-# define DN_RENAME 0x00000010 /* File renamed. */
-# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
-#endif
-
-struct flock
- {
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
-#ifndef __USE_FILE_OFFSET64
- __off_t l_start; /* Offset where the lock begins. */
- __off_t l_len; /* Size of the locked area; zero means until EOF. */
-#else
- __off64_t l_start; /* Offset where the lock begins. */
- __off64_t l_len; /* Size of the locked area; zero means until EOF. */
-#endif
- __pid_t l_pid; /* Process holding the lock. */
- };
-
-#ifdef __USE_LARGEFILE64
-struct flock64
- {
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
- __off64_t l_start; /* Offset where the lock begins. */
- __off64_t l_len; /* Size of the locked area; zero means until EOF. */
- __pid_t l_pid; /* Process holding the lock. */
- };
-#endif
-
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-# define FAPPEND O_APPEND
-# define FFSYNC O_FSYNC
-# define FASYNC O_ASYNC
-# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-/* Advise to `posix_fadvise'. */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE. */
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
-
-/* Flags for SPLICE and VMSPLICE. */
-# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
-# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- (but we may still block on the fd
- we splice from/to). */
-# define SPLICE_F_MORE 4 /* Expect more data. */
-# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead. */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- __THROW;
-
-
-/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
-#endif
-
-__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/i386/bits/mman.h b/sysdeps/unix/sysv/linux/i386/bits/mman.h
deleted file mode 100644
index 2bc2ca9..0000000
--- a/sysdeps/unix/sysv/linux/i386/bits/mman.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Definitions for POSIX memory map interface. Linux/i386 version.
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_MMAN_H
-# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
-#endif
-
-/* The following definitions basically come from the kernel headers.
- But the kernel header is not namespace clean. */
-
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-#endif
-
-/* These are Linux-specific. */
-#ifdef __USE_MISC
-# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
-# define MAP_DENYWRITE 0x00800 /* ETXTBSY */
-# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
-# define MAP_LOCKED 0x02000 /* Lock the mapping. */
-# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */
-# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
-# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
-# define MAP_STACK 0x20000 /* Allocation is for a stack. */
-# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
-#endif
-
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 2 /* Lock all additions to address
- space. */
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
-#endif
-
-/* Advice to `madvise'. */
-#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
-# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
-# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
-# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
-# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
- overrides the coredump filter bits. */
-# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
-# define MADV_HWPOISON 100 /* Poison a page for testing. */
-#endif
-
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
diff --git a/sysdeps/unix/sysv/linux/i386/sys/debugreg.h b/sysdeps/unix/sysv/linux/i386/sys/debugreg.h
deleted file mode 100644
index ac1926b..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/debugreg.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_DEBUGREG_H
-#define _SYS_DEBUGREG_H 1
-
-/* Indicate the register numbers for a number of the specific
- debug registers. Registers 0-3 contain the addresses we wish to trap on */
-#define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */
-#define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */
-
-#define DR_STATUS 6 /* u_debugreg[DR_STATUS] */
-#define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */
-
-/* Define a few things for the status register. We can use this to determine
- which debugging register was responsible for the trap. The other bits
- are either reserved or not of interest to us. */
-
-#define DR_TRAP0 (0x1) /* db0 */
-#define DR_TRAP1 (0x2) /* db1 */
-#define DR_TRAP2 (0x4) /* db2 */
-#define DR_TRAP3 (0x8) /* db3 */
-
-#define DR_STEP (0x4000) /* single-step */
-#define DR_SWITCH (0x8000) /* task switch */
-
-/* Now define a bunch of things for manipulating the control register.
- The top two bytes of the control register consist of 4 fields of 4
- bits - each field corresponds to one of the four debug registers,
- and indicates what types of access we trap on, and how large the data
- field is that we are looking at */
-
-#define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */
-#define DR_CONTROL_SIZE 4 /* 4 control bits per register */
-
-#define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */
-#define DR_RW_WRITE (0x1)
-#define DR_RW_READ (0x3)
-
-#define DR_LEN_1 (0x0) /* Settings for data length to trap on */
-#define DR_LEN_2 (0x4)
-#define DR_LEN_4 (0xC)
-
-/* The low byte to the control register determine which registers are
- enabled. There are 4 fields of two bits. One bit is "local", meaning
- that the processor will reset the bit after a task switch and the other
- is global meaning that we have to explicitly reset the bit. With linux,
- you can use either one, since we explicitly zero the register when we enter
- kernel mode. */
-
-#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */
-#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */
-#define DR_ENABLE_SIZE 2 /* 2 enable bits per register */
-
-#define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */
-#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
-
-/* The second byte to the control register has a few special things.
-
- On the i386, you should set the DR_LOCAL_SLOWDOWN or
- DR_GLOBAL_SLOWDOWN bits if you want to know exactly which
- instruction triggered the watchpoint. Setting these bits causes
- the processor to run more slowly, but leaving them clear makes it
- treat watchpoint hits as imprecise exceptions, so you can't
- reliably determine which instruction caused the hit.
-
- The i486 and all later IA-32 processors ignore DR_LOCAL_SLOWDOWN
- and DR_GLOBAL_SLOWDOWN. They always report the exception
- precisely, except in some rare cases, which the user can't do
- anything about. */
-
-#define DR_CONTROL_RESERVED (0xFC00) /* Reserved by Intel */
-#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */
-#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */
-
-#endif /* sys/debugreg.h */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/io.h b/sysdeps/unix/sysv/linux/i386/sys/io.h
deleted file mode 100644
index 3ddcee7..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/io.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* Copyright (C) 1996, 2000, 2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_IO_H
-#define _SYS_IO_H 1
-
-#include <features.h>
-
-__BEGIN_DECLS
-
-/* If TURN_ON is TRUE, request for permission to do direct i/o on the
- port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
- permission off for that range. This call requires root privileges.
-
- Portability note: not all Linux platforms support this call. Most
- platforms based on the PC I/O architecture probably will, however.
- E.g., Linux/Alpha for Alpha PCs supports this. */
-extern int ioperm (unsigned long int __from, unsigned long int __num,
- int __turn_on) __THROW;
-
-/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
- access any I/O port is granted. This call requires root
- privileges. */
-extern int iopl (int __level) __THROW;
-
-#if defined __GNUC__ && __GNUC__ >= 2
-
-static __inline unsigned char
-inb (unsigned short int __port)
-{
- unsigned char _v;
-
- __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
- return _v;
-}
-
-static __inline unsigned char
-inb_p (unsigned short int __port)
-{
- unsigned char _v;
-
- __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
- return _v;
-}
-
-static __inline unsigned short int
-inw (unsigned short int __port)
-{
- unsigned short _v;
-
- __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
- return _v;
-}
-
-static __inline unsigned short int
-inw_p (unsigned short int __port)
-{
- unsigned short int _v;
-
- __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
- return _v;
-}
-
-static __inline unsigned int
-inl (unsigned short int __port)
-{
- unsigned int _v;
-
- __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
- return _v;
-}
-
-static __inline unsigned int
-inl_p (unsigned short int __port)
-{
- unsigned int _v;
- __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v)
- :"Nd" (__port));
- return _v;
-}
-
-static __inline void
-outb (unsigned char value, unsigned short int __port)
-{
- __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (__port));
-}
-
-static __inline void
-outb_p (unsigned char value, unsigned short int __port)
-{
- __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (value),
- "Nd" (__port));
-}
-
-static __inline void
-outw (unsigned short int value, unsigned short int __port)
-{
- __asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (__port));
-
-}
-
-static __inline void
-outw_p (unsigned short int value, unsigned short int __port)
-{
- __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (value),
- "Nd" (__port));
-}
-
-static __inline void
-outl (unsigned int value, unsigned short int __port)
-{
- __asm__ __volatile__ ("outl %0,%w1": :"a" (value), "Nd" (__port));
-}
-
-static __inline void
-outl_p (unsigned int value, unsigned short int __port)
-{
- __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (value),
- "Nd" (__port));
-}
-
-static __inline void
-insb (unsigned short int __port, void *__addr, unsigned long int __count)
-{
- __asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count)
- :"d" (__port), "0" (__addr), "1" (__count));
-}
-
-static __inline void
-insw (unsigned short int __port, void *__addr, unsigned long int __count)
-{
- __asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count)
- :"d" (__port), "0" (__addr), "1" (__count));
-}
-
-static __inline void
-insl (unsigned short int __port, void *__addr, unsigned long int __count)
-{
- __asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count)
- :"d" (__port), "0" (__addr), "1" (__count));
-}
-
-static __inline void
-outsb (unsigned short int __port, const void *__addr,
- unsigned long int __count)
-{
- __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count)
- :"d" (__port), "0" (__addr), "1" (__count));
-}
-
-static __inline void
-outsw (unsigned short int __port, const void *__addr,
- unsigned long int __count)
-{
- __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count)
- :"d" (__port), "0" (__addr), "1" (__count));
-}
-
-static __inline void
-outsl (unsigned short int __port, const void *__addr,
- unsigned long int __count)
-{
- __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count)
- :"d" (__port), "0" (__addr), "1" (__count));
-}
-
-#endif /* GNU C */
-
-__END_DECLS
-#endif /* _SYS_IO_H */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/perm.h b/sysdeps/unix/sysv/linux/i386/sys/perm.h
deleted file mode 100644
index c268681..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/perm.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1996, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_PERM_H
-
-#define _SYS_PERM_H 1
-#include <features.h>
-
-__BEGIN_DECLS
-
-/* Set port input/output permissions. */
-extern int ioperm (unsigned long int __from, unsigned long int __num,
- int __turn_on) __THROW;
-
-
-/* Change I/O privilege level. */
-extern int iopl (int __level) __THROW;
-
-__END_DECLS
-
-#endif /* _SYS_PERM_H */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/procfs.h b/sysdeps/unix/sysv/linux/i386/sys/procfs.h
deleted file mode 100644
index 673baa1..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/procfs.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_PROCFS_H
-#define _SYS_PROCFS_H 1
-
-/* This is somewhat modelled after the file of the same name on SVR4
- systems. It provides a definition of the core file format for ELF
- used on Linux. It doesn't have anything to do with the /proc file
- system, even though Linux has one.
-
- Anyway, the whole purpose of this file is for GDB and GDB only.
- Don't read too much into it. Don't use it for anything other than
- GDB unless you know what you are doing. */
-
-#include <features.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/user.h>
-
-__BEGIN_DECLS
-
-/* Type for a general-purpose register. */
-typedef unsigned long elf_greg_t;
-
-/* And the whole bunch of them. We could have used `struct
- user_regs_struct' directly in the typedef, but tradition says that
- the register set is an array, which does have some peculiar
- semantics, so leave it that way. */
-#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-
-/* Register set for the floating-point registers. */
-typedef struct user_fpregs_struct elf_fpregset_t;
-
-/* Register set for the extended floating-point registers. Includes
- the Pentium III SSE registers in addition to the classic
- floating-point stuff. */
-typedef struct user_fpxregs_struct elf_fpxregset_t;
-
-
-/* Signal info. */
-struct elf_siginfo
- {
- int si_signo; /* Signal number. */
- int si_code; /* Extra code. */
- int si_errno; /* Errno. */
- };
-
-
-/* Definitions to generate Intel SVR4-like core files. These mostly
- have the same names as the SVR4 types with "elf_" tacked on the
- front to prevent clashes with Linux definitions, and the typedef
- forms have been avoided. This is mostly like the SVR4 structure,
- but more Linuxy, with things that Linux does not support and which
- GDB doesn't really use excluded. */
-
-struct elf_prstatus
- {
- struct elf_siginfo pr_info; /* Info associated with signal. */
- short int pr_cursig; /* Current signal. */
- unsigned long int pr_sigpend; /* Set of pending signals. */
- unsigned long int pr_sighold; /* Set of held signals. */
- __pid_t pr_pid;
- __pid_t pr_ppid;
- __pid_t pr_pgrp;
- __pid_t pr_sid;
- struct timeval pr_utime; /* User time. */
- struct timeval pr_stime; /* System time. */
- struct timeval pr_cutime; /* Cumulative user time. */
- struct timeval pr_cstime; /* Cumulative system time. */
- elf_gregset_t pr_reg; /* GP registers. */
- int pr_fpvalid; /* True if math copro being used. */
- };
-
-
-#define ELF_PRARGSZ (80) /* Number of chars for args. */
-
-struct elf_prpsinfo
- {
- char pr_state; /* Numeric process state. */
- char pr_sname; /* Char for pr_state. */
- char pr_zomb; /* Zombie. */
- char pr_nice; /* Nice val. */
- unsigned long int pr_flag; /* Flags. */
- unsigned short int pr_uid;
- unsigned short int pr_gid;
- int pr_pid, pr_ppid, pr_pgrp, pr_sid;
- /* Lots missing */
- char pr_fname[16]; /* Filename of executable. */
- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
- };
-
-
-/* The rest of this file provides the types for emulation of the
- Solaris <proc_service.h> interfaces that should be implemented by
- users of libthread_db. */
-
-/* Addresses. */
-typedef void *psaddr_t;
-
-/* Register sets. Linux has different names. */
-typedef elf_gregset_t prgregset_t;
-typedef elf_fpregset_t prfpregset_t;
-
-/* We don't have any differences between processes and threads,
- therefore have only one PID type. */
-typedef __pid_t lwpid_t;
-
-/* Process status and info. In the end we do provide typedefs for them. */
-typedef struct elf_prstatus prstatus_t;
-typedef struct elf_prpsinfo prpsinfo_t;
-
-__END_DECLS
-
-#endif /* sys/procfs.h */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/reg.h b/sysdeps/unix/sysv/linux/i386/sys/reg.h
deleted file mode 100644
index b993f99..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/reg.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_REG_H
-#define _SYS_REG_H 1
-
-/* Index into an array of 4 byte integers returned from ptrace for
- * location of the users' stored general purpose registers. */
-
-#define EBX 0
-#define ECX 1
-#define EDX 2
-#define ESI 3
-#define EDI 4
-#define EBP 5
-#define EAX 6
-#define DS 7
-#define ES 8
-#define FS 9
-#define GS 10
-#define ORIG_EAX 11
-#define EIP 12
-#define CS 13
-#define EFL 14
-#define UESP 15
-#define SS 16
-
-#endif /* _SYS_REG_H */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/ucontext.h b/sysdeps/unix/sysv/linux/i386/sys/ucontext.h
deleted file mode 100644
index 6306623..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/ucontext.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_UCONTEXT_H
-#define _SYS_UCONTEXT_H 1
-
-#include <features.h>
-#include <signal.h>
-
-/* We need the signal context definitions even if they are not used
- included in <signal.h>. */
-#include <bits/sigcontext.h>
-
-
-/* Type for general register. */
-typedef int greg_t;
-
-/* Number of general registers. */
-#define NGREG 19
-
-/* Container for all general registers. */
-typedef greg_t gregset_t[NGREG];
-
-#ifdef __USE_GNU
-/* Number of each register is the `gregset_t' array. */
-enum
-{
- REG_GS = 0,
-# define REG_GS REG_GS
- REG_FS,
-# define REG_FS REG_FS
- REG_ES,
-# define REG_ES REG_ES
- REG_DS,
-# define REG_DS REG_DS
- REG_EDI,
-# define REG_EDI REG_EDI
- REG_ESI,
-# define REG_ESI REG_ESI
- REG_EBP,
-# define REG_EBP REG_EBP
- REG_ESP,
-# define REG_ESP REG_ESP
- REG_EBX,
-# define REG_EBX REG_EBX
- REG_EDX,
-# define REG_EDX REG_EDX
- REG_ECX,
-# define REG_ECX REG_ECX
- REG_EAX,
-# define REG_EAX REG_EAX
- REG_TRAPNO,
-# define REG_TRAPNO REG_TRAPNO
- REG_ERR,
-# define REG_ERR REG_ERR
- REG_EIP,
-# define REG_EIP REG_EIP
- REG_CS,
-# define REG_CS REG_CS
- REG_EFL,
-# define REG_EFL REG_EFL
- REG_UESP,
-# define REG_UESP REG_UESP
- REG_SS
-# define REG_SS REG_SS
-};
-#endif
-
-/* Definitions taken from the kernel headers. */
-struct _libc_fpreg
-{
- unsigned short int significand[4];
- unsigned short int exponent;
-};
-
-struct _libc_fpstate
-{
- unsigned long int cw;
- unsigned long int sw;
- unsigned long int tag;
- unsigned long int ipoff;
- unsigned long int cssel;
- unsigned long int dataoff;
- unsigned long int datasel;
- struct _libc_fpreg _st[8];
- unsigned long int status;
-};
-
-/* Structure to describe FPU registers. */
-typedef struct _libc_fpstate *fpregset_t;
-
-/* Context to describe whole processor state. */
-typedef struct
- {
- gregset_t gregs;
- /* Due to Linux's history we have to use a pointer here. The SysV/i386
- ABI requires a struct with the values. */
- fpregset_t fpregs;
- unsigned long int oldmask;
- unsigned long int cr2;
- } mcontext_t;
-
-/* Userlevel context. */
-typedef struct ucontext
- {
- unsigned long int uc_flags;
- struct ucontext *uc_link;
- stack_t uc_stack;
- mcontext_t uc_mcontext;
- __sigset_t uc_sigmask;
- struct _libc_fpstate __fpregs_mem;
- } ucontext_t;
-
-#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/user.h b/sysdeps/unix/sysv/linux/i386/sys/user.h
deleted file mode 100644
index e426afe..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/user.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_USER_H
-#define _SYS_USER_H 1
-
-/* The whole purpose of this file is for GDB and GDB only. Don't read
- too much into it. Don't use it for anything other than GDB unless
- you know what you are doing. */
-
-struct user_fpregs_struct
-{
- long int cwd;
- long int swd;
- long int twd;
- long int fip;
- long int fcs;
- long int foo;
- long int fos;
- long int st_space [20];
-};
-
-struct user_fpxregs_struct
-{
- unsigned short int cwd;
- unsigned short int swd;
- unsigned short int twd;
- unsigned short int fop;
- long int fip;
- long int fcs;
- long int foo;
- long int fos;
- long int mxcsr;
- long int reserved;
- long int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
- long int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
- long int padding[56];
-};
-
-struct user_regs_struct
-{
- long int ebx;
- long int ecx;
- long int edx;
- long int esi;
- long int edi;
- long int ebp;
- long int eax;
- long int xds;
- long int xes;
- long int xfs;
- long int xgs;
- long int orig_eax;
- long int eip;
- long int xcs;
- long int eflags;
- long int esp;
- long int xss;
-};
-
-struct user
-{
- struct user_regs_struct regs;
- int u_fpvalid;
- struct user_fpregs_struct i387;
- unsigned long int u_tsize;
- unsigned long int u_dsize;
- unsigned long int u_ssize;
- unsigned long start_code;
- unsigned long start_stack;
- long int signal;
- int reserved;
- struct user_regs_struct* u_ar0;
- struct user_fpregs_struct* u_fpstate;
- unsigned long int magic;
- char u_comm [32];
- int u_debugreg [8];
-};
-
-#define PAGE_SHIFT 12
-#define PAGE_SIZE (1UL << PAGE_SHIFT)
-#define PAGE_MASK (~(PAGE_SIZE-1))
-#define NBPG PAGE_SIZE
-#define UPAGES 1
-#define HOST_TEXT_START_ADDR (u.start_code)
-#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
-
-#endif /* _SYS_USER_H */
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/a.out.h b/sysdeps/unix/sysv/linux/x86/bits/a.out.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/a.out.h
rename to sysdeps/unix/sysv/linux/x86/bits/a.out.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/environments.h b/sysdeps/unix/sysv/linux/x86/bits/environments.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/environments.h
rename to sysdeps/unix/sysv/linux/x86/bits/environments.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/epoll.h b/sysdeps/unix/sysv/linux/x86/bits/epoll.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/epoll.h
rename to sysdeps/unix/sysv/linux/x86/bits/epoll.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
rename to sysdeps/unix/sysv/linux/x86/bits/fcntl.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h b/sysdeps/unix/sysv/linux/x86/bits/ipctypes.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h
rename to sysdeps/unix/sysv/linux/x86/bits/ipctypes.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h b/sysdeps/unix/sysv/linux/x86/bits/mman.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/mman.h
rename to sysdeps/unix/sysv/linux/x86/bits/mman.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/msq.h b/sysdeps/unix/sysv/linux/x86/bits/msq.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/msq.h
rename to sysdeps/unix/sysv/linux/x86/bits/msq.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/sem.h b/sysdeps/unix/sysv/linux/x86/bits/sem.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/sem.h
rename to sysdeps/unix/sysv/linux/x86/bits/sem.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/shm.h b/sysdeps/unix/sysv/linux/x86/bits/shm.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/shm.h
rename to sysdeps/unix/sysv/linux/x86/bits/shm.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h b/sysdeps/unix/sysv/linux/x86/bits/sigcontext.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h
rename to sysdeps/unix/sysv/linux/x86/bits/sigcontext.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h
rename to sysdeps/unix/sysv/linux/x86/bits/siginfo.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/stat.h b/sysdeps/unix/sysv/linux/x86/bits/stat.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/stat.h
rename to sysdeps/unix/sysv/linux/x86/bits/stat.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h b/sysdeps/unix/sysv/linux/x86/bits/sysctl.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h
rename to sysdeps/unix/sysv/linux/x86/bits/sysctl.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h b/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h
rename to sysdeps/unix/sysv/linux/x86/bits/typesizes.h
diff --git a/sysdeps/unix/sysv/linux/i386/bits/wchar.h b/sysdeps/unix/sysv/linux/x86/bits/wchar.h
similarity index 77%
rename from sysdeps/unix/sysv/linux/i386/bits/wchar.h
rename to sysdeps/unix/sysv/linux/x86/bits/wchar.h
index b94fc7a..0aeda79 100644
--- a/sysdeps/unix/sysv/linux/i386/bits/wchar.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/wchar.h
@@ -1,5 +1,5 @@
/* wchar_t type related definitions.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,12 @@
#ifndef _BITS_WCHAR_H
#define _BITS_WCHAR_H 1
-#define __WCHAR_MIN (-2147483647l - 1l)
-#define __WCHAR_MAX (2147483647l)
+#ifdef __x86_64__
+# define __WCHAR_MIN (-2147483647 - 1)
+# define __WCHAR_MAX (2147483647)
+#else
+# define __WCHAR_MIN (-2147483647l - 1l)
+# define __WCHAR_MAX (2147483647l)
+#endif
#endif /* bits/wchar.h */
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h b/sysdeps/unix/sysv/linux/x86/sys/debugreg.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h
rename to sysdeps/unix/sysv/linux/x86/sys/debugreg.h
diff --git a/sysdeps/unix/sysv/linux/i386/sys/elf.h b/sysdeps/unix/sysv/linux/x86/sys/elf.h
similarity index 78%
rename from sysdeps/unix/sysv/linux/i386/sys/elf.h
rename to sysdeps/unix/sysv/linux/x86/sys/elf.h
index 9d64e97..1f4524c 100644
--- a/sysdeps/unix/sysv/linux/i386/sys/elf.h
+++ b/sysdeps/unix/sysv/linux/x86/sys/elf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,8 +18,12 @@
#ifndef _SYS_ELF_H
#define _SYS_ELF_H 1
-#warning "This header is obsolete; use <sys/procfs.h> instead."
+#ifdef __x86_64__
+# error This header is unsupported on x86-64.
+#else
+# warning "This header is obsolete; use <sys/procfs.h> instead."
-#include <sys/procfs.h>
+# include <sys/procfs.h>
+#endif
#endif /* _SYS_ELF_H */
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/io.h b/sysdeps/unix/sysv/linux/x86/sys/io.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/sys/io.h
rename to sysdeps/unix/sysv/linux/x86/sys/io.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/perm.h b/sysdeps/unix/sysv/linux/x86/sys/perm.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/sys/perm.h
rename to sysdeps/unix/sysv/linux/x86/sys/perm.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h b/sysdeps/unix/sysv/linux/x86/sys/procfs.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/sys/procfs.h
rename to sysdeps/unix/sysv/linux/x86/sys/procfs.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/reg.h b/sysdeps/unix/sysv/linux/x86/sys/reg.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/sys/reg.h
rename to sysdeps/unix/sysv/linux/x86/sys/reg.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h b/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h
rename to sysdeps/unix/sysv/linux/x86/sys/ucontext.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/user.h b/sysdeps/unix/sysv/linux/x86/sys/user.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/sys/user.h
rename to sysdeps/unix/sysv/linux/x86/sys/user.h
diff --git a/sysdeps/unix/sysv/linux/i386/sys/vm86.h b/sysdeps/unix/sysv/linux/x86/sys/vm86.h
similarity index 86%
rename from sysdeps/unix/sysv/linux/i386/sys/vm86.h
rename to sysdeps/unix/sysv/linux/x86/sys/vm86.h
index cd2ac07..c41b55d 100644
--- a/sysdeps/unix/sysv/linux/i386/sys/vm86.h
+++ b/sysdeps/unix/sysv/linux/x86/sys/vm86.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,8 +20,11 @@
#define _SYS_VM86_H 1
#include <features.h>
+#ifdef __x86_64__
+# error This header is unsupported on x86-64.
+#else
/* Get constants and data types from kernel header file. */
-#include <asm/vm86.h>
+# include <asm/vm86.h>
__BEGIN_DECLS
@@ -30,5 +33,6 @@ extern int vm86 (unsigned long int __subfunction,
struct vm86plus_struct *__info) __THROW;
__END_DECLS
+# endif
#endif /* _SYS_VM86_H */
diff --git a/sysdeps/x86_64/bits/string.h b/sysdeps/x86/bits/string.h
similarity index 100%
rename from sysdeps/x86_64/bits/string.h
rename to sysdeps/x86/bits/string.h
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources