summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authormartynas <martynas@openbsd.org>2011-04-22 14:44:08 +0000
committermartynas <martynas@openbsd.org>2011-04-22 14:44:08 +0000
commit33772999e4ff3e83a84f667cee3ecd7120bc9aa9 (patch)
treec4a932c601f2b0cb72fa8ff90fa24b4e01af668b /lib/libc
parentMove things around after recent rc(8) changes. (diff)
downloadwireguard-openbsd-33772999e4ff3e83a84f667cee3ecd7120bc9aa9.tar.xz
wireguard-openbsd-33772999e4ff3e83a84f667cee3ecd7120bc9aa9.zip
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);