OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [config/] [divmod.c] - Rev 199

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

long udivmodsi4 ();
 
long
__divsi3 (long a, long b)
{
  int neg = 0;
  long res;
 
  if (a < 0)
    {
      a = -a;
      neg = !neg;
    }
 
  if (b < 0)
    {
      b = -b;
      neg = !neg;
    }
 
  res = udivmodsi4 (a, b, 0);
 
  if (neg)
    res = -res;
 
  return res;
}
 
long
__modsi3 (long a, long b)
{
  int neg = 0;
  long res;
 
  if (a < 0)
    {
      a = -a;
      neg = 1;
    }
 
  if (b < 0)
    b = -b;
 
  res = udivmodsi4 (a, b, 1);
 
  if (neg)
    res = -res;
 
  return res;
}
 

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.