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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [mips/] [inter/] [mips16_stubs_1_y.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 321 jeremybenn
/* All test functions return the sum of arguments, plus 1.
2
   Void-returning functions put the result in the_result.
3
   Complex-returning functions return their signature number as the
4
   (constant) imaginary part of the result.  */
5
 
6
double the_result;
7
 
8
void v0 (void)                  { the_result = 1.0; }
9
void v1 (float x)               { the_result = 1.0 + x; }
10
void v5 (float x, float y)      { the_result = 1.0 + x + y; }
11
void v9 (float x, double y)     { the_result = 1.0 + x + y; }
12
void v2 (double x)              { the_result = 1.0 + x; }
13
void v6 (double x, float y)     { the_result = 1.0 + x + y; }
14
void v10 (double x, double y)   { the_result = 1.0 + x + y; }
15
 
16
float f0 (void)                 { return 1.0; }
17
float f1 (float x)              { return 1.0 + x; }
18
float f5 (float x, float y)     { return 1.0 + x + y; }
19
float f9 (float x, double y)    { return 1.0 + x + y; }
20
float f2 (double x)             { return 1.0 + x; }
21
float f6 (double x, float y)    { return 1.0 + x + y; }
22
float f10 (double x, double y)  { return 1.0 + x + y; }
23
 
24
double d0 (void)                { return 1.0; }
25
double d1 (float x)             { return 1.0 + x; }
26
double d5 (float x, float y)    { return 1.0 + x + y; }
27
double d9 (float x, double y)   { return 1.0 + x + y; }
28
double d2 (double x)            { return 1.0 + x; }
29
double d6 (double x, float y)   { return 1.0 + x + y; }
30
double d10 (double x, double y) { return 1.0 + x + y; }
31
 
32
_Complex float cf0 (void)                       { return 1.0 + 0.0i; }
33
_Complex float cf1 (float x)                    { return 1.0 + x + 1.0i; }
34
_Complex float cf5 (float x, float y)           { return 1.0 + x + y + 5.0i; }
35
_Complex float cf9 (float x, double y)          { return 1.0 + x + y + 9.0i; }
36
_Complex float cf2 (double x)                   { return 1.0 + x + 2.0i; }
37
_Complex float cf6 (double x, float y)          { return 1.0 + x + y + 6.0i; }
38
_Complex float cf10 (double x, double y)        { return 1.0 + x + y + 10.0i; }
39
 
40
_Complex double cd0 (void)                      { return 1.0 + 0.0i; }
41
_Complex double cd1 (float x)                   { return 1.0 + x + 1.0i; }
42
_Complex double cd5 (float x, float y)          { return 1.0 + x + y + 5.0i; }
43
_Complex double cd9 (float x, double y)         { return 1.0 + x + y + 9.0i; }
44
_Complex double cd2 (double x)                  { return 1.0 + x + 2.0i; }
45
_Complex double cd6 (double x, float y)         { return 1.0 + x + y + 6.0i; }
46
_Complex double cd10 (double x, double y)       { return 1.0 + x + y + 10.0i; }
47
 
48
 
49
/* Declare and initialize all the pointer-to-function variables.  */
50
 
51
void (*pv0) (void);
52
void (*pv1) (float);
53
void (*pv5) (float, float);
54
void (*pv9) (float, double);
55
void (*pv2) (double);
56
void (*pv6) (double, float);
57
void (*pv10) (double, double);
58
 
59
float (*pf0) (void);
60
float (*pf1) (float);
61
float (*pf5) (float, float);
62
float (*pf9) (float, double);
63
float (*pf2) (double);
64
float (*pf6) (double, float);
65
float (*pf10) (double, double);
66
 
67
double (*pd0) (void);
68
double (*pd1) (float);
69
double (*pd5) (float, float);
70
double (*pd9) (float, double);
71
double (*pd2) (double);
72
double (*pd6) (double, float);
73
double (*pd10) (double, double);
74
 
75
_Complex float (*pcf0) (void);
76
_Complex float (*pcf1) (float);
77
_Complex float (*pcf5) (float, float);
78
_Complex float (*pcf9) (float, double);
79
_Complex float (*pcf2) (double);
80
_Complex float (*pcf6) (double, float);
81
_Complex float (*pcf10) (double, double);
82
 
83
_Complex double (*pcd0) (void);
84
_Complex double (*pcd1) (float);
85
_Complex double (*pcd5) (float, float);
86
_Complex double (*pcd9) (float, double);
87
_Complex double (*pcd2) (double);
88
_Complex double (*pcd6) (double, float);
89
_Complex double (*pcd10) (double, double);
90
 
91
void
92
init (void)
93
{
94
  pv0 = v0;
95
  pv1 = v1;
96
  pv5 = v5;
97
  pv9 = v9;
98
  pv2 = v2;
99
  pv6 = v6;
100
  pv10 = v10;
101
 
102
  pf0 = f0;
103
  pf1 = f1;
104
  pf5 = f5;
105
  pf9 = f9;
106
  pf2 = f2;
107
  pf6 = f6;
108
  pf10 = f10;
109
 
110
  pd0 = d0;
111
  pd1 = d1;
112
  pd5 = d5;
113
  pd9 = d9;
114
  pd2 = d2;
115
  pd6 = d6;
116
  pd10 = d10;
117
 
118
  pcf0 = cf0;
119
  pcf1 = cf1;
120
  pcf5 = cf5;
121
  pcf9 = cf9;
122
  pcf2 = cf2;
123
  pcf6 = cf6;
124
  pcf10 = cf10;
125
 
126
  pcd0 = cd0;
127
  pcd1 = cd1;
128
  pcd5 = cd5;
129
  pcd9 = cd9;
130
  pcd2 = cd2;
131
  pcd6 = cd6;
132
  pcd10 = cd10;
133
}

powered by: WebSVN 2.1.0

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