From: Bernhard H. <Ber...@ot...> - 2001-06-13 18:43:37
|
I've finished writing some assembler routines for the math-library. The last problem is to find some test-cases with a good coverage ... Among these routines are the mul-things. The point is, that the mulu* and muls*-functions return the same result. They do exactly the same. Yes, believe me. Or test it. A lot of microprocessors have both mulu and muls opcodes. Why? They provide more bits in the result as in the operands. So they have to know, if they have to zero- or sign-extend the additional bits. But with the SDCC-mul-routines the result is of the same size as the operands. It doesn't matter, if the operands are signed or unsigned. My proposal: - replace both _muluint and _mulsint by _mulint - replace both _mululong and _mulslong by _mullong This can save a lot of bytes in DSEG! This does not apply to the div-things! Bernhard |