diff options
author | Martynas Venckus <martynas@cvs.openbsd.org> | 2011-04-23 21:40:53 +0000 |
---|---|---|
committer | Martynas Venckus <martynas@cvs.openbsd.org> | 2011-04-23 21:40:53 +0000 |
commit | 71c6c5dd0012b30411572131fca3dc01ae57134b (patch) | |
tree | 25f791a33fd41423f7ab54c6c956a07950f51d2e /lib | |
parent | fcfdbe9d4ef21a0df58c1cadf8d58f8db25210c2 (diff) |
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')
-rw-r--r-- | lib/libc/arch/hppa64/gen/fpsetsticky.c | 4 |
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); |