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

[Bug target/87949] PowerPC saves CR registers across calls


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87949

--- Comment #5 from meissner at linux dot ibm.com ---
On Fri, Nov 09, 2018 at 02:28:28AM +0000, bergner at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87949
> 
> --- Comment #3 from Peter Bergner <bergner at gcc dot gnu.org> ---
> What do you think we can do about that?  The call clobbers the ABI defined
> non-volatile CR regs, so we have to save/restore them.  I don't think we have
> any other option, other than telling GCC to never use the non-volatile CR regs
> so they never have to be saved/restored.  Does using -ffixed-cr2 -ffixed-cr3
> -ffixed-cr4 help?

I should clarify what I would like.  Yes, if the compiler needs to preserve the
CRs the current code works.  But it would be helpful if instead of trying to
preserve the CR across calls, that we re-do the initial comparison, instead of
trying to keep the CR live for so long.

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