profiling on sh

Alexandre Oliva aoliva@redhat.com
Sat Mar 16 11:00:00 GMT 2002


On Mar 15, 2002, "Kris Warkentin" <kewarken@qnx.com> wrote:

> inline float sqrt(float _X)
>  { /* return square root */
>  return (sqrtf(_X)); }

> As near as I can tell, there is no way to get this to compile down to a
> fsqrt op.

You'd have to replace the sqrtf with __builtin_sqrtf.  The
non-__builtin_-prefixed names are not defined in C++, because
-fbuiltins is disabled and can't be re-enabled in C++.  From
cp/decl.c:

  /* In C++, we never create builtin functions whose name does not
     begin with `__'.  Users should be using headers to get prototypes
     in C++.  It would be nice if we could warn when `-fbuiltin' is
     used explicitly, but we do not have that information.  */
  flag_no_builtin = 1;

-- 
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                Professional serial bug killer



More information about the Gcc mailing list