Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unfillable branch delay slots

0 views
Skip to first unread message

Joern Rennecke

unread,
Apr 25, 2001, 10:10:09 PM4/25/01
to
> How does it determine when a nop is required? If the delay-slot
> scheduler found something useful for the slot, I don't want to output
> a nop.

You can call dbr_sequence_length() to find out.

Joern Rennecke

unread,
Apr 25, 2001, 9:45:05 PM4/25/01
to
> 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?

Your output pattern in the .md file is supposed to emit the nop.

Greg McGary

unread,
Apr 25, 2001, 10:05:13 PM4/25/01
to
Joern Rennecke <amy...@cambridge.redhat.com> writes:

OK, I see it: test final_sequence.

Greg

Greg McGary

unread,
Apr 26, 2001, 12:28:15 PM4/26/01
to
l...@redhat.com writes:

> 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

l...@redhat.com

unread,
Apr 26, 2001, 10:40:48 AM4/26/01
to
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;

jeff

0 new messages