From: SourceForge.net <no...@so...> - 2009-11-03 09:03:34
|
Patches item #2891102, was opened at 2009-11-03 07:58 Message generated for change (Settings changed) made by maartenbrock You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300599&aid=2891102&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: None >Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jon Kirwan (jkirwan) Assigned to: Nobody/Anonymous (nobody) Summary: faster ___fsdiv.c file to contribute, if wanted Initial Comment: I installed the SDCC c compiler for use with SiLabs 8051 micro about a month ago. I finished my application but in the process I've also branched some of the code off and written a faster 32-bit floating division routine for most any 8051 core device. It follows the special case and error handling of the existing library routine, so it shouldn't break anything there. Roughly speaking, it is about twice as fast as the ___fsdiv.c file I found in sdcc\lib\src, based on the assembly version and not the generic GNU c code for it. It's a non-restoring division version, with 4 unrolled bits generated per loop. It is well-documented in the source file, as well. Extremely well documented. Yes, it's larger. No, although I think it is well crafted, it is not well tested as yet and I've not walked it through a code review with anyone. Like the existing library, it does not do much more with denormals than recognize them as effectively zero. I didn't want to break anything by adding better denormal handling. Like the existing routine, it does not preserve sign when INF or NaN is generated. Again, not wanting to break things that may already depend on existing behavior. Not sure how to contribute it, but I'm willing to consider doing that if it may be wanted. If not, that's fine. I can post it up on my web site. Jon PS. I do NOT come here often and I'm not sure when I next may do so. I can be contacted directly at jk...@in.... ---------------------------------------------------------------------- >Comment By: Maarten Brock (maartenbrock) Date: 2009-11-03 10:03 Message: Jon, This is no bug. It's not even a patch yet, since the file is not attached, still that category fits best. I assume you filled in a valid email address when registering at sourceforge and therefor assume you will be notified of this comment automatically. Are you running sdcc on a *nix like machine? If so, you can run the regression tests by running make in sdcc/support/regression to test your modified _fsdiv. And if you think there are bugs in it or things that can/should be improved, please do not hesitate. I welcome your effort, please attach the file here. Maarten ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300599&aid=2891102&group_id=599 |