summaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/fpu/bits/mathdef.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-11-04 23:37:44 +0000
committerRoland McGrath <roland@gnu.org>2004-11-04 23:37:44 +0000
commitad146de70ec85c70a680bb4817f1d9e9f3bc7fd6 (patch)
tree0db09f890793678db298012e476526fc6016b8da /sysdeps/x86_64/fpu/bits/mathdef.h
parent0090226a52e0b3263fad42e1569baa3204983bb5 (diff)
downloadglibc-ad146de70ec85c70a680bb4817f1d9e9f3bc7fd6.tar.gz
* sysdeps/unix/sysv/linux/x86_64/sys/procfs.h [__WORDSIZE == 32]
(elf_fpxregset_t): New type. (struct elf_prpsinfo): If __WORDSIZE == 32, change pr_[ug]id type to unsigned short int. * sysdeps/unix/sysv/linux/x86_64/sys/user.h (struct user_fpregs_struct): Fix comment. * sysdeps/i386/fpu/bits/mathdef.h (float_t, double_t): If __FLOAT_EVAL_METHOD__ is defined and 0, typedef to float resp. double. * sysdeps/x86_64/fpu/bits/mathdef.h: Include bits/wordsize.h. (float_t, double_t): If -m32 and not -mfpmath=sse, typedef to long double. * sysdeps/x86_64/fpu/bits/fenv.h: Include bits/wordsize.h. (fenv_t): Remove __mxcsr field for -m32.
Diffstat (limited to 'sysdeps/x86_64/fpu/bits/mathdef.h')
-rw-r--r--sysdeps/x86_64/fpu/bits/mathdef.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sysdeps/x86_64/fpu/bits/mathdef.h b/sysdeps/x86_64/fpu/bits/mathdef.h
index 37665c2097..7b16189590 100644
--- a/sysdeps/x86_64/fpu/bits/mathdef.h
+++ b/sysdeps/x86_64/fpu/bits/mathdef.h
@@ -23,11 +23,23 @@
#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
# define _MATH_H_MATHDEF 1
+# include <bits/wordsize.h>
+
+# if __WORDSIZE == 64 || (defined __FLT_EVAL_METHOD__ && __FLT_EVAL_METHOD__ == 0)
/* The x86-64 architecture computes values with the precission of the
- used type. */
+ used type. Similarly for -m32 -mfpmath=sse. */
typedef float float_t; /* `float' expressions are evaluated as `float'. */
typedef double double_t; /* `double' expressions are evaluated
as `double'. */
+# else
+/* The ix87 FPUs evaluate all values in the 80 bit floating-point format
+ which is also available for the user as `long double'. Therefore we
+ define: */
+typedef long double float_t; /* `float' expressions are evaluated as
+ `long double'. */
+typedef long double double_t; /* `double' expressions are evaluated as
+ `long double'. */
+# endif
/* The values returned by `ilogb' for 0 and NaN respectively. */
# define FP_ILOGB0 (-2147483647 - 1)