From 5b5513d00e50d605b486a2b5b986f4170ae285f1 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 16 Apr 2005 16:19:35 -0700 Subject: [PATCH] re PR target/21051 (sync tests ICE on ia64) PR target/21051 * builtins.c (expand_builtin) : Use the mode of boolean_type_node when the user doesn't provide one. * config/ia64/sync.md (sync_lock_release): Use operand 1. From-SVN: r98239 --- gcc/ChangeLog | 7 +++++++ gcc/builtins.c | 2 ++ gcc/config/ia64/sync.md | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9bba2c5a584..d06854237e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-04-16 Richard Henderson + + PR target/21051 + * builtins.c (expand_builtin) : + Use the mode of boolean_type_node when the user doesn't provide one. + * config/ia64/sync.md (sync_lock_release): Use operand 1. + 2005-04-16 Alexandre Oliva PR target/20126 diff --git a/gcc/builtins.c b/gcc/builtins.c index 78a577f53fe..f39a073951b 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -6178,6 +6178,8 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_BOOL_COMPARE_AND_SWAP_2: case BUILT_IN_BOOL_COMPARE_AND_SWAP_4: case BUILT_IN_BOOL_COMPARE_AND_SWAP_8: + if (mode == VOIDmode) + mode = TYPE_MODE (boolean_type_node); if (!target || !register_operand (target, mode)) target = gen_reg_rtx (mode); target = expand_builtin_compare_and_swap (arglist, true, target); diff --git a/gcc/config/ia64/sync.md b/gcc/config/ia64/sync.md index ed3304a7ad6..bca52b0d3ba 100644 --- a/gcc/config/ia64/sync.md +++ b/gcc/config/ia64/sync.md @@ -114,7 +114,7 @@ (define_expand "sync_lock_release" [(set (match_operand:I48MODE 0 "memory_operand" "") - (const_int 0))] + (match_operand:I48MODE 1 "gr_reg_or_0_operand" ""))] "" { gcc_assert (MEM_VOLATILE_P (operands[0])); -- 2.30.2