Lazy construction of libcalls

Richard Sandiford richard@codesourcery.com
Fri Aug 24 13:44:00 GMT 2007


Jan Hubicka <jh@suse.cz> writes:
> While comparing the tables produced by new and old code, I noticed that
> "ffs" for SI used to be called "ffssi3" but now it is "ffs".
> I believe it was inteded to be called ffs because of:
>   optab_handler (ffs_optab, int_mode)->libfunc = init_one_libfunc ("ffs");
> that however later get overwriten by initialization code.

Actually, this was deliberate.  All libgccs have word and doubleword
ffs functions, but not all C libraries have "ffs".  So we wanted the
libgcc versions to take precedence over the C library fallback.  See:

    http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01165.html

for details.

Richard



More information about the Gcc-patches mailing list