summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2011-04-22 14:44:09 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2011-04-22 14:44:09 +0000
commit8618b052faf72be464af8a44d50a7a46aaea0fb2 (patch)
tree82abca39f976dea18b2c403235d8010ed3027979 /lib/libc
parente3a0cff777f97440260827308a586f4bf0db6eca (diff)
Sticky flags are in the left half of fpsr; not the undefined bits
in the right half. OK miod@.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arch/hppa/gen/fpsetsticky.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/arch/hppa/gen/fpsetsticky.c b/lib/libc/arch/hppa/gen/fpsetsticky.c
index eac7d3743f3..74620aa2a5e 100644
--- a/lib/libc/arch/hppa/gen/fpsetsticky.c
+++ b/lib/libc/arch/hppa/gen/fpsetsticky.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpsetsticky.c,v 1.4 2004/01/05 06:06:16 otto Exp $ */
+/* $OpenBSD: fpsetsticky.c,v 1.5 2011/04/22 14:44:08 martynas Exp $ */
/*
* Written by Miodrag Vallat. Public domain
@@ -15,7 +15,7 @@ fpsetsticky(mask)
fp_except old;
__asm__ __volatile__("fstd %%fr0,0(%1)" : "=m" (fpsr) : "r" (&fpsr));
- old = (fpsr >> 27) & 0x1f;
+ old = (fpsr >> 59) & 0x1f;
fpsr = (fpsr & 0x07ffffff00000000LL) | ((u_int64_t)(mask & 0x1f) << 59);
__asm__ __volatile__("fldd 0(%0),%%fr0" : : "r" (&fpsr));
return (old);