fix target/21051
Richard Henderson
rth@redhat.com
Sat Apr 16 23:19:00 GMT 2005
Dumb.
r~
* 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.
Index: gcc/builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.454
diff -u -p -d -r1.454 builtins.c
--- gcc/builtins.c 15 Apr 2005 05:43:46 -0000 1.454
+++ gcc/builtins.c 16 Apr 2005 23:15:48 -0000
@@ -6178,6 +6178,8 @@ expand_builtin (tree exp, rtx target, rt
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: gcc/config/ia64/sync.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/sync.md,v
retrieving revision 1.1
diff -u -p -d -r1.1 sync.md
--- gcc/config/ia64/sync.md 14 Apr 2005 23:53:02 -0000 1.1
+++ gcc/config/ia64/sync.md 16 Apr 2005 23:15:48 -0000
@@ -114,7 +114,7 @@
(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]));
More information about the Gcc-patches
mailing list