This is the mail archive of the gcc@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: regmove bug


>     if (GET_CODE (tmp) == SET)
> ! #ifdef HAVE_cc0
> !     return cc0_rtx;
> ! #else

That's the right direction, although incomplete.  We may not interpose
instrutions while cc0 is live, so for HAVE_cc0, we must always avoid
cc0_rtx. We still have to call discover_flags_reg to handle the
(albeit exotic) possibility that the add insn clobbers some other
register.

Considering this, I think it's best to remove all cc0 code from
discover_flags_reg, and in mark_flags_life_zones, add at the start:

#ifdef HAVE_cc0
  if (flags == NULL_RTX)
    flags = cc0_rtx;
  else if (flags != cc0_rtx)
    flags = pc_rtx
#endif


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