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/] [execute/] [tstdi-1.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
#define FALSE 140
2
#define TRUE 13
3
 
4
feq (x)
5
     long long int x;
6
{
7
  if (x == 0)
8
    return TRUE;
9
  else
10
    return FALSE;
11
}
12
 
13
fne (x)
14
     long long int x;
15
{
16
  if (x != 0)
17
    return TRUE;
18
  else
19
    return FALSE;
20
}
21
 
22
flt (x)
23
     long long int x;
24
{
25
  if (x < 0)
26
    return TRUE;
27
  else
28
    return FALSE;
29
}
30
 
31
fge (x)
32
     long long int x;
33
{
34
  if (x >= 0)
35
    return TRUE;
36
  else
37
    return FALSE;
38
}
39
 
40
fgt (x)
41
     long long int x;
42
{
43
  if (x > 0)
44
    return TRUE;
45
  else
46
    return FALSE;
47
}
48
 
49
fle (x)
50
     long long int x;
51
{
52
  if (x <= 0)
53
    return TRUE;
54
  else
55
    return FALSE;
56
}
57
 
58
main ()
59
{
60
  if (feq (0LL) != TRUE)
61
    abort ();
62
  if (feq (-1LL) != FALSE)
63
    abort ();
64
  if (feq (0x8000000000000000LL) != FALSE)
65
    abort ();
66
  if (feq (0x8000000000000001LL) != FALSE)
67
    abort ();
68
  if (feq (1LL) != FALSE)
69
    abort ();
70
  if (feq (0x7fffffffffffffffLL) != FALSE)
71
    abort ();
72
 
73
  if (fne (0LL) != FALSE)
74
    abort ();
75
  if (fne (-1LL) != TRUE)
76
    abort ();
77
  if (fne (0x8000000000000000LL) != TRUE)
78
    abort ();
79
  if (fne (0x8000000000000001LL) != TRUE)
80
    abort ();
81
  if (fne (1LL) != TRUE)
82
    abort ();
83
  if (fne (0x7fffffffffffffffLL) != TRUE)
84
    abort ();
85
 
86
  if (flt (0LL) != FALSE)
87
    abort ();
88
  if (flt (-1LL) != TRUE)
89
    abort ();
90
  if (flt (0x8000000000000000LL) != TRUE)
91
    abort ();
92
  if (flt (0x8000000000000001LL) != TRUE)
93
    abort ();
94
  if (flt (1LL) != FALSE)
95
    abort ();
96
  if (flt (0x7fffffffffffffffLL) != FALSE)
97
    abort ();
98
 
99
  if (fge (0LL) != TRUE)
100
    abort ();
101
  if (fge (-1LL) != FALSE)
102
    abort ();
103
  if (fge (0x8000000000000000LL) != FALSE)
104
    abort ();
105
  if (fge (0x8000000000000001LL) != FALSE)
106
    abort ();
107
  if (fge (1LL) != TRUE)
108
    abort ();
109
  if (fge (0x7fffffffffffffffLL) != TRUE)
110
    abort ();
111
 
112
  if (fgt (0LL) != FALSE)
113
    abort ();
114
  if (fgt (-1LL) != FALSE)
115
    abort ();
116
  if (fgt (0x8000000000000000LL) != FALSE)
117
    abort ();
118
  if (fgt (0x8000000000000001LL) != FALSE)
119
    abort ();
120
  if (fgt (1LL) != TRUE)
121
    abort ();
122
  if (fgt (0x7fffffffffffffffLL) != TRUE)
123
    abort ();
124
 
125
  if (fle (0LL) != TRUE)
126
    abort ();
127
  if (fle (-1LL) != TRUE)
128
    abort ();
129
  if (fle (0x8000000000000000LL) != TRUE)
130
    abort ();
131
  if (fle (0x8000000000000001LL) != TRUE)
132
    abort ();
133
  if (fle (1LL) != FALSE)
134
    abort ();
135
  if (fle (0x7fffffffffffffffLL) != FALSE)
136
    abort ();
137
 
138
  exit (0);
139
}

powered by: WebSVN 2.1.0

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