[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] make eglibc-2.13-8 work on arch powerpcspe



The attached debdiff makes sid's eglibc (2.13-8) work on architecture
powerpcspe.  We have a few new test-case errors, that are not listed in
debian/testsuite-checking/expected-results-powerpc-linux-gnu-libc :

  bug-nextafter.out, Error 18
  bug-nexttoward.out, Error 18
  test-double.out, Error 1
  test-fenv.out, Error 1
  test-float.out, Error 1
  test-idouble.out, Error 1
  test-ifloat.out, Error 1
  test-misc.out, Error 1
  tst-setcontext-fpscr.o, Error 1

these complain about various details of the FPU, especially exception
and overflow handling, rounding, slight deviations on results.  I cannot
find anything that looks like a real "bad" error, though.

tst-setcontext-fpscr contains some assembly code and won't even compile
in e500 mode.

cheers,

David
-- 
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

diff -u eglibc-2.13/debian/changelog eglibc-2.13/debian/changelog
--- eglibc-2.13/debian/changelog
+++ eglibc-2.13/debian/changelog
@@ -1,3 +1,12 @@
+eglibc (2.13-8+powerpcspe1) unstable; urgency=low
+
+  * forward-port powerpcspe-specific changes form 2.11.1-2+powerpcspe1
+  * dropped 0002-replace-eieio-with-mbar-on-__SPE__.patch since that
+    should nowadays be handled by GNU 'as'
+  * added local-no-fma.patch to fix new compile problem on powerpcspe
+
+ -- David Kuehling <dvdkhlng@gmx.de>  Wed, 06 Jul 2011 11:35:07 +0200
+
 eglibc (2.13-8) unstable; urgency=low
 
   [ Samuel Thibault ]
diff -u eglibc-2.13/debian/patches/series eglibc-2.13/debian/patches/series
--- eglibc-2.13/debian/patches/series
+++ eglibc-2.13/debian/patches/series
@@ -168,6 +168,9 @@
 
 powerpc/local-libgcc_eh-ld.so.diff
 
+powerpcspe/local-Powerpc-trampline-consider-__NO_FPRS__.patch
+powerpcspe/local-no-fma.patch
+
 s390/submitted-nexttowardf.diff
 s390/cvs-iconv-z9-109.diff
 
only in patch2:
unchanged:
--- eglibc-2.13.orig/debian/patches/powerpcspe/local-Powerpc-trampline-consider-__NO_FPRS__.patch
+++ eglibc-2.13/debian/patches/powerpcspe/local-Powerpc-trampline-consider-__NO_FPRS__.patch
@@ -0,0 +1,51 @@
+From 5f2110f9ce203c42aadc3968ddc487a8c9cc6c83 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Sat, 15 May 2010 21:51:49 +0200
+Subject: [PATCH] Powerpc/trampline: consider __NO_FPRS__
+
+don't save/restore FPRs on FPR less systems
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ sysdeps/powerpc/powerpc32/dl-trampoline.S |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/sysdeps/powerpc/powerpc32/dl-trampoline.S b/sysdeps/powerpc/powerpc32/dl-trampoline.S
+index 6a158c3..bd815c7 100644
+--- a/sysdeps/powerpc/powerpc32/dl-trampoline.S
++++ b/sysdeps/powerpc/powerpc32/dl-trampoline.S
+@@ -137,6 +137,7 @@ _dl_prof_resolve:
+ 	stw r9,40(r1)
+ 	stw r10,44(r1)
+ 	stw r0,8(r1)
++#ifndef __NO_FPRS__
+  # Save the floating point registers
+ 	stfd fp1,48(r1)
+ 	stfd fp2,56(r1)
+@@ -146,6 +147,7 @@ _dl_prof_resolve:
+ 	stfd fp6,88(r1)
+ 	stfd fp7,96(r1)
+ 	stfd fp8,104(r1)
++#endif
+  # XXX TODO: store vmx registers
+  # Load the extra parameters.
+ 	addi r6,r1,16
+@@ -169,6 +171,7 @@ _dl_prof_resolve:
+ 	lwz r4,20(r1)
+ 	lwz r3,16(r1)
+         lwz r0,12(r1)
++#ifndef __NO_FPRS__
+  # Load the floating point registers.
+ 	lfd fp1,48(r1)
+ 	lfd fp2,56(r1)
+@@ -178,6 +181,7 @@ _dl_prof_resolve:
+ 	lfd fp6,88(r1)
+ 	lfd fp7,96(r1)
+ 	lfd fp8,104(r1)
++#endif
+  # ...unwind the stack frame, and jump to the PLT entry we updated.
+ 	addi r1,r1,320
+ 	bctr
+-- 
+1.5.6.5
+
only in patch2:
unchanged:
--- eglibc-2.13.orig/debian/patches/powerpcspe/local-no-fma.patch
+++ eglibc-2.13/debian/patches/powerpcspe/local-no-fma.patch
@@ -0,0 +1,16 @@
+Override s_fma[f] assembly routines with C-code when compiling for powerpcspe.
+
+Signed-off-by: David Kuehling <dvdkhlng AT gmx DOT de>
+
+Index: eglibc-2.13/ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fma.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ eglibc-2.13/ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fma.c	2011-07-04 15:53:26.000000000 +0200
+@@ -0,0 +1 @@
++#include <math/s_fma.c>
+Index: eglibc-2.13/ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fmaf.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ eglibc-2.13/ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fmaf.c	2011-07-04 15:53:12.000000000 +0200
+@@ -0,0 +1 @@
++#include <math/s_fmaf.c>

Attachment: pgpmwFuJjT73H.pgp
Description: PGP signature


Reply to: