This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix sparc -mvis -fpic
- To: Jakub Jelinek <jakub at redhat dot com>
- Subject: Re: [PATCH] Fix sparc -mvis -fpic
- From: Richard Henderson <rth at cygnus dot com>
- Date: Sat, 23 Sep 2000 19:07:51 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20000923093645.J18382@devserv.devel.redhat.com>
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.