mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-25 20:21:07 +00:00
2006-12-03 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove non-atomic versions. Adjust jump target to '0b'. 2006-12-03 Carlos O'Donell <carlos@systemhalted.org> * sysdeps/hppa/Makefile: Set long-double-fcts to `no'. * sysdeps/hppa/fpu/libm-test-ulps: Regenerate. * sysdeps/hppa/fpu/bits/mathdef.h: New file.
This commit is contained in:
parent
5dde01821a
commit
3ad1f14c7a
@ -1,3 +1,14 @@
|
||||
2006-12-03 Carlos O'Donell <carlos@systemhalted.org>
|
||||
|
||||
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove non-atomic
|
||||
versions. Adjust jump target to '0b'.
|
||||
|
||||
2006-12-03 Carlos O'Donell <carlos@systemhalted.org>
|
||||
|
||||
* sysdeps/hppa/Makefile: Set long-double-fcts to `no'.
|
||||
* sysdeps/hppa/fpu/libm-test-ulps: Regenerate.
|
||||
* sysdeps/hppa/fpu/bits/mathdef.h: New file.
|
||||
|
||||
2006-11-10 Carlos O'Donell <carlos@systemhalted.org>
|
||||
|
||||
* sysdeps/hppa/nptl/pthread_spin_init.c: New file.
|
||||
|
@ -39,3 +39,8 @@ sysdep_routines += libgcc-compat
|
||||
shared-only-routines += libgcc-compat
|
||||
endif
|
||||
endif
|
||||
|
||||
# We implement a 64-bit `long double'. The standard says we can do this.
|
||||
# This means our `long double' and `double' are identical.
|
||||
long-double-fcts = no
|
||||
|
||||
|
40
sysdeps/hppa/fpu/bits/mathdef.h
Normal file
40
sysdeps/hppa/fpu/bits/mathdef.h
Normal file
@ -0,0 +1,40 @@
|
||||
/* Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#if !defined _MATH_H && !defined _COMPLEX_H
|
||||
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
|
||||
#endif
|
||||
|
||||
#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
|
||||
# define _MATH_H_MATHDEF 1
|
||||
|
||||
/* GCC does not promote `float' values to `double'. */
|
||||
typedef float float_t; /* `float' expressions are evaluated as
|
||||
`float'. */
|
||||
typedef double double_t; /* `double' expressions are evaluated as
|
||||
`double'. */
|
||||
|
||||
/* The values returned by `ilogb' for 0 and NaN respectively. */
|
||||
# define FP_ILOGB0 (-2147483647)
|
||||
# define FP_ILOGBNAN (2147483647)
|
||||
|
||||
#endif /* ISO C99 */
|
||||
|
||||
/* On hppa `long double' is 64-bits. */
|
||||
#undef __NO_LONG_DOUBLE_MATH
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -22,14 +22,10 @@
|
||||
#include <abort-instr.h>
|
||||
#include <kernel-features.h>
|
||||
|
||||
/* We need EFAULT, ENONSYS, and EAGAIN */
|
||||
#if !defined EFAULT && !defined ENOSYS && !defined EAGAIN
|
||||
#undef EFAULT
|
||||
#undef ENOSYS
|
||||
#undef EAGAIN
|
||||
/* We need EFAULT, ENONSYS */
|
||||
#if !defined EFAULT && !defined ENOSYS
|
||||
#define EFAULT 14
|
||||
#define ENOSYS 251
|
||||
#define EAGAIN 11
|
||||
#endif
|
||||
|
||||
#ifndef _BITS_ATOMIC_H
|
||||
@ -57,10 +53,10 @@ typedef uintmax_t uatomic_max_t;
|
||||
|
||||
/* Use the kernel atomic light weight syscalls on hppa */
|
||||
#define LWS "0xb0"
|
||||
#define LWS_CAS 0x0
|
||||
#define LWS_CAS "0"
|
||||
/* Note r31 is the link register */
|
||||
#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory"
|
||||
#define ASM_EAGAIN -EAGAIN
|
||||
#define ASM_EAGAIN "11"
|
||||
|
||||
#if __ASSUME_LWS_CAS
|
||||
/* The only basic operation needed is compare and exchange. */
|
||||
@ -74,8 +70,8 @@ typedef uintmax_t uatomic_max_t;
|
||||
"copy %4, %%r25 \n\t" \
|
||||
"copy %5, %%r24 \n\t" \
|
||||
"ble " LWS "(%%sr2, %%r0) \n\t" \
|
||||
"ldi 0, %%r20 \n\t" \
|
||||
"cmpib,=,n " ASM_EAGAIN ",%%r21,0 \n\t" \
|
||||
"ldi " LWS_CAS ", %%r20 \n\t" \
|
||||
"cmpib,=,n " ASM_EAGAIN ",%%r21,0b \n\t" \
|
||||
"nop \n\t" \
|
||||
"stw %%r28, %0 \n\t" \
|
||||
"sub %%r0, %%r21, %%r21 \n\t" \
|
||||
@ -99,22 +95,9 @@ typedef uintmax_t uatomic_max_t;
|
||||
(ret != oldval); \
|
||||
})
|
||||
#else
|
||||
/* Non-atomic primitives. */
|
||||
# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
|
||||
({ __typeof (mem) __gmemp = (mem); \
|
||||
__typeof (*mem) __gret = *__gmemp; \
|
||||
__typeof (*mem) __gnewval = (newval); \
|
||||
\
|
||||
if (__gret == (oldval)) \
|
||||
*__gmemp = __gnewval; \
|
||||
__gret; })
|
||||
# error __ASSUME_LWS_CAS is required to build glibc.
|
||||
#endif
|
||||
/* __ASSUME_LWS_CAS */
|
||||
|
||||
# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
|
||||
({ __typeof (mem) __gmemp = (mem); \
|
||||
__typeof (*mem) __gnewval = (newval); \
|
||||
\
|
||||
*__gmemp == (oldval) ? (*__gmemp = __gnewval, 0) : 1; })
|
||||
#endif
|
||||
|
||||
#endif /* bits/atomic.h */
|
||||
|
||||
/* _BITS_ATOMIC_H */
|
||||
|
Loading…
Reference in New Issue
Block a user