This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fold_const.c/tree_swap_operands_p change from Oct 11 breaks m68k
- From: Roger Sayle <roger at eyesopen dot com>
- To: Gunther Nikl <gni at gecko dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 25 Oct 2003 14:13:57 -0600 (MDT)
- Subject: Re: fold_const.c/tree_swap_operands_p change from Oct 11 breaks m68k
I previously wrote:
> Unless someone can point out the obvious mistake, I'll have to step
> through the relevant bits of gcc within gdb.
Ok, it looks like the bug is in the depths of final_scan_insn. The
missing instruction is recorded in the variable last_ignored_compare
on line 2186 of final.c, with the intention this cc0 setter will be
emitted by the immediately following conditional branch instruction.
Unfortunately, when processing the following instruction, the call
to get_insn_template returns "jbls %l0" rather than 0, so we never
emit the last_ignored_compare instruction.
I'm not sure how this is supposed to work, but it clearly doesn't.
Any cc0/final experts, care to make a suggestion?
Roger
--