This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
loop.c bugfix
- To: egcs-patches at cygnus dot com
- Subject: loop.c bugfix
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sat, 21 Nov 1998 22:14:42 -0700
- Reply-To: law at cygnus dot com
This keeps the compiler from aborting if the target does not have a 2 operand
instruction to increment/decrement a register value.
Sat Nov 21 22:12:09 1998 Jeffrey A Law (law@cygnus.com)
* loop.c (check_dbra_loop): Avoid using gen_add2_insn.
*************** check_dbra_loop (loop_end, insn_count, l
*** 7050,7059 ****
better to have a testcase first. */
return 0;
! /* Add insn to decrement register, and delete insn
! that incremented the register. */
! p = emit_insn_before (gen_add2_insn (reg, new_add_val),
! bl->biv->insn);
delete_insn (bl->biv->insn);
/* Update biv info to reflect its new status. */
--- 7061,7074 ----
better to have a testcase first. */
return 0;
! /* We may not have a single insn which can increment a reg, so
! create a sequence to hold all the insns from expand_inc. */
! start_sequence ();
! expand_inc (reg, new_add_val);
! tem = gen_sequence ();
! end_sequence ();
!
! p = emit_insn_before (tem, bl->biv->insn);
delete_insn (bl->biv->insn);
/* Update biv info to reflect its new status. */