[PATCH] -fpic problems on PPC, a different approach

Richard Henderson rth@cygnus.com
Wed Jun 9 12:15:00 GMT 1999

On Wed, Jun 09, 1999 at 06:57:10PM +0200, Franz Sirl wrote:
> Ok, so nothing to worry about for me. Should I add a comment to
> rs6000_got_register, explaining that setting regs_ever_live here
> can go away when flow2 is fixed lifetimewise?

Well, flow2 isn't really broken per se, it's just an ugly problem. 
Reload's view of what saved registers are live affects the size of
the register save area, which affects frame elimination offsets. 
So if flow2 changes the set of live saved registers, all the stack
offsets wind up skewed and we lose.

But adding a comment isn't ever a bad idea.  ;-)

> >> -      fputs (TARGET_MINIMAL_TOC ? reg_names[30] : reg_names[2], file);
> >> +      fputs (TARGET_MINIMAL_TOC ? reg_names[30] : reg_names[2 \
> >> /* PIC_OFFSET_TABLE_REGNUM? */ ], file);
> >
> >This is AIX TOC related.  It should not change.
> >
> >> -	fprintf (file, "(%s)", reg_names[ TARGET_MINIMAL_TOC ? 30 : 2 ]);
> >> +	fprintf (file, "(%s)", reg_names[ TARGET_MINIMAL_TOC ? 30 : 2 \
> >
> >Same here.
> Uhm, I'm not so sure about this. The TOC approach is used on svr4/ppc for
> -fPIC. And there's a switch -mminimal-toc that sets TARGET_MINIMAL_TOC and
> it's valid for -fpic. But I haven't been able to get an overview on all the
> ABI interactions so far, so I left the reorg in and marked (at least in this
> first version of the patch) the questionable places in the code.

As far as I could grok from svr4.h, you'll never have a non-minimal toc
with ABI_V4.  You'll either have something that looks like standard ELF
pic with .got and such, or you'll use a minimial toc.

Oh well.  Keep it marked and we'll come back to it later.

> Don't think so, -fpic looks fundamentally different from -fPIC on PPC/SYSV.
> I don't know what the reason behind that is, maybe -fPIC can be merged into
> -fpic now, but I think this would be a change more suitable for the mainline
> than the branch.



More information about the Gcc-patches mailing list