You can call dbr_sequence_length() to find out.
Your output pattern in the .md file is supposed to emit the nop.
> In message <2001042600...@kayak.mcgary.org>you write:
> > My MIPS-like port fails to generate NOP to fill a delay slot when no
> > useful insn will fit. I don't see any mention of this case in the
> > GCC manual. How is this supposed to be done?
> Typically your patterns which have delay slots will need to use something
> like %# in their output template.
>
> Then in your print_operand you'd have code like this:
>
> case '#':
> /* Output a 'nop' if there's nothing for the delay slot. */
> if (dbr_sequence_length () == 0)
> fputs ("\n\tnop", file);
> return;
That's exactly what I did, except that I simply tested final_sequence
for NULL_RTX. Thanks! The port is in pretty good shape now, and
passes just over half of the execution tests in C-torture. I'll bet
90% of the failures are caused by just a couple simple, stupid bugs.
Thanks,
Greg
Then in your print_operand you'd have code like this:
case '#':
/* Output a 'nop' if there's nothing for the delay slot. */
if (dbr_sequence_length () == 0)
fputs ("\n\tnop", file);
return;
jeff