]> git.pld-linux.org Git - packages/glibc.git/blame - glibc-2.15-math64crash.patch
- rel 2; fix crash in floor
[packages/glibc.git] / glibc-2.15-math64crash.patch
CommitLineData
19e69a04
AM
1diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
2index be68903..a032da8 100644
3--- a/sysdeps/x86_64/fpu/multiarch/Makefile
4+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
5@@ -1,5 +1,5 @@
6 ifeq ($(subdir),math)
7-libm-sysdep_routines += s_floor-c s_ceil-c s_floorf-c s_ceilf-c \
8+libm-sysdep_routines += s_floorf-c s_ceilf-c \
9 s_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c
10
11 ifeq ($(have-mfma4),yes)
12diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c b/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
13deleted file mode 100644
14index 6a5ea3f..0000000
15--- a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
16+++ /dev/null
17@@ -1,2 +0,0 @@
18-#define __ceil __ceil_c
19-#include <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c>
20diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil.S b/sysdeps/x86_64/fpu/multiarch/s_ceil.S
21deleted file mode 100644
22index d0f8da3..0000000
23--- a/sysdeps/x86_64/fpu/multiarch/s_ceil.S
24+++ /dev/null
25@@ -1,40 +0,0 @@
26-/* Copyright (C) 2011 Free Software Foundation, Inc.
27- This file is part of the GNU C Library.
28- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
29-
30- The GNU C Library is free software; you can redistribute it and/or
31- modify it under the terms of the GNU Lesser General Public
32- License as published by the Free Software Foundation; either
33- version 2.1 of the License, or (at your option) any later version.
34-
35- The GNU C Library is distributed in the hope that it will be useful,
36- but WITHOUT ANY WARRANTY; without even the implied warranty of
37- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
38- Lesser General Public License for more details.
39-
40- You should have received a copy of the GNU Lesser General Public
41- License along with the GNU C Library; if not, write to the Free
42- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
43- 02111-1307 USA. */
44-
45-#include <machine/asm.h>
46-#include <init-arch.h>
47-
48-
49-ENTRY(__ceil)
50- .type __ceil, @gnu_indirect_function
51- call __get_cpu_features@plt
52- movq %rax, %rdx
53- leaq __ceil_sse41(%rip), %rax
54- testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
55- jnz 2f
56- leaq __ceil_c(%rip), %rax
57-2: ret
58-END(__ceil)
59-weak_alias (__ceil, ceil)
60-
61-
62-ENTRY(__ceil_sse41)
63- roundsd $2, %xmm0, %xmm0
64- ret
65-END(__ceil_sse41)
66diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c b/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
67deleted file mode 100644
68index 68733b6..0000000
69--- a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
70+++ /dev/null
71@@ -1,3 +0,0 @@
72-#undef __floor
73-#define __floor __floor_c
74-#include <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c>
75diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor.S b/sysdeps/x86_64/fpu/multiarch/s_floor.S
76deleted file mode 100644
77index 514ea95..0000000
78--- a/sysdeps/x86_64/fpu/multiarch/s_floor.S
79+++ /dev/null
80@@ -1,40 +0,0 @@
81-/* Copyright (C) 2011 Free Software Foundation, Inc.
82- This file is part of the GNU C Library.
83- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
84-
85- The GNU C Library is free software; you can redistribute it and/or
86- modify it under the terms of the GNU Lesser General Public
87- License as published by the Free Software Foundation; either
88- version 2.1 of the License, or (at your option) any later version.
89-
90- The GNU C Library is distributed in the hope that it will be useful,
91- but WITHOUT ANY WARRANTY; without even the implied warranty of
92- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
93- Lesser General Public License for more details.
94-
95- You should have received a copy of the GNU Lesser General Public
96- License along with the GNU C Library; if not, write to the Free
97- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
98- 02111-1307 USA. */
99-
100-#include <machine/asm.h>
101-#include <init-arch.h>
102-
103-
104-ENTRY(__floor)
105- .type __floor, @gnu_indirect_function
106- call __get_cpu_features@plt
107- movq %rax, %rdx
108- leaq __floor_sse41(%rip), %rax
109- testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
110- jnz 2f
111- leaq __floor_c(%rip), %rax
112-2: ret
113-END(__floor)
114-weak_alias (__floor, floor)
115-
116-
117-ENTRY(__floor_sse41)
118- roundsd $1, %xmm0, %xmm0
119- ret
120-END(__floor_sse41)
121diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
122deleted file mode 100644
123index 1ba9dbc..0000000
124--- a/sysdeps/x86_64/fpu/multiarch/s_sin.c
125+++ /dev/null
126@@ -1,31 +0,0 @@
127-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
128-# include <init-arch.h>
129-# include <math.h>
130-# undef NAN
131-
132-extern double __cos_sse2 (double);
133-extern double __sin_sse2 (double);
134-extern double __cos_avx (double);
135-extern double __sin_avx (double);
136-# ifdef HAVE_FMA4_SUPPORT
137-extern double __cos_fma4 (double);
138-extern double __sin_fma4 (double);
139-# else
140-# undef HAS_FMA4
141-# define HAS_FMA4 0
142-# define __cos_fma4 ((void *) 0)
143-# define __sin_fma4 ((void *) 0)
144-# endif
145-
146-libm_ifunc (__cos, HAS_FMA4 ? __cos_fma4 : HAS_AVX ? __cos_avx : __cos_sse2);
147-weak_alias (__cos, cos)
148-
149-libm_ifunc (__sin, HAS_FMA4 ? __sin_fma4 : HAS_AVX ? __sin_avx : __sin_sse2);
150-weak_alias (__sin, sin)
151-
152-# define __cos __cos_sse2
153-# define __sin __sin_sse2
154-#endif
155-
156-
157-#include <sysdeps/ieee754/dbl-64/s_sin.c>
158diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c
159deleted file mode 100644
160index 8f6601e..0000000
161--- a/sysdeps/x86_64/fpu/multiarch/s_tan.c
162+++ /dev/null
163@@ -1,21 +0,0 @@
164-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
165-# include <init-arch.h>
166-# include <math.h>
167-
168-extern double __tan_sse2 (double);
169-extern double __tan_avx (double);
170-# ifdef HAVE_FMA4_SUPPORT
171-extern double __tan_fma4 (double);
172-# else
173-# undef HAS_FMA4
174-# define HAS_FMA4 0
175-# define __tan_fma4 ((void *) 0)
176-# endif
177-
178-libm_ifunc (tan, HAS_FMA4 ? __tan_fma4 : HAS_AVX ? __tan_avx : __tan_sse2);
179-
180-# define tan __tan_sse2
181-#endif
182-
183-
184-#include <sysdeps/ieee754/dbl-64/s_tan.c>
This page took 0.052773 seconds and 4 git commands to generate.