diff options
Diffstat (limited to 'sysdeps/x86')
-rw-r--r-- | sysdeps/x86/bits/mathdef.h | 3 | ||||
-rw-r--r-- | sysdeps/x86/fpu/Makefile | 6 | ||||
-rw-r--r-- | sysdeps/x86/fpu/test-flt-eval-method-387.c | 1 | ||||
-rw-r--r-- | sysdeps/x86/fpu/test-flt-eval-method-sse.c | 1 |
4 files changed, 9 insertions, 2 deletions
diff --git a/sysdeps/x86/bits/mathdef.h b/sysdeps/x86/bits/mathdef.h index e61c28aea3..9423a7f558 100644 --- a/sysdeps/x86/bits/mathdef.h +++ b/sysdeps/x86/bits/mathdef.h @@ -22,7 +22,8 @@ #if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF # define _MATH_H_MATHDEF 1 -# if defined __x86_64__ || (defined __FLT_EVAL_METHOD__ && __FLT_EVAL_METHOD__ == 0) +# if ((defined __x86_64__ && !defined __FLT_EVAL_METHOD__) \ + || (defined __FLT_EVAL_METHOD__ && __FLT_EVAL_METHOD__ == 0)) /* The x86-64 architecture computes values with the precission of the used type. Similarly for -m32 -mfpmath=sse. */ typedef float float_t; /* `float' expressions are evaluated as `float'. */ diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile index b561995658..a8047a4504 100644 --- a/sysdeps/x86/fpu/Makefile +++ b/sysdeps/x86/fpu/Makefile @@ -1,7 +1,11 @@ ifeq ($(subdir),math) libm-support += powl_helper -tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 +tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \ + test-flt-eval-method-387 test-flt-eval-method-sse CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse +CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387 +CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \ + -mfpmath=sse endif diff --git a/sysdeps/x86/fpu/test-flt-eval-method-387.c b/sysdeps/x86/fpu/test-flt-eval-method-387.c new file mode 100644 index 0000000000..2fb7acfb76 --- /dev/null +++ b/sysdeps/x86/fpu/test-flt-eval-method-387.c @@ -0,0 +1 @@ +#include <test-flt-eval-method.c> diff --git a/sysdeps/x86/fpu/test-flt-eval-method-sse.c b/sysdeps/x86/fpu/test-flt-eval-method-sse.c new file mode 100644 index 0000000000..2fb7acfb76 --- /dev/null +++ b/sysdeps/x86/fpu/test-flt-eval-method-sse.c @@ -0,0 +1 @@ +#include <test-flt-eval-method.c> |