OpenCores
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 20

Go to most recent revision | 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;
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.