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] Fix sparc -mvis -fpic


On Sat, Sep 23, 2000 at 09:36:45AM -0400, Jakub Jelinek wrote:
> On sparc (whether -m32 or -m64) when compiling with -mvis -fpic we generate
> wrong code in the case where there are no constant pool during rtl
> generation (so no %l7 set up is done), CSE merges two or more 0.0 constant
> loads and later on reload decides to give as a SYMBOL_REF instead of the
> actual CONST_DOUBLE to mov[sdt]f expanders.
> The following patch both fixes it and optimizes by checking out the constant
> pool for zero constants and using VIS (and %g0 storing) in those cases.
> Ok to commit?

No.  You're papering over the problem with %l7.  You need
to use a scheme more like powerpc or x86 in which you track
current_function_uses_pic_offset_table during reload.

As for the optimization, you must be missing something wrt
LEGITIMATE_CONSTANT_P or something.  Reload shouldn't have
wanted to dump the constant to memory in the first place;
you should not have to fish it out of the constant pool.



r~

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