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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20100416-1.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
void abort(void);
2
 
3
int
4
movegt(int x, int y, long long a)
5
{
6
  int i;
7
  int ret = 0;
8
  for (i = 0; i < y; i++)
9
    {
10
      if (a >= (long long) 0xf000000000000000LL)
11
        ret = x;
12
      else
13
        ret = y;
14
    }
15
  return ret;
16
}
17
 
18
struct test
19
{
20
  long long val;
21
  int ret;
22
} tests[] = {
23
  { 0xf000000000000000LL, -1 },
24
  { 0xefffffffffffffffLL, 1 },
25
  { 0xf000000000000001LL, -1 },
26
  { 0x0000000000000000LL, -1 },
27
  { 0x8000000000000000LL, 1 },
28
};
29
 
30
int
31
main()
32
{
33
  int i;
34
  for (i = 0; i < sizeof (tests) / sizeof (tests[0]); i++)
35
    {
36
      if (movegt (-1, 1, tests[i].val) != tests[i].ret)
37
        abort ();
38
    }
39
  return 0;
40
}

powered by: WebSVN 2.1.0

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