This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: profiling on sh
Hey Alexandre,
You might also be interested in something else that I've observed with sh4
code generation. If you have a call to sqrtf() in your code and compile
without optimization, you'll get the math lib version of sqrtf(). If you
optimize, you will just get an assembly fsqrt op in your output. This is
very nice.
C++ looks a little different though. Assume one of our math header's C++
defines for sqrt is something like:
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.
cheers,
Kris
----- Original Message -----
From: "Alexandre Oliva" <aoliva@redhat.com>
To: "Kris Warkentin" <kewarken@qnx.com>
Cc: <gcc@gcc.gnu.org>
Sent: Thursday, March 14, 2002 11:46 PM
Subject: Re: profiling on sh
> On Mar 14, 2002, "Kris Warkentin" <kewarken@qnx.com> wrote:
>
> > I'm looking at the FUNCTION_PROFILER macro in gcc/config/sh/sh.h and
> > all it seems to be doing is 'trapa #33' and then printing a label.
>
> Presumably, this is for some embedded SH environment. You failed to
> specify which OS you're using, so it's hard to hazard guesses as to
> how to solve whatever problem you're running into.
>
> --
> 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
>