This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to force reloader(?) to respect clobber directive?


Jan,
yes, match_scratch does work...
But this is not that simple:

I have to decide do I or do I not need a scratch register upon next insn condition code.
So, if I can pass 'insn' to the preparation statement in expander (i need something like:
rtx nextinsn = NEXT_INSN(insn);) - everything fine!
But how?

Thanks,
Dmitry.

On Tue, 26 Feb 2002 20:34:16 +0100
Jan Hubicka <jh@suse.cz> wrote:

> > > On Tue, Feb 26, 2002 at 12:13:43PM +0300, Dmitry wrote:
> > > > (define_insn "tstsi"
> > > >   [(set (cc0) (match_operand:SI 0 "register_operand" "r"))
> > > >         (clobber (match_dup 0))]
> > > 
> > > The constraint must be "+r" in this case.
> My guess is that when expanding the insn you overwrite the input operand,
> you should not.
> In such situations you should probably use match_scratch construct to
> get the output operand.
> 
> Honza
> > > 
> > > 
> > > r~
> > > 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]