[PATCH] fesetround() bug fixed in hppa
> > I'm working on it. I'm entering examination period in university and my
> > time is disappearing. I'm fixing a fesetround() that was just seen on
> > HP's test-drive systems (getting more testing is great!).
>
> let me know if i can help :-)
> randolph
Fixed. Dpatch attached :)
c.
#! /bin/sh -e
# DP: Description: Corrects error in fesetround() when clearning FPU rounding mask.
# DP: Author: Carlos O'Donell <carlos@baldric.uwo.ca>
# DP: Upstream status: Submitted
# DP: Status: Details: Awaiting to hear from upstream.
# DP: Date: Monday December 2, 2002
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 -p1 < $0;;
-unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $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.
--- glibc-2.3.1/sysdeps/hppa/fpu/fesetround.c 2002-12-02 16:36:36.000000000 -0500
+++ glibc-2.3.1/sysdeps/hppa/fpu/fesetround.c 2002-12-02 16:36:59.000000000 -0500
@@ -31,7 +31,7 @@
/* Get the current status word. */
__asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
- sw[0] &= ~FE_UPWARD;
+ sw[0] &= ~FE_DOWNWARD;
sw[0] |= round;
__asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
Reply to: