This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: A little bit of additional flexibility in crtstuff.c
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?
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.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me