This is the mail archive of the gcc-patches@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]

Re: [PATCH] -fpic problems on PPC, a different approach


> cc: Franz.Sirl-kernel@lauterbach.com, egcs-patches@egcs.cygnus.com
> Reply-To: law@cygnus.com
> Date: Tue, 08 Jun 1999 22:24:29 -0600
> From: Jeffrey A Law <law@cygnus.com>
> 
> 
>   In message <199906080906.TAA00526@geoffk.wattle.id.au>you write:
>   > To be precise, it happens when something is spilled to memory by
>   > reload.
> Right.  I understand the general case.
> 
>   > This most commonly happens when the 'something' is a
>   > CONST_DOUBLE, but I don't think it's the only way.
> This aspect is target dependent -- what I was trying to find out is whether or
> not there's ever anything in a REG_EQUIV note that will get flushed to memory
> for the powerpc. 

There is.

>   > > You can force reload to ignore those constants in REG_EQUIV notes by defi
>   > ning
>   > > LEGITIMATE_PIC_OPERAND_P to reject a CONST_DOUBLE.    
>   > 
>   > This is pretty much what my ugly patch does.
> So, why didn't you use LEGITIMATE_PIC_OPERAND_P?

If I remember correctly, it didn't quite do what I wanted---I did look
at using it.

I think the problem is that on ppc, reload will try to spill all
CONST_DOUBLEs to memory, not just the ones in REG_EQUIV notes.  To be
safe, it was easier just to tell reload to not spill anything to
memory, which is precisely what is needed to be done anyway.

I think LEGITIMATE_PIC_OPERAND_P is used in other places than reload,
too, and that was causing trouble.

-- 
Geoffrey Keating <geoffk@ozemail.com.au>


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