This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Painful problems with -fpic implementation on powerpc-sysv
- To: Geoff Keating <geoffk at ozemail dot com dot au>
- Subject: Re: Painful problems with -fpic implementation on powerpc-sysv
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Fri, 21 Aug 1998 11:27:39 -0400
- Cc: egcs at cygnus dot com, Franz dot Sirl-kernel at lauterbach dot com, law at cygnus dot com
>>>>> Geoff Keating writes:
Geoff> Yes. My patch (attached to that e-mail message) `fixes' the problem
Geoff> in a really ugly way by forcing egcs to use the stack, not the GOT.
Geoff> That is what my patch does: it forces reload to try some other
Geoff> alternative. My patch has to add an extra hook to force this; H.J
Geoff> suggested `CONST_DOUBLE_OK_FOR_LETTER_P' but that seems to be
Geoff> something else (the name is good, but it isn't called when the letter
Geoff> is 'm' or 'o' :-). I don't dare to change the meaning of something
Geoff> like that because it would surely break other ports.
I wouldn't have thought that changes to reload.c itself were
necessary to accomplish that. The PowerPC port already materializes FP
constants in GPRs and moves them through the stack. The FPMEM "register"
also exists which perhaps could be pulled into service for this or maybe
SECONDARY_MEMORY_NEEDED which also tells reload that it needs an extra
stack slot for FPR moves with anything.
I am not sure when REGISTER_MOVE_COST is used, but possibly it is
encourging the backend to obtain the value from a symbol instead of
materializing it in a GPR and moving it.
There are just so many hooks already in place to tell the backend
that it needs an additional stack slot at a late stage, that I am
surprised the changes to reload.c are necessary.
David