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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [cmpsi-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
f1 (unsigned int x, unsigned int y)
2
{
3
  if (x == 0)
4
    dummy ();
5
  x -= y;
6
  /* 0xfffffff2 < 0x80000000? */
7
  if (x < ~(~(unsigned int) 0 >> 1))
8
    abort ();
9
  return x;
10
}
11
 
12
f2 (unsigned long int x, unsigned long int y)
13
{
14
  if (x == 0)
15
    dummy ();
16
  x -= y;
17
  /* 0xfffffff2 < 0x80000000? */
18
  if (x < ~(~(unsigned long int) 0 >> 1))
19
    abort ();
20
  return x;
21
}
22
 
23
 
24
dummy () {}
25
 
26
main ()
27
{
28
  /*      0x7ffffff3                    0x80000001 */
29
  f1 ((~(unsigned int) 0 >> 1) - 12, ~(~(unsigned int) 0 >> 1) + 1);
30
  f2 ((~(unsigned long int) 0 >> 1) - 12, ~(~(unsigned long int) 0 >> 1) + 1);
31
  exit (0);
32
}

powered by: WebSVN 2.1.0

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