For signed & unsigned int (16 bit) and long (32 bit) variables, division,
multiplication and modulus operations are implemented by support routines.
These support routines are all developed in ANSI-C to facilitate porting
to other MCUs, although some model specific assembler optimations
are used. The following files contain the described routine, all of
them can be found in <installdir>/share/sdcc/lib.
<pending: tabularise this>
_mulsint.c - signed 16 bit multiplication (calls _muluint)
_muluint.c - unsigned 16 bit multiplication
_divsint.c - signed 16 bit division (calls _divuint)
_divuint.c - unsigned 16 bit division
_modsint.c - signed 16 bit modulus (call _moduint)
_moduint.c - unsigned 16 bit modulus
_mulslong.c - signed 32 bit multiplication (calls _mululong)
_mululong.c - unsigned32 bit multiplication
_divslong.c - signed 32 division (calls _divulong)
_divulong.c - unsigned 32 division
_modslong.c - signed 32 bit modulus (calls _modulong)
_modulong.c - unsigned 32 bit modulus
Since they are compiled as non-reentrant, interrupt service
routines should not do any of the above operations. If this is unavoidable
then the above routines will need to be compiled with the -stack-auto
option, after which the source program will have to be compiled with
-int-long-rent option.