diff options
Diffstat (limited to 'lib/libc/arch/sparc/gen/fpgetsticky.c')
-rw-r--r-- | lib/libc/arch/sparc/gen/fpgetsticky.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/libc/arch/sparc/gen/fpgetsticky.c b/lib/libc/arch/sparc/gen/fpgetsticky.c new file mode 100644 index 00000000000..417dec82f24 --- /dev/null +++ b/lib/libc/arch/sparc/gen/fpgetsticky.c @@ -0,0 +1,15 @@ +/* + * Written by J.T. Conklin, Apr 10, 1995 + * Public domain. + */ + +#include <ieeefp.h> + +fp_except +fpgetsticky() +{ + int x; + + __asm__("st %%fsr,%0" : "=m" (*&x)); + return (x >> 5) & 0x1f; +} |