This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] implement log10 and log2 functions as x87 builtins
- From: Uros Bizjak <uros at kss-loka dot si>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 Feb 2004 17:09:29 +0100
- Subject: Re: [PATCH] implement log10 and log2 functions as x87 builtins
- References: <Pine.LNX.email@example.com>
Roger Sayle wrote:
The patch itself looks fine. However to large accept contributions toThanks for reviewing this patch! As this is mainly cut'n'paste work, I
GCC we need to have a FSF copyright assignment on file. You'll need to
send an e-mail to firstname.lastname@example.org requesting the relevant forms.
consider it a big contribution, but following your instructions, I have
sent a request for
For this patch, its also a good idea to include a new testcase or two.Thanks for instructions, I will make an appropriate testcase.
All that's required is a simple check that "log2" and "log10" can be
called (probably both with compile-time constants or with variables) in
their float, double and long double forms with -ffast-math on x86. You
don't even need to check the return values. This ensures that all of
the new code added by your patch is executed atleast once in gcc's
testsuite, and prevents someone from breaking it in the future.
Once the paperwork is sorted out, there should be no problem getting BTW: From existing code, builtins for exp10() and exp2() functions can
be written the same way
this patch approved and committed to mainline for gcc 3.5.
as builtins for logN. With these functions, it is possible to provide
pow(10.0, x) -> exp10(x)
pow(2.0,x) -> exp2(x)
pow(e,x) -> exp(x) // this one is somehow funny...