cvs commit: ports/biology/pymol Makefile ports/math/atlas Makefile ports/math/atlas-devel Makefile

Peter Jeremy PeterJeremy at optushome.com.au
Fri Mar 19 19:54:30 PST 2004


On Thu, Mar 18, 2004 at 08:20:12PM -0800, Maho Nakata wrote:
>  Here is the comment form obrien:
>  "-fpic" is a [minor?] optimization for machines that can handle it:

The "-fpic" limits are defined by the size of the displacement
available in the "register+displacement" memory reference format.  If
the GOT entry offset won't fit into the displacement field then you
need an extra 1 or 2 instructions (depending on the architecture) and
a work register for every GOT access.  In many (most?) cases, the GOT
reference is a load and the load target register can be used as the
work register.

This bloats both size and runtime - though the exact impact is
application dependent.  You can readily measure the impact on "small"
applications by compiling them with both "-fpic" and "-fPIC" on one
of the affected architectures and comparing.

Peter


More information about the cvs-ports mailing list