Commit dca13767 by Jakub Jelinek Committed by Jakub Jelinek

ia64.c (ia64_expand_atomic_op): Only use fetchadd{4,8}.acq instruction if CODE is PLUS or MINUS...

	* config/ia64/ia64.c (ia64_expand_atomic_op): Only use
	fetchadd{4,8}.acq instruction if CODE is PLUS or MINUS, for MINUS
	negate VAL.

From-SVN: r107703
parent 1941069a
2005-11-30 Jakub Jelinek <jakub@redhat.com>
* config/ia64/ia64.c (ia64_expand_atomic_op): Only use
fetchadd{4,8}.acq instruction if CODE is PLUS or MINUS, for MINUS
negate VAL.
2005-11-30 Paolo Bonzini <bonzini@gnu.org>
* simplify-rtx.c (simplify_plus_minus): Remove final parameter.
......
......@@ -2039,8 +2039,13 @@ ia64_expand_atomic_op (enum rtx_code code, rtx mem, rtx val,
enum insn_code icode;
/* Special case for using fetchadd. */
if ((mode == SImode || mode == DImode) && fetchadd_operand (val, mode))
if ((mode == SImode || mode == DImode)
&& (code == PLUS || code == MINUS)
&& fetchadd_operand (val, mode))
{
if (code == MINUS)
val = GEN_INT (-INTVAL (val));
if (!old_dst)
old_dst = gen_reg_rtx (mode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment