summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc-2.10.1/arm-longlong.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc-2.10.1/arm-longlong.patch')
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/arm-longlong.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/arm-longlong.patch b/meta/recipes-core/glibc/glibc-2.10.1/arm-longlong.patch
new file mode 100644
index 0000000000..28aca83dff
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/arm-longlong.patch
@@ -0,0 +1,58 @@
1--- glibc-2.4/stdlib/longlong.h.ark 2006-03-11 22:49:27.000000000 +0100
2+++ glibc-2.4/stdlib/longlong.h 2006-03-11 22:55:12.000000000 +0100
3@@ -206,6 +206,14 @@
4 "rI" ((USItype) (bh)), \
5 "r" ((USItype) (al)), \
6 "rI" ((USItype) (bl)) __CLOBBER_CC)
7+/* v3m and all higher arches have long multiply support. */
8+#if !defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__)
9+#define umul_ppmm(xh, xl, a, b) \
10+ __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
11+#define UMUL_TIME 5
12+#define smul_ppmm(xh, xl, a, b) \
13+ __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
14+#else
15 #define umul_ppmm(xh, xl, a, b) \
16 {register USItype __t0, __t1, __t2; \
17 __asm__ ("%@ Inlined umul_ppmm\n" \
18@@ -227,7 +235,13 @@
19 : "r" ((USItype) (a)), \
20 "r" ((USItype) (b)) __CLOBBER_CC );}
21 #define UMUL_TIME 20
22+#endif
23 #define UDIV_TIME 100
24+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
25+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
26+#define COUNT_LEADING_ZEROS_0 32
27+#endif
28+
29 #endif /* __arm__ */
30
31 #if defined (__hppa) && W_TYPE_SIZE == 32
32--- glibc-2.4/ports/sysdeps/arm/mp_clz_tab.c.ark 2006-03-11 22:56:43.000000000 +0100
33+++ glibc-2.4/ports/sysdeps/arm/mp_clz_tab.c 2006-03-11 22:58:19.000000000 +0100
34@@ -0,0 +1,24 @@
35+/* __clz_tab -- support for longlong.h
36+ Copyright (C) 2004 Free Software Foundation, Inc.
37+ This file is part of the GNU C Library.
38+
39+ The GNU C Library is free software; you can redistribute it and/or
40+ modify it under the terms of the GNU Lesser General Public
41+ License as published by the Free Software Foundation; either
42+ version 2.1 of the License, or (at your option) any later version.
43+
44+ The GNU C Library is distributed in the hope that it will be useful,
45+ but WITHOUT ANY WARRANTY; without even the implied warranty of
46+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
47+ Lesser General Public License for more details.
48+
49+ You should have received a copy of the GNU Lesser General Public
50+ License along with the GNU C Library; if not, write to the Free
51+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
52+ 02111-1307 USA. */
53+
54+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
55+/* Nothing required. */
56+#else
57+#include <stdlib/mp_clz_tab.c>
58+#endif