summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorH.J. Lu <hjl@gnu.org>2003-04-24 17:23:57 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2003-04-24 10:23:57 -0700
commit0c79f08ba899758499a827ada69c7bd65f8f24e7 (patch)
tree93fce1d439325d845a90d552b9ad518ff40ed7c6 /gcc
parentf89862751006da3e7b6acebfab32c9f21d8ee41f (diff)
downloadgcc-0c79f08ba899758499a827ada69c7bd65f8f24e7.tar.gz
ia64.c (ia64_init_builtins): Add si_ftype_pdi_di_di for __sync_bool_compare_and_swap_di for int return type.
2003-04-24 H.J. Lu <hjl@gnu.org> * config/ia64/ia64.c (ia64_init_builtins): Add si_ftype_pdi_di_di for __sync_bool_compare_and_swap_di for int return type. * config/ia64/ia64intrin.h (__sync_bool_compare_and_swap_di): Change return type to int. (__sync_bool_compare_and_swap): Likewise. From-SVN: r66042
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/ia64/ia64.c9
-rw-r--r--gcc/config/ia64/ia64intrin.h8
3 files changed, 19 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9c916bb5a24..0de008ca108 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2003-04-24 H.J. Lu <hjl@gnu.org>
+
+ * config/ia64/ia64.c (ia64_init_builtins): Add si_ftype_pdi_di_di
+ for __sync_bool_compare_and_swap_di for int return type.
+
+ * config/ia64/ia64intrin.h (__sync_bool_compare_and_swap_di):
+ Change return type to int.
+ (__sync_bool_compare_and_swap): Likewise.
+
Thu Apr 24 16:55:26 CEST 2003 Jan Hubicka <jh@suse.cz>
* cfgbuild.c (make_edges): Do not use next_nonnote_insn when
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index ff290bdd78d..7eb3d2aed1f 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -7730,11 +7730,16 @@ ia64_init_builtins ()
psi_type_node, integer_type_node,
integer_type_node, NULL_TREE);
- /* __sync_val_compare_and_swap_di, __sync_bool_compare_and_swap_di */
+ /* __sync_val_compare_and_swap_di */
tree di_ftype_pdi_di_di
= build_function_type_list (long_integer_type_node,
pdi_type_node, long_integer_type_node,
long_integer_type_node, NULL_TREE);
+ /* __sync_bool_compare_and_swap_di */
+ tree si_ftype_pdi_di_di
+ = build_function_type_list (integer_type_node,
+ pdi_type_node, long_integer_type_node,
+ long_integer_type_node, NULL_TREE);
/* __sync_synchronize */
tree void_ftype_void
= build_function_type (void_type_node, void_list_node);
@@ -7767,7 +7772,7 @@ ia64_init_builtins ()
IA64_BUILTIN_VAL_COMPARE_AND_SWAP_DI);
def_builtin ("__sync_bool_compare_and_swap_si", si_ftype_psi_si_si,
IA64_BUILTIN_BOOL_COMPARE_AND_SWAP_SI);
- def_builtin ("__sync_bool_compare_and_swap_di", di_ftype_pdi_di_di,
+ def_builtin ("__sync_bool_compare_and_swap_di", si_ftype_pdi_di_di,
IA64_BUILTIN_BOOL_COMPARE_AND_SWAP_DI);
def_builtin ("__sync_synchronize", void_ftype_void,
diff --git a/gcc/config/ia64/ia64intrin.h b/gcc/config/ia64/ia64intrin.h
index c7bbd33e133..262dc20e4d0 100644
--- a/gcc/config/ia64/ia64intrin.h
+++ b/gcc/config/ia64/ia64intrin.h
@@ -19,13 +19,11 @@ extern long __sync_val_compare_and_swap_di (long *, long, long);
__sync_val_compare_and_swap_di((long *)(PTR),(long)(OLD),(long)(NEW)))
extern int __sync_bool_compare_and_swap_si (int *, int, int);
-extern long __sync_bool_compare_and_swap_di (long *, long, long);
+extern int __sync_bool_compare_and_swap_di (long *, long, long);
#define __sync_bool_compare_and_swap(PTR, OLD, NEW) \
((sizeof (*(PTR)) == sizeof(int)) \
- ? (__typeof__(*(PTR))) \
- __sync_bool_compare_and_swap_si((int *)(PTR),(int)(OLD),(int)(NEW)) \
- : (__typeof__(*(PTR))) \
- __sync_bool_compare_and_swap_di((long *)(PTR),(long)(OLD),(long)(NEW)))
+ ? __sync_bool_compare_and_swap_si((int *)(PTR),(int)(OLD),(int)(NEW)) \
+ : __sync_bool_compare_and_swap_di((long *)(PTR),(long)(OLD),(long)(NEW)))
extern void __sync_lock_release_si (int *);
extern void __sync_lock_release_di (long *);