URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [config/] [scarts32/] [div.c] - Rev 12
Compare with Previous | Blame | View Log
#include "stdlib.h" div_t div(int x, int y) { div_t retval; retval.quot = x/y; retval.rem = x%y; return retval; } ldiv_t ldiv(long x, long y) { ldiv_t retval; retval.quot = x/y; retval.rem = x%y; return retval; } lldiv_t lldiv(long long x, long long y) { lldiv_t retval; retval.quot = x/y; retval.rem = x%y; return retval; }