PPC -fpic bug introduced recently

Jeffrey A Law law@cygnus.com
Sun Oct 31 23:03:00 GMT 1999


  In message < 199910102309.QAA05369@aldrington.ppp.cs.sfu.ca >you write:
  > Hmm...  Well, that means that PIC code generation on PowerPC is (and
  > has for a long time been) in a broken-although-it-works-in-practice
  > state, since it needs a call-saved fixed register, actually asks for a
  > call-clobbered fixed register, hopes that gcc will give it a
  > call-saved fixed register (due to the PowerPC ABI) rather than
  > give an error or warning.
While GCC requires fixed registers to be marked as call-clobbered, GCC in
reality generally assumes that the reg is call-saved.  ie, we're overloading
other meanings on the call-clobbered bit for fixed hard registers.  I doubt
anyone knows why -- this requirement has been imposed as long as I can remember
(ie, back in the gcc-1.xx era).

  > This seems like the best course of action, although I'm sorry to hear that
  > it'll be a fair bit of work.
Yes.

jeff

ps.  As one sad bastard that actually works daily on a port where we have a
fixed register that is clobbered by each call fixing this would make my life
a lot easier :-)





More information about the Gcc-bugs mailing list