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: splitting const_int's


On Tuesday 20 May 2008, Andrew Pinski wrote:
> On Tue, May 20, 2008 at 2:30 PM, Omar Torres <gcc.omar@gmail.com> wrote:
> > By looking at other ports, I learned that I can detect when this happens
> > by using the reg_overlap_mentioned_p(). Here is one case:
> > (insn 43 115 74 (set (reg:HI 7 %i0h)
> >         (mem/s/j:HI (plus:HI (reg/f:HI 7 %i0h [orig:39 source ] [39])
> >                 (const_int 2 [0x2])) [0 <variable>.r+0 S2 A8])) 3
> > {*movhi} (nil)
> >     (nil))
> >
> >   I need to tell the compiler not to use as destination the same base
> > register when doing index operations. Any suggestions on how do I that?
>
> Early clobber, that is using "=&r" as the constraint.

Does this work reliably for straight mov patterns and during reload? Sounds 
like in the general case it would need secondary reloads, which is a whole 
lot of extra magic.

I remember having similar problems with ARM doubleword loads and ended up 
having to hack round the restriction in the asm output routines, and outlaw 
some of the more problematic problematic autoincrement modes.

Paul


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