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]

Re: PPC -fpic bug introduced recently


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'').

    Melissa.

P.S. Sorry my patch wasn't against the current CVS source.  My path to
cygnus was down, so I didn't get to check out the latest sources and so
took a chance and assumed you'd used my version of Ian Piumarta's test
unchanged.  I'm glad you'd already removed the spurious test for ``&&
!fixed_regs[first_reg]'' -- it looks a little better than my original
hack of using ``first_reg = 13 + FIXED_R13'' to make it work right.


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