summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2003-08-09 17:07:24 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2003-08-09 17:07:24 +0000
commit03bab8d60f762d48a064ef975053c63000947f33 (patch)
tree6768c09814b69365a9e53efa2f35199751b557bd /lib/libc
parent3d8239856cae570246a9b4d31f427c99496883d8 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/ia64/gen/fpgetmask.c2
-rw-r--r--lib/libc/ia64/gen/fpsetmask.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/ia64/gen/fpgetmask.c b/lib/libc/ia64/gen/fpgetmask.c
index f3beea81081d..2c4cadf6d0dd 100644
--- a/lib/libc/ia64/gen/fpgetmask.c
+++ b/lib/libc/ia64/gen/fpgetmask.c
@@ -36,5 +36,5 @@ fpgetmask(void)
u_int64_t fpsr;
__asm __volatile("mov %0=ar.fpsr" : "=r" (fpsr));
- return (fpsr & 0x1f) ^ 0x1f;
+ return (~fpsr & 0x3f);
}
diff --git a/lib/libc/ia64/gen/fpsetmask.c b/lib/libc/ia64/gen/fpsetmask.c
index c69dccbf1b19..be4d8b4f67a8 100644
--- a/lib/libc/ia64/gen/fpsetmask.c
+++ b/lib/libc/ia64/gen/fpsetmask.c
@@ -37,8 +37,8 @@ fpsetmask(fp_except_t mask)
u_int64_t oldmask;
__asm __volatile("mov %0=ar.fpsr" : "=r" (fpsr));
- oldmask = (fpsr & 0x1f) ^ 0x1f;
- fpsr = (fpsr & ~0x1f) | (mask ^ 0x1f);
+ oldmask = ~fpsr & 0x3f;
+ fpsr = (fpsr & ~0x3f) | (~mask & 0x3f);
__asm __volatile("mov ar.fpsr=%0" :: "r" (fpsr));
- return oldmask;
+ return (oldmask);
}