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

--- Comment #7 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
(In reply to Andreas Krebbel from comment #6)
> Alternatively I could also mark r12 as preserved across function calls for
> -fpic in the backend. In fact all the bits we care about are preserved.
> Since the register is fixed all the accesses do come from the backend itself.

Ah, yeah, that sounds good to me FWIW.

> That's similar to what I was trying with the fixed_regs hack. But I agree
> that this might not be correct in general.
> 
> The full fix is probably to track the exact parts of partially clobbered
> regs which stay live but this would be a major change.

Yeah.  If you do the above, I'll open a new PR for the underlying
gcse.c issue, since I think the problem is latent on targets that
have “real” partially-clobbered registers.

Reply via email to