fix compile/sync-1.c on ia64
Richard Henderson
rth@redhat.com
Tue May 10 16:21:00 GMT 2005
Cut and paste error from sync_old_add pattern.
Tested on ia64-linux.
r~
* config/ia64/sync.md (sync_add<I48MODE>): Fix arguments for
no return value pattern.
Index: config/ia64/sync.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/sync.md,v
retrieving revision 1.3
diff -u -p -d -r1.3 sync.md
--- config/ia64/sync.md 20 Apr 2005 04:54:03 -0000 1.3
+++ config/ia64/sync.md 10 May 2005 16:15:54 -0000
@@ -32,15 +32,17 @@
[(set_attr "itanium_class" "syst_m")])
(define_expand "sync_add<mode>"
- [(match_operand:I48MODE 0 "gr_register_operand" "")
- (match_operand:I48MODE 1 "memory_operand" "")
- (match_operand:I48MODE 2 "general_operand" "")]
+ [(match_operand:I48MODE 0 "memory_operand" "")
+ (match_operand:I48MODE 1 "general_operand" "")]
""
{
- if (!fetchadd_operand (operands[2], <MODE>mode))
+ rtx tmp;
+ if (!fetchadd_operand (operands[1], <MODE>mode))
FAIL;
+
+ tmp = gen_reg_rtx (<MODE>mode);
emit_insn (gen_memory_barrier ());
- emit_insn (gen_fetchadd_acq_<mode> (operands[0], operands[1], operands[2]));
+ emit_insn (gen_fetchadd_acq_<mode> (tmp, operands[0], operands[1]));
DONE;
})
More information about the Gcc-patches
mailing list