10 #define class eus_class 11 #define throw eus_throw 12 #define export eus_export 13 #define vector eus_vector 14 #define string eus_string 23 int int_test(
int n,
int i1,
int i2,
int i3,
int i4) {
27 ui = *((
unsigned int *)(&i1));
28 printf(
"%d: %8d %X\n", n, i1, ui);
29 ui = *((
unsigned int *)(&i2));
30 printf(
"%d: %8d %X\n", n, i2, ui);
31 ui = *((
unsigned int *)(&i3));
32 printf(
"%d: %8d %X\n", n, i3, ui);
33 ui = *((
unsigned int *)(&i4));
34 printf(
"%d: %8d %X\n", n, i4, ui);
39 int long_test(
long n,
long d1,
long d2,
long d3,
long d4) {
43 ul = *((
unsigned long *)(&d1));
44 printf(
"%d: %8d %X\n", n, d1, ul);
45 ul = *((
unsigned long *)(&d2));
46 printf(
"%d: %8d %X\n", n, d2, ul);
47 ul = *((
unsigned long *)(&d3));
48 printf(
"%d: %8d %X\n", n, d3, ul);
49 ul = *((
unsigned long *)(&d4));
50 printf(
"%d: %8d %X\n", n, d4, ul);
59 ul = *((
unsigned int *)(&i1));
60 printf(
"%d: %8d %X\n", n, i1, ul);
61 ul = *((
unsigned int *)(&i2));
62 printf(
"%d: %8d %X\n", n, i2, ul);
63 ul = *((
unsigned int *)(&i3));
64 printf(
"%d: %8d %X\n", n, i3, ul);
65 ul = *((
unsigned int *)(&i4));
66 printf(
"%d: %8d %X\n", n, i4, ul);
71 int float_test(
int n,
float f1,
float f2,
float f3,
float f4) {
75 ui = *((
unsigned int *)(&f1));
76 printf(
"%d: %8.8e %X (%4.1f)\n", n, f1, ui, f1);
77 ui = *((
unsigned int *)(&f2));
78 printf(
"%d: %8.8e %X (%4.1f)\n", n, f2, ui, f2);
79 ui = *((
unsigned int *)(&f3));
80 printf(
"%d: %8.8e %X (%4.1f)\n", n, f3, ui, f3);
81 ui = *((
unsigned int *)(&f4));
82 printf(
"%d: %8.8e %X (%4.1f)\n", n, f4, ui, f4);
87 int double_test(
long n,
double d1,
double d2,
double d3,
double d4) {
91 ul = *((
unsigned long *)(&d1));
92 printf(
"%ld: %16.16e %lX (%4.1f)\n", n, d1, ul, d1);
93 ul = *((
unsigned long *)(&d2));
94 printf(
"%ld: %16.16e %lX (%4.1f)\n", n, d2, ul, d2);
95 ul = *((
unsigned long *)(&d3));
96 printf(
"%ld: %16.16e %lX (%4.1f)\n", n, d3, ul, d3);
97 ul = *((
unsigned long *)(&d4));
98 printf(
"%ld: %16.16e %lX (%4.1f)\n", n, d4, ul, d4);
107 ui = *((
unsigned int *)(&f1));
108 printf(
"%d: %8.8e %X (%4.1f)\n", n, f1, ui, f1);
109 ui = *((
unsigned int *)(&f2));
110 printf(
"%d: %8.8e %X (%4.1f)\n", n, f2, ui, f2);
111 ui = *((
unsigned int *)(&f3));
112 printf(
"%d: %8.8e %X (%4.1f)\n", n, f3, ui, f3);
113 ui = *((
unsigned int *)(&f4));
114 printf(
"%d: %8.8e %X (%4.1f)\n", n, f4, ui, f4);
122 printf(
"size = %d\n", n);
124 ui = (
unsigned int *)(&(src[i]));
125 printf(
"%d: %d %X\n", i, src[i], *ui);
133 printf(
"size = %d\n", n);
135 ul = (
unsigned long *)(&(src[i]));
136 printf(
"%d: %ld %lX\n", i, src[i], *ul);
144 printf(
"size = %d\n", n);
146 ul = (
unsigned long *)(&(src[i]));
147 printf(
"%d: %ld %lX\n", i, src[i], *ul);
155 printf(
"size = %d\n", n);
157 ui = (
unsigned int *)(&(src[i]));
158 printf(
"%d: %e %X\n", i, src[i], *ui);
166 printf(
"size = %d\n", n);
168 ul = (
unsigned long *)(&(src[i]));
169 printf(
"%d: %e %lX\n", i, src[i], *ul);
177 printf(
"size = %d\n", n);
179 ul = (
unsigned long *)(&(src[i]));
180 printf(
"%d: %e %lX\n", i, src[i], *ul);
187 printf(
"size = %d\n", n);
189 printf(
"%d: %c %x\n", i, src[i], src[i]);
195 printf(
"long = %ld(%lX)\n",l,l);
196 printf(
"int = %d(%X)\n",i,i);
197 printf(
"short = %d(%X)\n",s,s);
203 float ret = (float) (a + b);
205 ui = (
unsigned int *)&ret;
206 printf(
"// %f + %f -> %f\n", a, b, ret);
207 printf(
"// return %e, %X\n", ret, *ui);
212 double ret = (a + b);
213 unsigned long long *ul;
214 ul = (
unsigned long long*)&ret;
215 printf(
"// %f + %f -> %f\n", a, b, ret);
216 printf(
"// return %e, %lX\n", ret, *ul);
223 ul = (
unsigned long *)&ret;
224 printf(
"// %f + %f -> %f\n", a, b, ret);
225 printf(
"// return %e, %lX\n", ret, *ul);
232 ul = (
unsigned long *)&ret;
233 printf(
"// %d + %d -> %d\n", a, b, ret);
234 printf(
"// return %ld, %lX\n", ret, *ul);
241 ul = (
unsigned long *)&ret;
242 printf(
"// %d + %d -> %d\n", a, b, ret);
243 printf(
"// return %ld, %lX\n", ret, *ul);
250 ul = (
unsigned long *)&ret;
251 printf(
"// %d + %d -> %d\n", a, b, ret);
252 printf(
"// return %ld, %lX\n", ret, *ul);
257 long i3,
long i4,
long i5,
258 double d0,
double d1,
double d2,
double d3,
259 double d4,
double d5,
double d6,
double d7,
260 double d8,
double d9,
262 printf(
"%ld %ld %ld\n", i0, i1, i2);
263 printf(
"%ld %ld %ld\n", i3, i4, i5);
266 printf(
"%lf %lf %lf %lf\n", d0, d1, d2, d3);
267 printf(
"%lf %lf %lf %lf\n", d4, d5, d6, d7);
268 printf(
"%lf %lf\n", d8, d9);
269 printf(
"%ld %ld\n", i6, i7);
275 long i3,
long i4,
long i5,
276 double d0,
double d1,
double d2,
double d3,
277 double d4,
double d5,
double d6,
double d7,
278 double d8,
double d9,
double d10,
280 printf(
"%ld %ld %ld\n", i0, i1, i2);
281 printf(
"%ld %ld %ld\n", i3, i4, i5);
284 printf(
"%lf %lf %lf %lf\n", d0, d1, d2, d3);
285 printf(
"%lf %lf %lf %lf\n", d4, d5, d6, d7);
286 printf(
"%lf %lf %lf\n", d8, d9, d10);
287 printf(
"%ld %ld\n", i6, i7);
293 long i3,
long i4,
long i5,
298 printf(
"%ld %ld %ld\n", i0, i1, i2);
299 printf(
"%ld %ld %ld\n", i3, i4, i5);
302 printf(
"%lf %lf %lf %lf\n", d0, d1, d2, d3);
303 printf(
"%lf %lf %lf %lf\n", d4, d5, d6, d7);
304 printf(
"%lf %lf\n", d8, d9);
305 printf(
"%ld %ld\n", i6, i7);
311 long i3,
long i4,
long i5,
312 double d0,
float d1,
double d2,
float d3,
313 float d4,
double d5,
double d6,
float d7,
314 float d8,
double d9,
double d10,
float d11,
316 printf(
"%ld %ld %ld\n", i0, i1, i2);
317 printf(
"%ld %ld %ld\n", i3, i4, i5);
320 printf(
"%lf %f %lf %f\n", d0, d1, d2, d3);
321 printf(
"%f %lf %lf %f\n", d4, d5, d6, d7);
322 printf(
"%f %lf %lf %f\n", d8, d9, d10, d11);
323 printf(
"%ld %ld\n", i6, i7);
329 static double (*
gf) (
long i0,
long i1,
long i2,
330 long i3,
long i4,
long i5,
331 double d0,
double d1,
double d2,
double d3,
332 double d4,
double d5,
double d6,
double d7,
333 double d8,
double d9,
339 printf(
"set_ifunc, g = %lX\n",
g);
344 gf = (double (*) (
long i0,
long i1,
long i2,
345 long i3,
long i4,
long i5,
346 double d0,
double d1,
double d2,
double d3,
347 double d4,
double d5,
double d6,
double d7,
348 double d8,
double d9,
350 printf(
"set_ffunc, gf = %lX\n",
gf);
354 printf(
"call_ifunc, g = %lX\n",
g);
359 printf(
"call_ffunc, gf = %lX\n",
gf);
360 return gf(100,101,102,
362 1000.0, 1010.0, 1020.0, 1030.0,
363 1040.0, 1050.0, 1060.0, 1070.0,
369 return (
sizeof(
void *));
373 return (
sizeof(
float));
377 return (
sizeof(
double));
381 return (
sizeof(
long));
385 return (
sizeof(
int));
long ret_long(long a, long b)
int efv_test(int n, eusfloat_t *src)
eusinteger_t ret_eusinteger(eusinteger_t a, eusinteger_t b)
int int_long_short_test(long l, int i, short s)
long get_size_of_pointer()
int lv_test(int n, long *src)
long set_ifunc(long(*f)())
eusfloat_t ret_eusfloat(eusfloat_t a, eusfloat_t b)
long get_size_of_eusfloat()
eusfloat_t test_testf(long i0, long i1, long i2, long i3, long i4, long i5, eusfloat_t d0, eusfloat_t d1, eusfloat_t d2, eusfloat_t d3, eusfloat_t d4, eusfloat_t d5, eusfloat_t d6, eusfloat_t d7, eusfloat_t d8, eusfloat_t d9, long i6, long i7)
double test_testd(long i0, long i1, long i2, long i3, long i4, long i5, double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8, double d9, long i6, long i7)
int str_test(int n, char *src)
int test_testfd(long i0, long i1, long i2, long i3, long i4, long i5, double d0, float d1, double d2, float d3, float d4, double d5, double d6, float d7, float d8, double d9, double d10, float d11, long i6, long i7)
int eiv_test(int n, eusinteger_t *src)
double ret_double(double a, double b)
int eusfloat_test(int n, eusfloat_t f1, eusfloat_t f2, eusfloat_t f3, eusfloat_t f4)
int float_test(int n, float f1, float f2, float f3, float f4)
int eusinteger_test(int n, eusinteger_t i1, eusinteger_t i2, eusinteger_t i3, eusinteger_t i4)
long get_size_of_float32()
float ret_float(float a, float b)
double test_testd2(long i0, long i1, long i2, long i3, long i4, long i5, double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8, double d9, double d10, long i6, long i7)
int double_test(long n, double d1, double d2, double d3, double d4)
int ret_int(int a, int b)
int long_test(long n, long d1, long d2, long d3, long d4)
int iv_test(int n, int *src)
long get_size_of_double()
long set_ffunc(double(*f)())
int int_test(int n, int i1, int i2, int i3, int i4)
static double(* gf)(long i0, long i1, long i2, long i3, long i4, long i5, double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8, double d9, long i6, long i7)
int dv_test(int n, double *src)
int fv_test(int n, float *src)
long get_size_of_eusinteger()