This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: inline code generation vs libs
Mihai Daniel OPREA <mihai.oprea@cti.pub.ro> writes:
> I am working with the m68hc11 / m68hc12 gcc port for a school project. I have noticed that the vast majority of 32 bit operations (this is a 16 bit architecture) are implemented inline, via define_insn / define_expand / define_split instead of being implemented as libcalls.
>
> How much does GCC actually benefit from this implementation? I am aware that providing patterns with a wide range of alternatives might help the compiler, especially in such a register-starved architecture. But considering that the simplest 32 bit left shift consists of the 7 byte sequence: asld xgdx rolb rola xgdx makes me wonder whether a library based implementation would have been better.
>
> Or is this simply a question of trading off -Os performance for -O3 performance?
Note that support for m68hc11 was dropped in GCC 4.7. See
http://gcc.gnu.org/gcc-4.6/changes.html .
I don't know why this target was written the way it was. The best way
to answer this sort of question is via benchmarks.
Ian