summaryrefslogtreecommitdiff
path: root/sysdeps/m68k/fpu/__math.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-05-07 15:31:21 +0000
committerUlrich Drepper <drepper@redhat.com>1997-05-07 15:31:21 +0000
commit51702635af8445431054291c86aaace7c30b0970 (patch)
treee9cc4d28c401bd6046f71f62d186865d37c0141f /sysdeps/m68k/fpu/__math.h
parent1f07e6177553845817af5f7c90f148edd2e59d32 (diff)
* locale/categories.def: Change type of _NL_CTYPE_CLASS_NAMES and _NL_CTYPE_MAP_NAMES field to stringlist. Change name of _NL_CTYPE_CODESET_NAME to "charmap". * locale/localeinfo.h (enum value_type): Add stringlist. * locale/programs/locale.c (show_info): Handle stringlist. * locale/programs/charmap.c (charmap_read): If charmap file is not using the given name try to find it by looking through all available charmap files and compare the code set name. * locale/programs/locale.c (write_charmaps): Also print names of charset in <code_set_name> fields in the files. * elf/ldd.bash.in: Correct translatable strings. * posix/TESTS: Add some more tests for character class matching. * posix/regex.c: Merge with GNU awk version. (regex_compile): Use ISO C/amend 1 functions for character class handling. * posix/regex.h: Merge with GNU awk version. * posix/getopt.c: Declare as master copies. * posix/getopt1.c: Likewise. * posix/getopt.h: Likewise. * sysdeps/unix/sysv/linux/sys/mount.h: Add definitions for option value to mount functions. Patch by a sun <asun@zoology.washington.edu>. * stdio-common/bug4.c (main): Use /tmp/bug4.test for concurrency with other tests. * sunrpc/svc_run.c (svc_exit): New, defined. (svc_run): Test for svc_stop variable. * sysdeps/m68k/s_cexp.c: Rewritten. * sysdeps/m68k/s_cexpf.c: Likewise. * sysdeps/m68k/s_cexpl.c: Likewise.
Diffstat (limited to 'sysdeps/m68k/fpu/__math.h')
-rw-r--r--sysdeps/m68k/fpu/__math.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 92487f9b04..5dc4d2e066 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -153,6 +153,21 @@ __internal_inline_functions (float,f)
__internal_inline_functions (long double,l)
#undef __internal_inline_functions
+/* Get the m68881 condition codes, to quickly check multiple conditions. */
+static __inline__ unsigned long
+__m81_test (long double __val)
+{
+ unsigned long __fpsr;
+ __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val));
+ return __fpsr;
+}
+
+/* Bit values returned by __m81_test. */
+#define __M81_COND_NAN (1 << 24)
+#define __M81_COND_INF (2 << 24)
+#define __M81_COND_ZERO (4 << 24)
+#define __M81_COND_NEG (8 << 24)
+
#endif /* __LIBC_M81_MATH_INLINES */
/* The rest of the functions are available to the user. */
@@ -163,8 +178,12 @@ __m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \
{ \
float_type __mantissa, __exponent; \
int __iexponent; \
- if (__value == 0.0) \
+ unsigned long __fpsr; \
+ __asm("ftst%.x %1\n" \
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
+ if (__fpsr & (7 << 24)) \
{ \
+ /* Not finite or zero. */ \
*__expptr = 0; \
return __value; \
} \