This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]