Unfillable branch delay slots

Greg McGary greg@mcgary.org
Thu Apr 26 09:03:00 GMT 2001


law@redhat.com writes:

>   In message < 200104260015.RAA02782@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



More information about the Gcc mailing list