This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR optimization/8300 and target/9763 (Sparc)
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 23 Mar 2003 10:05:22 -0800
- Subject: Re: [PATCH] Fix PR optimization/8300 and target/9763 (Sparc)
- References: <200303231013.38468.ebotcazou@libertysurf.fr>
Eric Botcazou <ebotcazou at libertysurf dot fr> writes:
> The problem is the call to initialize_uninitialized_subregs(): this function
> is intended to initialize some pseudo-regs with 0. Now, on generic Sparc
> CPUs, FP regs can't be zeroed directly so we end up forcing 0.0 into memory
> in order to load it into the FP regs. But, given that we use indexed
> addressing, we need a new pseudo to do so, hence we abort in gen_reg_rtx().
>
> The proposed fix is to zero the FP regs with a 'fsub' in this case.
> Bootstrapped/regtested on sparc-sun-solaris2.8 (c,c++,objc,f77 3.2 branch)
> and sparc-sun-solaris2.9 (c,c++,objc,f77 3.3 branch).
OK for 3.3 and mainline.
Sparc experts: Is there a reason not to use fsub unconditionally to
clear floating-point registers? It seems like it would save space.
zw