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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [builtins-34.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Copyright (C) 2004 Free Software Foundation.
2
 
3
   Check that various built-in functions compile.
4
 
5
   Written by Uros Bizjak, 13th February 2004.  */
6
 
7
/* { dg-do compile } */
8
/* { dg-options "-O2 -ffast-math" } */
9
 
10
extern double exp10(double);
11
extern double exp2(double);
12
extern double pow10(double);
13
extern double expm1(double);
14
extern double ldexp(double, int);
15
extern double scalb(double, double);
16
extern double scalbn(double, int);
17
extern double scalbln(double, long);
18
extern double significand(double);
19
extern float exp10f(float);
20
extern float exp2f(float);
21
extern float pow10f(float);
22
extern float expm1f(float);
23
extern float ldexpf(float, int);
24
extern float scalbf(float, float);
25
extern float scalbnf(float, int);
26
extern float scalblnf(float, long);
27
extern float significandf(float);
28
extern long double exp10l(long double);
29
extern long double exp2l(long double);
30
extern long double pow10l(long double);
31
extern long double expm1l(long double);
32
extern long double ldexpl(long double, int);
33
extern long double scalbl(long double, long double);
34
extern long double scalbnl(long double, int);
35
extern long double scalblnl(long double, long);
36
extern long double significandl(long double);
37
 
38
 
39
double test1(double x)
40
{
41
  return exp10(x);
42
}
43
 
44
double test2(double x)
45
{
46
  return exp2(x);
47
}
48
 
49
double test3(double x)
50
{
51
  return pow10(x);
52
}
53
 
54
double test4(double x)
55
{
56
  return expm1(x);
57
}
58
 
59
double test5(double x, int exp)
60
{
61
  return ldexp(x, exp);
62
}
63
 
64
double test6(double x, double exp)
65
{
66
  return scalb(x, exp);
67
}
68
 
69
double test7(double x, int exp)
70
{
71
  return scalbn(x, exp);
72
}
73
 
74
double test8(double x, long exp)
75
{
76
  return scalbln(x, exp);
77
}
78
 
79
double test9(double x)
80
{
81
  return significand(x);
82
}
83
 
84
float test1f(float x)
85
{
86
  return exp10f(x);
87
}
88
 
89
float test2f(float x)
90
{
91
  return exp2f(x);
92
}
93
 
94
float test3f(float x)
95
{
96
  return pow10f(x);
97
}
98
 
99
float test4f(float x)
100
{
101
  return expm1f(x);
102
}
103
 
104
float test5f(float x, int exp)
105
{
106
  return ldexpf(x, exp);
107
}
108
 
109
float test6f(float x, float exp)
110
{
111
  return scalbf(x, exp);
112
}
113
 
114
float test7f(float x, int exp)
115
{
116
  return scalbnf(x, exp);
117
}
118
 
119
float test8f(float x, long exp)
120
{
121
  return scalblnf(x, exp);
122
}
123
 
124
float test9f(float x)
125
{
126
  return significandf(x);
127
}
128
 
129
long double test1l(long double x)
130
{
131
  return exp10l(x);
132
}
133
 
134
long double test2l(long double x)
135
{
136
  return exp2l(x);
137
}
138
 
139
long double test3l(long double x)
140
{
141
  return pow10l(x);
142
}
143
 
144
long double test4l(long double x)
145
{
146
  return expm1l(x);
147
}
148
 
149
long double test5l(long double x, int exp)
150
{
151
  return ldexpl(x, exp);
152
}
153
 
154
long double test6l(long double x, long double exp)
155
{
156
  return scalbl(x, exp);
157
}
158
 
159
long double test7l(long double x, int exp)
160
{
161
  return scalbnl(x, exp);
162
}
163
 
164
long double test8l(long double x, long exp)
165
{
166
  return scalblnl(x, exp);
167
}
168
 
169
long double test9l(long double x)
170
{
171
  return significandl(x);
172
}

powered by: WebSVN 2.1.0

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