fold_const.c/tree_swap_operands_p change from Oct 11 breaks m68k
Roger Sayle
roger@eyesopen.com
Sun Oct 26 07:52:00 GMT 2003
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
--
More information about the Gcc
mailing list