This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
State of m68k float emulation in lb1sf68.asm (muldf, divdf)
- From: Pavel Pisa <pisa at cmp dot felk dot cvut dot cz>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 14 Nov 2003 16:44:18 +0100
- Subject: State of m68k float emulation in lb1sf68.asm (muldf, divdf)
Hello everybody,
I have looked into lb1sf68.asm and I have found that implementation
is very ineffective. It can be many times improved at least for CPU32
targets I expect 6-20 times improvement.
Kazu Hirata sugests to start discussion about this case
on GCC list.
The core part of muldf implementation can be rewritten to use
something like (not fully evaluated) u64*u64->u128, this can be realized
by four u32*u32->u64.
The division (divdf) requires something like (again not all
result bits required) u64/u64->u64.u64. This can be achieved by
two times u64/u32->u32 and some conditions and u32*u32->u64 (not sure
but expect four times, may be 6 times. I can take this partially
from my 80C517 code). The multiply and divide instructions are not
so fast, but about 52 iterations through complex loops with conditional
jumps are many times worse.
If there is no such implementation for m68k, I am almost sure,
that I am able to rewrite these functions for CPU32.
I have problems with my time, so I cannot promise, that it would be
in this year.
There is required some dicussion, if it worths to use above approach
for some versions of ColdFire targets and plain 68000. The native
u32*u32->u64 is even missing on 68060. There is no u32*u32 on 68000.
I have not sharp knowledge about ColdFire.
Please, CC reply directly to my address.
Best wishes
Pavel Pisa
e-mail: pisa@cmp.felk.cvut.cz
www: http://cmp.felk.cvut.cz/~pisa
work: http://www.pikron.com