Re: m68k bootstrap problem

2007-06-22 Thread Kenneth Zadeck
Roman Zippel wrote: > Hi, > > On Fri, 22 Jun 2007, Kenneth Zadeck wrote: > > >>> Index: gcc/gcc/reg-stack.c >>> === >>> --- gcc.orig/gcc/reg-stack.c >>> +++ gcc/gcc/reg-stack.c >>> @@ -2316,6 +2316,12 @@ subst_stack_regs (rtx insn,

Re: m68k bootstrap problem

2007-06-22 Thread Roman Zippel
Hi, On Fri, 22 Jun 2007, Kenneth Zadeck wrote: > > Index: gcc/gcc/reg-stack.c > > === > > --- gcc.orig/gcc/reg-stack.c > > +++ gcc/gcc/reg-stack.c > > @@ -2316,6 +2316,12 @@ subst_stack_regs (rtx insn, stack regsta > >if (NOTE_P

Re: m68k bootstrap problem

2007-06-22 Thread Kenneth Zadeck
Roman Zippel wrote: > Hi, > > On Wed, 20 Jun 2007, I wrote: > > >> Index: gcc/df-problems.c >> === >> --- gcc/df-problems.c(revision 125811) >> +++ gcc/df-problems.c(working copy) >> @@ -1574,7 +1574,7 @@ >>/* Ca

Re: m68k bootstrap problem

2007-06-21 Thread Kenneth Zadeck
Paolo Bonzini wrote: > + > + /* However a may or must clobber still still needs to > + kill the reg. */ > > Add here "so that REG_DEAD notes are later placed appropriately". Ok, > thanks! > > Paolo so is this an ok to commit with this change?

Re: m68k bootstrap problem

2007-06-21 Thread Paolo Bonzini
+ + /* However a may or must clobber still still needs to +kill the reg. */ Add here "so that REG_DEAD notes are later placed appropriately". Ok, thanks! Paolo

Re: m68k bootstrap problem

2007-06-21 Thread Andreas Schwab
Kenneth Zadeck <[EMAIL PROTECTED]> writes: > @@ -3985,6 +3988,11 @@ df_note_bb_compute (unsigned int bb_inde > = df_create_unused_note (insn, old_unused_notes, > def, live, do_not_gen, > artificial_

Re: m68k bootstrap problem

2007-06-21 Thread Kenneth Zadeck
Roman Zippel wrote: > Hi, > > On Wed, 20 Jun 2007, Kenneth Zadeck wrote: > > >> If we add the dead note there we are asserting that the value is >> modified by the caller. however it might not be and someone could write >> a piece of asm right after the call to use that reg if the person knew >>

Re: m68k bootstrap problem

2007-06-21 Thread Roman Zippel
Hi, On Wed, 20 Jun 2007, I wrote: > Index: gcc/df-problems.c > === > --- gcc/df-problems.c (revision 125811) > +++ gcc/df-problems.c (working copy) > @@ -1574,7 +1574,7 @@ >/* Call-clobbered registers die across exception and cal

Re: m68k bootstrap problem

2007-06-20 Thread Kenneth Zadeck
Roman Zippel wrote: > Hi, > > On Wed, 20 Jun 2007, Paolo Bonzini wrote: > > >>> This is one of the places where i slavishly copied what flow did. if >>> you want to change this, go test it on at least 7 platforms and fix all >>> of the problems that it causes. >>> >> I see. Can one of yo

Re: m68k bootstrap problem

2007-06-20 Thread Roman Zippel
Hi, On Wed, 20 Jun 2007, Paolo Bonzini wrote: > > This is one of the places where i slavishly copied what flow did. if > > you want to change this, go test it on at least 7 platforms and fix all > > of the problems that it causes. > > I see. Can one of you recap how it relates to the m68k probl

Re: m68k bootstrap problem

2007-06-20 Thread Kenneth Zadeck
Bernd Schmidt wrote: > Kenneth Zadeck wrote: >> Paolo Bonzini wrote: > having the dead note there is asserting to the register allocator > that > they are free to use that reg after the calll in any way that it > wants > and there is a (small) possibility that is wrong. IMO

Re: m68k bootstrap problem

2007-06-20 Thread Bernd Schmidt
Kenneth Zadeck wrote: Paolo Bonzini wrote: having the dead note there is asserting to the register allocator that they are free to use that reg after the calll in any way that it wants and there is a (small) possibility that is wrong. IMO there is nothing wrong with this. I agree with Roman.

Re: m68k bootstrap problem

2007-06-20 Thread Paolo Bonzini
This is one of the places where i slavishly copied what flow did. if you want to change this, go test it on at least 7 platforms and fix all of the problems that it causes. I see. Can one of you recap how it relates to the m68k problem, though? :-) Paolo

Re: m68k bootstrap problem

2007-06-20 Thread Kenneth Zadeck
Paolo Bonzini wrote: > >>> having the dead note there is asserting to the register allocator that >>> they are free to use that reg after the calll in any way that it wants >>> and there is a (small) possibility that is wrong. >> >> IMO there is nothing wrong with this. > > I agree with Roman. You

Re: m68k bootstrap problem

2007-06-20 Thread Kenneth Zadeck
Roman Zippel wrote: > Hi, > > On Wed, 20 Jun 2007, Kenneth Zadeck wrote: > > >> If we add the dead note there we are asserting that the value is >> modified by the caller. however it might not be and someone could write >> a piece of asm right after the call to use that reg if the person knew >>

Re: m68k bootstrap problem

2007-06-20 Thread Paolo Bonzini
having the dead note there is asserting to the register allocator that they are free to use that reg after the calll in any way that it wants and there is a (small) possibility that is wrong. IMO there is nothing wrong with this. I agree with Roman. You can always put your call into an asm

Re: m68k bootstrap problem

2007-06-20 Thread Roman Zippel
Hi, On Wed, 20 Jun 2007, Kenneth Zadeck wrote: > If we add the dead note there we are asserting that the value is > modified by the caller. however it might not be and someone could write > a piece of asm right after the call to use that reg if the person knew > that the reg was not modified by t

Re: m68k bootstrap problem

2007-06-20 Thread Kenneth Zadeck
Roman Zippel wrote: > Hi, > > On Wed, 20 Jun 2007, Kenneth Zadeck wrote: > > >>> I don't understand, wouldn't the consertive approach be that the value >>> simply doesn't survive? >>> >>> >> No, the conservative is that we do not know anything. it could be >> destroyed and it could not

Re: m68k bootstrap problem

2007-06-20 Thread Roman Zippel
Hi, On Wed, 20 Jun 2007, Kenneth Zadeck wrote: > > I don't understand, wouldn't the consertive approach be that the value > > simply doesn't survive? > > > No, the conservative is that we do not know anything. it could be > destroyed and it could not be destroyed. What is the value of this? I

Re: m68k bootstrap problem

2007-06-20 Thread Kenneth Zadeck
Roman Zippel wrote: > Hi, > > On Wed, 20 Jun 2007, Kenneth Zadeck wrote: > > >> For certain regs, the subroutine may or may not modify the value. The >> better information alluded to is information that one might get by doing >> interprocedural analysis. Without such information you have to as

Re: m68k bootstrap problem

2007-06-20 Thread Roman Zippel
Hi, On Wed, 20 Jun 2007, Kenneth Zadeck wrote: > For certain regs, the subroutine may or may not modify the value. The > better information alluded to is information that one might get by doing > interprocedural analysis. Without such information you have to assume > that the value may or may n

Re: m68k bootstrap problem

2007-06-20 Thread Kenneth Zadeck
Roman Zippel wrote: > Hi, > > On Tue, 19 Jun 2007, Kenneth Zadeck wrote: > > > > Another question I have is about DF_REF_MAY_CLOBBER, any function call > would also clobber the return value and I see defs generated for calls, > but they are only marked with DF_REF_MAY_CLOBBER and thus the use c

Re: m68k bootstrap problem

2007-06-20 Thread Roman Zippel
Hi, On Tue, 19 Jun 2007, Kenneth Zadeck wrote: > The reason that there is no reg_dead not in the last use (insn 45) > before the sib_call (insn 46) is that there is no def for r0 in the > sibcall (insn 46) and r0 is live at the end of the block. > > This of course changes the question to not wh

Re: m68k bootstrap problem

2007-06-19 Thread Kenneth Zadeck
Roman Zippel wrote: > Hi, > > m68k currently doesn't bootstrap, which I think is dataflow related, the > whole precompiled file is at http://www.xs4all.nl/~zippel/expmed.i.gz, but > the small test below should be enough to demonstrate the problem > (although it doesn't crash): > > int fi1(int);

Re: m68k bootstrap problem

2007-06-19 Thread Roman Zippel
Hi, On Tue, 19 Jun 2007, Kenneth Zadeck wrote: > roman do i need any patches to apply before trying this. None should be needed, but this one can't hurt: http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01247.html > also what are > the config options i need? I use --target=m68k-linux-gnu --enable

Re: m68k bootstrap problem

2007-06-19 Thread Kenneth Zadeck
Roman Zippel wrote: > Hi, > > m68k currently doesn't bootstrap, which I think is dataflow related, the > whole precompiled file is at http://www.xs4all.nl/~zippel/expmed.i.gz, but > the small test below should be enough to demonstrate the problem > (although it doesn't crash): > > int fi1(int);

m68k bootstrap problem

2007-06-19 Thread Roman Zippel
Hi, m68k currently doesn't bootstrap, which I think is dataflow related, the whole precompiled file is at http://www.xs4all.nl/~zippel/expmed.i.gz, but the small test below should be enough to demonstrate the problem (although it doesn't crash): int fi1(int); int fi2(int); void *fp1(int, void