SHA256
3
0
forked from pool/glibc

- Update longlong.h from GCC sources. Fixes s390 build with -mzarch.

[bnc#695102]

OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=50
This commit is contained in:
Richard Biener 2011-05-23 08:53:41 +00:00 committed by Git OBS Bridge
parent c9f65bd9f5
commit 7806c326e8
3 changed files with 49 additions and 0 deletions

41
glibc-zarch-longlong.diff Normal file
View File

@ -0,0 +1,41 @@
Index: glibc/stdlib/longlong.h
===================================================================
--- glibc.orig/stdlib/longlong.h
+++ glibc/stdlib/longlong.h
@@ -303,6 +303,7 @@ UDItype __umulsidi3 (USItype, USItype);
#endif
#if (defined (__i370__) || defined (__s390__) || defined (__mvs__)) && W_TYPE_SIZE == 32
+#if !defined (__zarch__)
#define smul_ppmm(xh, xl, m0, m1) \
do { \
union {DItype __ll; \
@@ -324,6 +325,28 @@ UDItype __umulsidi3 (USItype, USItype);
: "0" (__x.__ll), "r" (d)); \
(q) = __x.__i.__l; (r) = __x.__i.__h; \
} while (0)
+#else
+#define smul_ppmm(xh, xl, m0, m1) \
+ do { \
+ register SItype r0 __asm__ ("0"); \
+ register SItype r1 __asm__ ("1") = m0; \
+ \
+ __asm__ ("mr\t%%r0,%3" \
+ : "=r" (r0), "=r" (r1) \
+ : "r" (r1), "r" (m1)); \
+ (xh) = r1; (xl) = r0; \
+ } while (0)
+#define sdiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ register SItype r0 __asm__ ("0") = n0; \
+ register SItype r1 __asm__ ("1") = n1; \
+ \
+ __asm__ ("dr\t%%r0,%3" \
+ : "=r" (r0), "=r" (r1) \
+ : "r" (r0), "r" (r1), "r" (d)); \
+ (q) = r0; (r) = r1; \
+ } while (0)
+#endif /* __zarch__ */
#endif
#if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon May 23 08:44:47 UTC 2011 - rguenther@novell.com
- Update longlong.h from GCC sources. Fixes s390 build with -mzarch.
[bnc#695102]
-------------------------------------------------------------------
Tue Feb 22 12:57:07 CET 2011 - pbaudis@suse.cz

View File

@ -138,6 +138,7 @@ Patch49: glibc-fini-unwind.diff
Patch50: glibc-gconvcache-s390.diff
Patch51: glibc-vfprintf-positional.diff
Patch52: glibc-elf-localscope.diff
Patch53: glibc-zarch-longlong.diff
Patch500: ARM_glibc-2.10.1-local-eabi-wchar.diff
Patch501: ARM_glibc-2.10.1-local-hwcap-updates.diff
Patch502: ARM_glibc-2.10.1-local-lowlevellock.diff
@ -357,6 +358,7 @@ rm nscd/s-stamp
%patch50
%patch51 -p1
%patch52
%patch53 -p1
%ifarch %arm armv5tel armv7l
%patch500
%patch501