PPC -fpic bug introduced recently
Jeffrey A Law
Sat Oct 9 22:34:00 GMT 1999
In message < 199910060830.BAA00595@aldrington.ppp.cs.sfu.ca >you write:
> You wrote:
> > I'm not sure if you're supposed to have registers which are fixed and
> > yet call-saved. On the other hand, it clearly makes sense to do so.
> Yeah, that had me wondering too... Clearly that's what PIC code on
> the PPC wants, the only question is whether somehow some part of gcc's
> internals could be consider it an impossible case and stumble. Perhaps
> we need the blessing of an expert in these matters -- or failing that, a
> quick check to see if there are fixed call-saved registers used on other
> processor architectures.
> One question is what the official semantics of a fixed call-saved register
> should be (if they aren't defined anywhere right now). Presumably it
> should mean ``if the register is changed by code the compiler emits, it
> will be saved; otherwise it *may* not be saved'' (c.f. other possible
> semantics, such as ``the register should always be saved on entry to
> and restored on exit from every function whether it appears to be used
> or not'').
The compiler currently requires that fixed registers be marked as call
clobbered. Failure to mark a fixed register as call clobbered will result
in incorrect code generation.
rth & Jim & I talked about this some while I was in Sunnyvale; I think we
agreed that it made sense to support call-saved fixed registers. However,
supporting them will require someone to spend some time slogging through the
various passes to fix their behavior for this case.
More information about the Gcc-bugs