public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Wrong insn length attribute
@ 2002-07-19 11:10 Momchil Velikov
  2002-07-19 12:14 ` Richard Earnshaw
  0 siblings, 1 reply; 2+ messages in thread
From: Momchil Velikov @ 2002-07-19 11:10 UTC (permalink / raw)
  To: gcc

Is there any problem if an insn has length attribute greater than the
real one?

I have a case, where during insn output, the insn pattern generated
depends (hrm ..., will depend) upon results of ``find_reg_note (insn,
REG_UNUSED, ...)'' and the generated insns have different lengths.

~velco

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

* Re: Wrong insn length attribute
  2002-07-19 11:10 Wrong insn length attribute Momchil Velikov
@ 2002-07-19 12:14 ` Richard Earnshaw
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2002-07-19 12:14 UTC (permalink / raw)
  To: Momchil Velikov; +Cc: gcc, Richard.Earnshaw

> Is there any problem if an insn has length attribute greater than the
> real one?
> 
> I have a case, where during insn output, the insn pattern generated
> depends (hrm ..., will depend) upon results of ``find_reg_note (insn,
> REG_UNUSED, ...)'' and the generated insns have different lengths.

I don't think anything in the MI part of the compiler relies on insn 
lengths.  There are passes that will calculate insn lengths and addresses 
for you if you provide that information (so that you can use branch 
shortening); but in the end, only the machine-dependent code will rely on 
that information.

So the answer is, if you don't rely on this information being exact, just 
a worse case value, then you will not have a problem.


R.

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

end of thread, other threads:[~2002-07-19 15:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-19 11:10 Wrong insn length attribute Momchil Velikov
2002-07-19 12:14 ` Richard Earnshaw

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