Luis Alves <ljalvs@xxxxxxxxx> writes:
What's the reason for having two different algorithms for this function? The coldfire version seems faster since it doesn't perform any div/mul opcodes. Or am I wrong?
The coldfire version would require a minimum of 1800 cycles on a 68000. The 68000 version is dominated by either two divu (max 140 cycles each) or an lsr loop of max 900 cycles plus divu and two mulu (max 70 cycles each) plus some 100 cycles for the rest. That should make it better for all inputs. Andreas. -- Andreas Schwab, schwab@xxxxxxxxxxxxxx GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html