public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Error while using LOG_LINKS information.
@ 2004-04-27 18:30 kernel_learner
  2004-04-27 18:48 ` Dave Korn
  0 siblings, 1 reply; 2+ messages in thread
From: kernel_learner @ 2004-04-27 18:30 UTC (permalink / raw)
  To: gcc

Hi all,

 IN a machine-dependent-reorg pass that I am writing I
wrote a simple piece of code which traverses the
LOG_LINKS:

for(;insns;insns=NEXT_INSN(insns))
{
   for(link = LOG_LINKS (insns); link; link =
XEXP(link, 1));
}
This gives me a problem while building gcc:

make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory
`/home/SOK_STUFF/or1k/b-gcc/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory
`/home/SOK_STUFF/or1k/b-gcc/gcc'
make: *** [all-gcc] Error 2

I am sure that the problem is cause by this code since
if I take it away it builds PERFECT!

Is the LOG_LINKS information corrupted or invalid at
the machine dependent reorganization part. Or am I
traversing it wrong?

Thanks
KL


	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

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

* RE: Error while using LOG_LINKS information.
  2004-04-27 18:30 Error while using LOG_LINKS information kernel_learner
@ 2004-04-27 18:48 ` Dave Korn
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Korn @ 2004-04-27 18:48 UTC (permalink / raw)
  To: gcc

> -----Original Message-----
> From: gcc-owner On Behalf Of kernel_learner
> Sent: 27 April 2004 17:35

> Hi all,
> 
>  IN a machine-dependent-reorg pass that I am writing I
> wrote a simple piece of code which traverses the
> LOG_LINKS:
> 
> for(;insns;insns=NEXT_INSN(insns))
> {
>    for(link = LOG_LINKS (insns); link; link =
> XEXP(link, 1));
> }
> This gives me a problem while building gcc:
> 
> make[2]: *** [libgcc/./_muldi3.o] Error 1
> make[2]: Leaving directory
> `/home/SOK_STUFF/or1k/b-gcc/gcc'
> make[1]: *** [libgcc.a] Error 2
> make[1]: Leaving directory
> `/home/SOK_STUFF/or1k/b-gcc/gcc'
> make: *** [all-gcc] Error 2
> 
> I am sure that the problem is cause by this code since
> if I take it away it builds PERFECT!
> 
> Is the LOG_LINKS information corrupted or invalid at
> the machine dependent reorganization part. Or am I
> traversing it wrong?

  From my reading of the docs, LOG_LINKS (insn) is only valid if the insn is
of type insn, call_insn or jump_insn.  You should make sure in your outer
loop that insn is of one of those types before the inner loop is allowed to
run, otherwise you might be applying LOG_LINKS to a code_label, barrier or
note.

  Or it could be some kind of corruption, if that doesn't fix it.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....

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

end of thread, other threads:[~2004-04-27 17:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-27 18:30 Error while using LOG_LINKS information kernel_learner
2004-04-27 18:48 ` Dave Korn

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