PR target/21051
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Apr 2005 23:19:35 +0000 (23:19 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Apr 2005 23:19:35 +0000 (23:19 +0000)
        * 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98239 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 9bba2c5..d068542 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 78a577f..f39a073 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 ed3304a..bca52b0 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]));