aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ia64/bits
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /sysdeps/ia64/bits
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.bz2
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'sysdeps/ia64/bits')
-rw-r--r--sysdeps/ia64/bits/atomic.h23
-rw-r--r--sysdeps/ia64/bits/link.h68
-rw-r--r--sysdeps/ia64/bits/linkmap.h5
-rw-r--r--sysdeps/ia64/bits/mathdef.h37
4 files changed, 20 insertions, 113 deletions
diff --git a/sysdeps/ia64/bits/atomic.h b/sysdeps/ia64/bits/atomic.h
index 1020c2f229..e7d312c539 100644
--- a/sysdeps/ia64/bits/atomic.h
+++ b/sysdeps/ia64/bits/atomic.h
@@ -52,12 +52,12 @@ typedef uintmax_t uatomic_max_t;
(abort (), 0)
#define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
- (!__sync_bool_compare_and_swap ((mem), (int) (long) (oldval), \
- (int) (long) (newval)))
+ (!__sync_bool_compare_and_swap_si ((void *) (mem), (int) (long) (oldval), \
+ (int) (long) (newval)))
#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
- (!__sync_bool_compare_and_swap ((mem), (long) (oldval), \
- (long) (newval)))
+ (!__sync_bool_compare_and_swap_di ((void *) (mem), (long) (oldval), \
+ (long) (newval)))
#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
(abort (), (__typeof (*mem)) 0)
@@ -66,11 +66,12 @@ typedef uintmax_t uatomic_max_t;
(abort (), (__typeof (*mem)) 0)
#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- __sync_val_compare_and_swap ((mem), (int) (long) (oldval), \
- (int) (long) (newval))
+ __sync_val_compare_and_swap_si ((void *) (mem), (int) (long) (oldval), \
+ (int) (long) (newval))
#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
- __sync_val_compare_and_swap ((mem), (long) (oldval), (long) (newval))
+ __sync_val_compare_and_swap_di ((void *) (mem), (long) (oldval), \
+ (long) (newval))
/* Atomically store newval and return the old value. */
#define atomic_exchange_acq(mem, value) \
@@ -79,9 +80,15 @@ typedef uintmax_t uatomic_max_t;
#define atomic_exchange_rel(mem, value) \
(__sync_synchronize (), __sync_lock_test_and_set (mem, value))
+
#define atomic_exchange_and_add(mem, value) \
({ __typeof (*mem) __result; \
- __result = __sync_fetch_and_add ((mem), (int) (value)); \
+ if (sizeof (*mem) == 4) \
+ __result = __sync_fetch_and_add_si ((void *) (mem), (int) (value)); \
+ else if (sizeof (*mem) == 8) \
+ __result = __sync_fetch_and_add_di ((void *) (mem), (long) (value)); \
+ else \
+ abort (); \
__result; })
#define atomic_decrement_if_positive(mem) \
diff --git a/sysdeps/ia64/bits/link.h b/sysdeps/ia64/bits/link.h
index f751c23fd1..7f8b0550d9 100644
--- a/sysdeps/ia64/bits/link.h
+++ b/sysdeps/ia64/bits/link.h
@@ -1,63 +1,5 @@
-/* Copyright (C) 2005 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. */
-
-#ifndef _LINK_H
-# error "Never include <bits/link.h> directly; use <link.h> instead."
-#endif
-
-/* Registers for entry into PLT on ia64. */
-typedef struct La_ia64_regs
-{
- uint64_t lr_r8;
- uint64_t lr_r9;
- uint64_t lr_r10;
- uint64_t lr_r11;
- uint64_t lr_gr [8];
- long double lr_fr [8];
- uint64_t lr_unat;
- uint64_t lr_sp;
-} La_ia64_regs;
-
-/* Return values for calls from PLT on ia64. */
-typedef struct La_ia64_retval
-{
- uint64_t lrv_r8;
- uint64_t lrv_r9;
- uint64_t lrv_r10;
- uint64_t lrv_r11;
- long double lr_fr [8];
-} La_ia64_retval;
-
-
-__BEGIN_DECLS
-
-extern Elf64_Addr la_ia64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx,
- uintptr_t *__refcook,
- uintptr_t *__defcook,
- La_ia64_regs *__regs,
- unsigned int *__flags,
- const char *__symname,
- long int *__framesizep);
-extern unsigned int la_ia64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx,
- uintptr_t *__refcook,
- uintptr_t *__defcook,
- const La_ia64_regs *__inregs,
- La_ia64_retval *__outregs,
- const char *symname);
-
-__END_DECLS
+struct link_map_machine
+ {
+ size_t fptr_table_len;
+ Elf64_Addr *fptr_table;
+ };
diff --git a/sysdeps/ia64/bits/linkmap.h b/sysdeps/ia64/bits/linkmap.h
deleted file mode 100644
index 7f8b0550d9..0000000000
--- a/sysdeps/ia64/bits/linkmap.h
+++ /dev/null
@@ -1,5 +0,0 @@
-struct link_map_machine
- {
- size_t fptr_table_len;
- Elf64_Addr *fptr_table;
- };
diff --git a/sysdeps/ia64/bits/mathdef.h b/sysdeps/ia64/bits/mathdef.h
deleted file mode 100644
index 3dc2860223..0000000000
--- a/sysdeps/ia64/bits/mathdef.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 2000, 2001, 2004 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
-
-/* The IA-64 architecture computes values with the precision of the
- used type. */
-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 - 1)
-# define FP_ILOGBNAN 2147483647
-
-#endif /* ISO C99 */