+2000-05-24 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile (libpthread-routines): Add pspinlock.
+ * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
+ Use struct _pthread_fastlock instead of pthread_spinlock_t.
+ * condvar.c: Likewise.
+ * internals.h: Likewise.
+ * join.c: Likewise.
+ * manager.c: Likewise.
+ * mutex.c: Likewise.
+ * pthread.c: Likewise.
+ * rwlock.c: Likewise.
+ * semaphore.c: Likewise.
+ * signals.c: Likewise.
+ * spinlock.h: Likewise.
+ * spinlock.c: Likewise. Remove pthread_spin_lock functions.
+ * sysdeps/alpha/pspinlock.c: New file.
+ * sysdeps/arm/pspinlock.c: New file.
+ * sysdeps/i386/pspinlock.c: New file.
+ * sysdeps/m68k/pspinlock.c: New file.
+ * sysdeps/mips/pspinlock.c: New file.
+ * sysdeps/powerpc/pspinlock.c: New file.
+ * sysdeps/sparc/sparc32/pspinlock.c: New file.
+ * sysdeps/sparc/sparc64/pspinlock.c: New file.
+ * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
+ back to _pthread_fastlock. Define new pthread_spinlock_t.
+
2000-05-24 Andreas Jaeger <aj@suse.de>
* sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
__inline_mathcode (__sgn, __x, \
return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0))
+/* __FAST_MATH__ is defined by gcc -ffast-math. */
+#ifdef __FAST_MATH__
__inline_mathcode (__pow2, __x, \
register long double __value; \
register long double __exponent; \
: "=t" (__value) : "0" (__value), "u" (__exponent)); \
return __value)
-#ifdef __USE_GNU
-# define __sincos_code \
+# ifdef __USE_GNU
+# define __sincos_code \
register long double __cosr; \
register long double __sinr; \
__asm __volatile__ \
{
__sincos_code;
}
-#endif
+# endif
/* Optimized inline implementation, sometimes with reduced precision
and/or argument range. */
-#define __expm1_code \
+# define __expm1_code \
register long double __value; \
register long double __exponent; \
register long double __temp; \
__inline_mathcodeNP_ (long double, __expm1l, __x, __expm1_code)
-#define __exp_code \
+# define __exp_code \
register long double __value; \
register long double __exponent; \
__asm __volatile__ \
return __value)
-#define __atan2_code \
- register long double __value; \
- __asm __volatile__ \
- ("fpatan" \
- : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); \
- return __value
-__inline_mathcodeNP2 (atan2, __y, __x, __atan2_code)
-__inline_mathcodeNP2_ (long double, __atan2l, __y, __x, __atan2_code)
-
-
-__inline_mathcodeNP2 (fmod, __x, __y, \
- register long double __value; \
- __asm __volatile__ \
- ("1: fprem\n\t" \
- "fnstsw %%ax\n\t" \
- "sahf\n\t" \
- "jp 1b" \
- : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); \
- return __value)
-
-
__inline_mathcodeNP2 (pow, __x, __y, \
register long double __value; \
register long double __exponent; \
("fscale" \
: "=t" (__value) : "0" (__value), "u" (__exponent)); \
return __value)
+#endif /* __FAST_MATH__ */
+
+
+#define __atan2_code \
+ register long double __value; \
+ __asm __volatile__ \
+ ("fpatan" \
+ : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); \
+ return __value
+__inline_mathcodeNP2 (atan2, __y, __x, __atan2_code)
+__inline_mathcodeNP2_ (long double, __atan2l, __y, __x, __atan2_code)
+
+
+__inline_mathcodeNP2 (fmod, __x, __y, \
+ register long double __value; \
+ __asm __volatile__ \
+ ("1: fprem\n\t" \
+ "fnstsw %%ax\n\t" \
+ "sahf\n\t" \
+ "jp 1b" \
+ : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); \
+ return __value)
__inline_mathopNP (sqrt, "fsqrt")
__inline_mathop_ (long double, __fabsl, "fabs")
#endif
+#ifdef __FAST_MATH__
/* The argument range of this inline version is reduced. */
__inline_mathopNP (sin, "fsin")
/* The argument range of this inline version is reduced. */
__inline_mathopNP (cos, "fcos")
-__inline_mathop_declNP (atan, "fld1; fpatan", "0" (__x) : "st(1)")
__inline_mathop_declNP (log, "fldln2; fxch; fyl2x", "0" (__x) : "st(1)")
__inline_mathop_declNP (log10, "fldlg2; fxch; fyl2x", "0" (__x) : "st(1)")
__inline_mathcodeNP (asin, __x, return __atan2l (__x, __sqrtl (1.0 - __x * __x)))
__inline_mathcodeNP (acos, __x, return __atan2l (__sqrtl (1.0 - __x * __x), __x))
+#endif /* __FAST_MATH__ */
+
+__inline_mathop_declNP (atan, "fld1; fpatan", "0" (__x) : "st(1)")
__inline_mathcode_ (long double, __sgn1l, __x, \
union { long double __xld; unsigned int __xi[3]; } __n = { __xld: __x }; \
#endif /* __USE_MISC */
/* Undefine some of the large macros which are not used anymore. */
-#undef __expm1_code
-#undef __exp_code
#undef __atan2_code
-#undef __sincos_code
+#ifdef __FAST_MATH__
+# undef __expm1_code
+# undef __exp_code
+# undef __sincos_code
+#endif /* __FAST_MATH__ */
#endif /* __NO_MATH_INLINES */