This is the mail archive of the gcc-patches@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: A patch for -fpic and -fomit-frame-pointer on x86



  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
problem?

jeff


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