* [parisc-linux] [Fwd: [patch/hppa] Floating point exception handling patch]
@ 2006-01-15 23:38 Randolph Chung
2006-01-16 6:22 ` Grant Grundler
0 siblings, 1 reply; 3+ messages in thread
From: Randolph Chung @ 2006-01-15 23:38 UTC (permalink / raw)
To: parisc-linux
[-- Attachment #1: Type: text/plain, Size: 755 bytes --]
FYI - James asked me to forward this to the parisc-linux m-l too.
randolph
-------- Original Message --------
Subject: [patch/hppa] Floating point exception handling patch
Date: Sun, 15 Jan 2006 16:44:50 +0800
From: Randolph Chung <randolph@tausq.org>
To: submit@bugs.debian.org
CC: 342545@bugs.debian.org, debian-hppa@lists.debian.org
Package: glibc
Version: 2.3.5-11
Severity: important
Tags: patch
The attached patch fixes a problem with floating point exception
handling on hppa. This affects packages that use feholdexcept and
fesetenv, such as uic from QT. This patch fixes #342545. Carlos is on
vacation now - I'll ask him to merge this upstream when he returns,
meanwhile perhaps somebody can roll a new glibc package for debian?
randolph
[-- Attachment #2: glibc235-hppa-fpu.dpatch --]
[-- Type: text/plain, Size: 3067 bytes --]
#! /bin/sh -e
# DP: Description: hppa floating point exception handling fix
# DP: Related bugs: Debian #342545
# DP: Dpatch author: Randolph Chung <tausq@debian.org>
# DP: Patch author: Randolph Chung <tausq@debian.org>
# DP: Upstream status: Pending
# DP: Status Details: to be merged by Carlos
# DP: Date: Sun, 15 Jan 2006
PATCHLEVEL=1
if [ $# -ne 2 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch -d "$2" -f --no-backup-if-mismatch -p$PATCHLEVEL < $0;;
-unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p$PATCHLEVEL < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
# append the patch here and adjust the -p? flag in the patch calls.
diff -uNr glibc-2.3.5/sysdeps/hppa/fpu.orig/fegetenv.c glibc-2.3.5/sysdeps/hppa/fpu/fegetenv.c
--- glibc-2.3.5/sysdeps/hppa/fpu.orig/fegetenv.c 2006-01-14 10:17:19.000000000 -0800
+++ glibc-2.3.5/sysdeps/hppa/fpu/fegetenv.c 2006-01-14 10:19:08.000000000 -0800
@@ -27,10 +27,7 @@
unsigned long long buf[4], *bufptr = buf;
__asm__ (
- "fstd,ma %%fr0,8(%1)\n"
- "fstd,ma %%fr1,8(%1)\n"
- "fstd,ma %%fr2,8(%1)\n"
- "fstd %%fr3,0(%1)\n"
+ "fstd %%fr0,0(%1)\n"
: "=m" (buf), "+r" (bufptr));
memcpy (envp, buf, sizeof (*envp));
return 0;
diff -uNr glibc-2.3.5/sysdeps/hppa/fpu.orig/feholdexcpt.c glibc-2.3.5/sysdeps/hppa/fpu/feholdexcpt.c
--- glibc-2.3.5/sysdeps/hppa/fpu.orig/feholdexcpt.c 2006-01-14 10:17:19.000000000 -0800
+++ glibc-2.3.5/sysdeps/hppa/fpu/feholdexcpt.c 2006-01-14 10:20:21.000000000 -0800
@@ -30,10 +30,7 @@
/* Store the environment. */
bufptr = clear.buf;
__asm__ (
- "fstd,ma %%fr0,8(%1)\n"
- "fstd,ma %%fr1,8(%1)\n"
- "fstd,ma %%fr2,8(%1)\n"
- "fstd %%fr3,0(%1)\n"
+ "fstd %%fr0,0(%1)\n"
: "=m" (clear), "+r" (bufptr));
memcpy (envp, &clear.env, sizeof (fenv_t));
@@ -47,10 +44,7 @@
/* Load the new environment. */
bufptr = clear.buf;
__asm__ (
- "fldd,ma 8(%0),%%fr0\n"
- "fldd,ma 8(%0),%%fr1\n"
- "fldd,ma 8(%0),%%fr2\n"
- "fldd 0(%0),%%fr3\n"
+ "fldd 0(%0),%%fr0\n"
: : "r" (bufptr), "m" (clear));
return 0;
diff -uNr glibc-2.3.5/sysdeps/hppa/fpu.orig/fesetenv.c glibc-2.3.5/sysdeps/hppa/fpu/fesetenv.c
--- glibc-2.3.5/sysdeps/hppa/fpu.orig/fesetenv.c 2006-01-14 10:17:19.000000000 -0800
+++ glibc-2.3.5/sysdeps/hppa/fpu/fesetenv.c 2006-01-14 10:20:44.000000000 -0800
@@ -34,10 +34,7 @@
we want to use from the environment specified by the parameter. */
bufptr = temp.buf;
__asm__ (
- "fstd,ma %%fr0,8(%1)\n"
- "fstd,ma %%fr1,8(%1)\n"
- "fstd,ma %%fr2,8(%1)\n"
- "fstd %%fr3,0(%1)\n"
+ "fstd %%fr0,0(%1)\n"
: "=m" (temp), "+r" (bufptr));
temp.env.__status_word &= ~(FE_ALL_EXCEPT
@@ -56,9 +53,6 @@
/* Load the new environment. */
bufptr = temp.buf;
__asm__ (
- "fldd,ma -8(%1),%%fr3\n"
- "fldd,ma -8(%1),%%fr2\n"
- "fldd,ma -8(%1),%%fr1\n"
"fldd 0(%1),%%fr0\n"
: "=m" (temp), "+r" (bufptr));
[-- Attachment #3: Type: text/plain, Size: 169 bytes --]
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [parisc-linux] [Fwd: [patch/hppa] Floating point exception handling patch]
2006-01-15 23:38 [parisc-linux] [Fwd: [patch/hppa] Floating point exception handling patch] Randolph Chung
@ 2006-01-16 6:22 ` Grant Grundler
[not found] ` <20060116164050.GA4049@quicksilver.road.mcmartin.ca>
0 siblings, 1 reply; 3+ messages in thread
From: Grant Grundler @ 2006-01-16 6:22 UTC (permalink / raw)
To: Randolph Chung; +Cc: parisc-linux
On Mon, Jan 16, 2006 at 07:38:36AM +0800, Randolph Chung wrote:
> This affects packages that use feholdexcept and
> fesetenv, such as uic from QT.
It's not a very long list. I hacked the following short script
to search a local mirror I have access to.
Output from this script is appended at the end:
#!/bin/sh
#find -name \*.tar.gz
find pool -name \*.tar.gz | while read i
do
x=`tar xzf $i -O | fgrep feholdexcept > /dev/null`
if [ $? -eq 0 ]
then
echo $i
fi
done
[ In a related discussion, Randolph Chung noted "&& echo $i" would work.
I guess that would probably be a more efficient than "if [ $? -eq ...".
But I didn't want to restart the script to find out.
]
Obviously there are some false positives (e.g. lg-issue40 and manpages).
enjoy,
grant
pool/contrib/x/xmovie/xmovie_1.9.orig.tar.gz
pool/main/f/fpc/fpc_1.9.4.orig.tar.gz
pool/main/f/fpc/fpc_2.0.0.orig.tar.gz
pool/main/g/gccchecker/gccchecker_0.9.9.1.20011205.orig.tar.gz
pool/main/g/gnulib/gnulib_0.0.20051110.orig.tar.gz
pool/main/h/helpviewer.app/helpviewer.app_0.3.orig.tar.gz
pool/main/h/hercules/hercules_3.0.2.orig.tar.gz
pool/main/h/hercules/hercules_3.03.1.orig.tar.gz
pool/main/l/lg-issue40/lg-issue40_1.orig.tar.gz
pool/main/l/lg-issue40/lg-issue40_2.orig.tar.gz
pool/main/l/lsbappchk/lsbappchk_1.3.4.orig.tar.gz
pool/main/m/manpages/manpages_1.39.orig.tar.gz
pool/main/m/manpages/manpages_1.70.orig.tar.gz
pool/main/m/manpages/manpages_2.17.orig.tar.gz
pool/main/m/manpages-es/manpages-es_1.55.orig.tar.gz
pool/main/m/manpages-fr/manpages-fr_0.9.3.orig.tar.gz
pool/main/m/manpages-fr/manpages-fr_1.58.1.orig.tar.gz
pool/main/m/manpages-fr/manpages-fr_1.67.0.orig.tar.gz
pool/main/m/manpages-ja/manpages-ja_0.4.0.0.20020315.orig.tar.gz
pool/main/m/manpages-ja/manpages-ja_0.5.0.0.20050315.orig.tar.gz
pool/main/m/manpages-ja/manpages-ja_0.5.0.0.20051115.orig.tar.gz
pool/main/m/manpages-pl/manpages-pl_20020406.orig.tar.gz
pool/main/m/manpages-pl/manpages-pl_20051117.orig.tar.gz
pool/main/m/manpages-pl/manpages-pl_20050320.orig.tar.gz
pool/main/o/openmcl/openmcl_0.10.1.orig.tar.gz
pool/main/o/openmcl/openmcl_0.14.2.p1.o.tar.gz
pool/main/p/pspp/pspp_0.3.0.orig.tar.gz
pool/main/p/pspp/pspp_0.4.0.orig.tar.gz
pool/main/p/portmidi/portmidi_20041117.orig.tar.gz
pool/main/q/qt-x11-free/qt-x11-free_3.3.4.orig.tar.gz
pool/main/q/qt-x11-free/qt-x11-free_3.3.5.orig.tar.gz
pool/main/q/qt4-x11/qt4-x11_4.1.0.orig.tar.gz
pool/main/q/qt4-x11/qt4-x11_4.0.1.orig.tar.gz
pool/main/t/tcc/tcc_0.9.23.orig.tar.gz
pool/main/u/uclibc/uclibc_0.9.27.orig.tar.gz
pool/non-free/m/manpages-posix/manpages-posix_1.67-3.tar.gz
pool/non-free/m/manpages-posix/manpages-posix_2.16-1.tar.gz
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-01-16 22:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-15 23:38 [parisc-linux] [Fwd: [patch/hppa] Floating point exception handling patch] Randolph Chung
2006-01-16 6:22 ` Grant Grundler
[not found] ` <20060116164050.GA4049@quicksilver.road.mcmartin.ca>
[not found] ` <20060116170359.GE29884@tennyson.dodds.net>
2006-01-16 22:43 ` Grant Grundler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.