This is the mail archive of the
mailing list for the GCC project.
Re: A patch for -fpic and -fomit-frame-pointer on x86
- To: hjl at lucon dot org (H.J. Lu)
- Subject: Re: A patch for -fpic and -fomit-frame-pointer on x86
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 13 Jul 1998 23:10:59 -0600
- cc: egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <m0yvnC7-000266C@ocean.lucon.org>you write:
> I took a look at your suggestion. It may have a major impact on
> shared library on x86. It means every function in shared library
> has to save/restore the PIC register even if the PIC register is
> not used at all.
Yup. Standard procedure for most ports. This is the price one pays
for PIC, at least until someone can come up with a better way to deal
with it longer term.
> On Intel, push/pop may be faster than sub/add.
> That means we cannot optimize the function return in shared library
> since ix86_can_use_return_insn_p may have to always return 0 for PIC.
Such is life.
> I think the following patch may be more appropriate given what we
> can do. Basically it says it is not safe to assume we can have fp
> constatnt as operand with PIC.
I do not think any of your patches are a complete solution -- can't
non-floating point constants in other instructions cause the same