public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Puzzle about mips pipeline description
@ 2010-03-09  5:22 Amker.Cheng
  2010-03-09 15:04 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Amker.Cheng @ 2010-03-09  5:22 UTC (permalink / raw)
  To: gcc

Hi All:
  In gcc internal, section 16.19.8, there is a rule about
"define_insn_reservation" like:
"`condition` defines what RTL insns are described by this
construction. You should re-
member that you will be in trouble if `condition` for two or more
different `define_insn_
reservation` constructors if TRUE for an insn".

  While in mips.md, pipeline description for each processor are
included along with
generic.md, which providing a fallback for processor without specific
pipeline description.

  Here is the PUZZLE: Won't `define_insn_reservation` constructors
from both specific
processor's and the generic md file break the rule mentioned before?
For example, It seems
conditions for the r3k_load(from 3000.md) and generic_load(from
generic.md) are both TRUE
for lw insn.

Further more,
In those md files for specific processors, It is said that these
description are supposed to
override parts of generic md file, but i don't know how it works
without reading codes in
genautomata.c.

Please help me out, Thanks very much.

-- 
Best Regards.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Puzzle about mips pipeline description
  2010-03-09  5:22 Puzzle about mips pipeline description Amker.Cheng
@ 2010-03-09 15:04 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2010-03-09 15:04 UTC (permalink / raw)
  To: Amker.Cheng; +Cc: gcc

"Amker.Cheng" <amker.cheng@gmail.com> writes:

>   In gcc internal, section 16.19.8, there is a rule about
> "define_insn_reservation" like:
> "`condition` defines what RTL insns are described by this
> construction. You should re-
> member that you will be in trouble if `condition` for two or more
> different `define_insn_
> reservation` constructors if TRUE for an insn".
>
>   While in mips.md, pipeline description for each processor are
> included along with
> generic.md, which providing a fallback for processor without specific
> pipeline description.
>
>   Here is the PUZZLE: Won't `define_insn_reservation` constructors
>From both specific
> processor's and the generic md file break the rule mentioned before?
> For example, It seems
> conditions for the r3k_load(from 3000.md) and generic_load(from
> generic.md) are both TRUE
> for lw insn.

Looks to me like the MIPS backend is relying on undocumented
behaviour: when multiple define_insn_reservation statements match, the
automata will match them in order.  It would be better if the
define_insn_reservation in generic.md checked "cpu".

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-09 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-09  5:22 Puzzle about mips pipeline description Amker.Cheng
2010-03-09 15:04 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).