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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20030220-1.c] - Blame information for rev 301

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

Line No. Rev Author Line
1 297 jeremybenn
/* PR optimization/9768 */
2
/* Originator: Randolph Chung <tausq@debian.org> */
3
 
4
inline int fixfloor (long x)
5
{
6
  if (x >= 0)
7
    return (x >> 16);
8
  else
9
    return ~((~x) >> 16);
10
}
11
 
12
inline int fixtoi (long x)
13
{
14
  return fixfloor(x) + ((x & 0x8000) >> 15);
15
}
16
 
17
int foo(long x, long y)
18
{
19
  return fixtoi(x*y);
20
}

powered by: WebSVN 2.1.0

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