This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: The arithmetic support of SCmode and DCmode.
- To: law at cygnus dot com
- Subject: Re: The arithmetic support of SCmode and DCmode.
- From: craig at jcb-sc dot com
- Date: 7 Apr 1999 12:36:15 -0000
- Cc: N8TM at aol dot com, toon at moene dot indiv dot nluug dot nl, egcs at egcs dot cygnus dot com
- Cc: craig at jcb-sc dot com
- References: <3500.923460267@upchuck>
> In message <19990407030325.22377.qmail@deer>you write:
> > Does anyone know if there are any systems targeted by egcs/gcc that
> > would execute the "direct" double-precision version of c_div *slower*
> > than the current, "slow", safe way, assuming it used single precision?
>Sure. Systems that don't implement double precision FP ops in hardware, but
>which do implement single precision in hardware.
>
>Or systems that don't implement any floating point in hardware :-)
Is there some kind of target macro a library like libg2c can test to
determine this? If not, could we add one, perhaps even a ratio
named something like DOUBLE_VERSUS_FLOAT_PERFORMANCE, with 10 being
`==', 20 being twice as slow, 5 being twice as fast (theoretically
possible; 9 or 8 might even happen on some machines today, e.g. Alpha),
as a *rough* guideline? There might already be a macro that indicates
that `float' runs pretty much as fast as `double', in terms of the
computation operations (excluding load/store), which would be fine
for now if we could get at it in libg2c.
(In my "nearly-ideal" world, we'd be using a language that naturally
included means to express alternate choices for algorithms, so c_div.c
would contain two, perhaps several, versions of the code, and the
compiler would figure out which would likely run fastest on the target
machine....)
tq vm, (burley)