summaryrefslogtreecommitdiffstats
path: root/lib/msun/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msun/ia64')
-rw-r--r--lib/msun/ia64/fenv.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/msun/ia64/fenv.h b/lib/msun/ia64/fenv.h
index 98992b1..6f0240f 100644
--- a/lib/msun/ia64/fenv.h
+++ b/lib/msun/ia64/fenv.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG>
+ * Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -205,18 +205,29 @@ int feupdateenv(const fenv_t *__envp);
#if __BSD_VISIBLE
static __inline int
-fesetmask(int __mask)
+feenableexcept(int __mask)
{
fenv_t __newfpsr, __oldfpsr;
__stfpsr(&__oldfpsr);
- __newfpsr = (__oldfpsr | FE_ALL_EXCEPT) & ~__mask;
+ __newfpsr = __oldfpsr & ~(__mask & FE_ALL_EXCEPT);
__ldfpsr(__newfpsr);
return (~__oldfpsr & FE_ALL_EXCEPT);
}
static __inline int
-fegetmask(void)
+fedisableexcept(int __mask)
+{
+ fenv_t __newfpsr, __oldfpsr;
+
+ __stfpsr(&__oldfpsr);
+ __newfpsr = __oldfpsr | (__mask & FE_ALL_EXCEPT);
+ __ldfpsr(__newfpsr);
+ return (~__oldfpsr & FE_ALL_EXCEPT);
+}
+
+static __inline int
+fegetexcept(void)
{
fenv_t __fpsr;
OpenPOWER on IntegriCloud