R: General information on Hitachi SH math performance

tm tm@kloo.net
Sat Aug 18 13:51:00 GMT 2001


Giulix wrote:
> 
> > You didn't mention which SH family part you are using, but you  may want
> > to check
> > if you are using the correct libgcc.a for your version of the SH
> > processor.
> >
> > There are different versions built for the SH1, SH2, SH3, SH3E, SH4,
> > SH4-single,
> > and Sh4-single-only ABIs.
> 
> I'm using the SH7045F Hitachi microprocessor witch is a SH2 series. So I use
> the -m2 options in gcc compiler.
> I think the performance difference is because the math library (especially
> float library) is wrote in C source coce in gcc and in assembly in other
> commercial compilers.
> Whath do you think about ?
> 
> Giulix

You also probably need to determine exactly which function is slow.

The SH2 has no FPU, so all the math is done using software emulation.
The floating-point emulation library is in gcc, in floatlib.c if
I'm not mistaken.

Toshi



More information about the Newlib mailing list