This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: splitting const_int's
- From: "Andrew Pinski" <pinskia at gmail dot com>
- To: "Omar Torres" <gcc dot omar at gmail dot com>
- Cc: rdsandiford at googlemail dot com, gcc at gcc dot gnu dot org
- Date: Tue, 20 May 2008 14:35:12 -0700
- Subject: Re: splitting const_int's
- References: <178adb870805201430x60742020r3c8df56a89b14739@mail.gmail.com>
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. Though may I
suggest that you split before reload/ra.
-- Pinski