re PR target/21051 (sync tests ICE on ia64)
authorRichard Henderson <rth@redhat.com>
Sat, 16 Apr 2005 23:19:35 +0000 (16:19 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 16 Apr 2005 23:19:35 +0000 (16:19 -0700)
        PR target/21051
        * builtins.c (expand_builtin) <BUILT_IN_BOOL_COMPARE_AND_SWAP_*>:
        Use the mode of boolean_type_node when the user doesn't provide one.
        * config/ia64/sync.md (sync_lock_release<I48MODE>): Use operand 1.

From-SVN: r98239

gcc/ChangeLog
gcc/builtins.c
gcc/config/ia64/sync.md

index 9bba2c5a584ccac79f496a53e145806d8457ac83..d06854237e152383788e64f0e8137d294fbaaa3b 100644 (file)
@@ -1,3 +1,10 @@
+2005-04-16  Richard Henderson  <rth@redhat.com>
+
+       PR target/21051
+       * builtins.c (expand_builtin) <BUILT_IN_BOOL_COMPARE_AND_SWAP_*>:
+       Use the mode of boolean_type_node when the user doesn't provide one.
+       * config/ia64/sync.md (sync_lock_release<I48MODE>): Use operand 1.
+
 2005-04-16  Alexandre Oliva  <aoliva@redhat.com>
 
        PR target/20126
index 78a577f53fe83711649bb33e836c092cabc1e78d..f39a073951b634096f3a550992d775ea6cb57a62 100644 (file)
@@ -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);
index ed3304a7ad6eefb63f0866462928e16535c10f70..bca52b0d3ba7166bab0b80c82caec93ad505ed17 100644 (file)
 
 (define_expand "sync_lock_release<mode>"
   [(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]));