/* Machine-dependent software floating-point definitions.
Sparc userland (_Q_*) version.
- Copyright (C) 1997,1998,1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz) and
#define _FP_NANSIGN_Q 0
#define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
/* If one NaN is signaling and the other is not,
* we choose that one, otherwise we choose X.
#define FP_EX_DIVZERO (1 << 1)
#define FP_EX_INEXACT (1 << 0)
-#define _FP_DECL_EX fpu_control_t _fcw
+#define _FP_DECL_EX \
+ fpu_control_t _fcw __attribute__ ((unused)) = (FP_RND_NEAREST << 30)
#define FP_INIT_ROUNDMODE \
do { \
_FPU_GETCW(_fcw); \
} while (0)
+#define FP_TRAPPING_EXCEPTIONS ((_fcw >> 23) & 0x1f)
+#define FP_INHIBIT_RESULTS ((_fcw >> 23) & _fex)
+
/* Simulate exceptions using double arithmetics. */
-extern double ___Q_simulate_exceptions(int exc);
+extern void ___Q_simulate_exceptions(int exc);
#define FP_HANDLE_EXCEPTIONS \
do { \
/* This is the common case, so we do it inline. \
* We need to clear cexc bits if any. \
*/ \
- extern unsigned long long ___Q_numbers[]; \
- __asm__ __volatile__("\
- ldd [%0], %%f30\n\
- faddd %%f30, %%f30, %%f30\
- " : : "r" (___Q_numbers) : "f30"); \
+ extern unsigned long long ___Q_zero; \
+ __asm__ __volatile__("ldd [%0], %%f30\n\t" \
+ "faddd %%f30, %%f30, %%f30" \
+ : : "r" (&___Q_zero) : "f30"); \
} \
else \
___Q_simulate_exceptions (_fex); \