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 little bit of additional flexibility in crtstuff.c


>>>>> Alexandre Oliva <aoliva@redhat.com> writes:

 > On Aug 25, 2000, Jason Merrill <jason@redhat.com> wrote:
 >> Can you explain why a port would need hand-crafted assembly code?

 > In the docs, you mean?

Yes.

 > There may be several reasons.  One example is register allocation:
 > since only the naked call is placed in the init/fini functions, it
 > might be that the generated code assumed some particular register
 > state that the naked code in init/fini doesn't satisfy.  Another
 > situation in which assembly code may be needed is when large constants
 > can't be loaded directly into registers, and GCC ends up emitting them
 > as separate constants.  In this case, GCC may emit the constant in a
 > different section than the actual code, and the reference to the
 > constant location may turn out to be invalid for its being too far
 > away.

Why aren't these situations dealt with by only putting calls with no args
in init/fini?

Jason

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