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]
Other format: [Raw text]

Re: [PATCH] Fix PR optimization/8300 and target/9763 (Sparc)


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


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