summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch
diff options
context:
space:
mode:
authormartynas <martynas@openbsd.org>2011-04-23 21:40:52 +0000
committermartynas <martynas@openbsd.org>2011-04-23 21:40:52 +0000
commitc12bd6a5d9b671f5655d2172d7a69405ad7859f5 (patch)
treec245464255a9b27f9ac53409d94fac7f8ce59ce8 /lib/libc/arch
parentDo not document FP_X_IOV--it's an alpha-only thing. Similarly like (diff)
downloadwireguard-openbsd-c12bd6a5d9b671f5655d2172d7a69405ad7859f5.tar.xz
wireguard-openbsd-c12bd6a5d9b671f5655d2172d7a69405ad7859f5.zip
Merge the same fix for hppa64; reminded by miod@:
Sticky flags are in the left half of fpsr;  not the undefined bits in the right half.  OK miod@.
Diffstat (limited to 'lib/libc/arch')
-rw-r--r--lib/libc/arch/hppa64/gen/fpsetsticky.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/arch/hppa64/gen/fpsetsticky.c b/lib/libc/arch/hppa64/gen/fpsetsticky.c
index c5733e0b8a1..c2b1c263964 100644
--- a/lib/libc/arch/hppa64/gen/fpsetsticky.c
+++ b/lib/libc/arch/hppa64/gen/fpsetsticky.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpsetsticky.c,v 1.1 2005/04/01 10:54:27 mickey Exp $ */
+/* $OpenBSD: fpsetsticky.c,v 1.2 2011/04/23 21:40:52 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);