summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2018-03-29 07:01:14 -0400
committerAnthony Green <green@moxielogic.com>2018-03-29 07:01:14 -0400
commit746c3ce220cb155a8f3b613550a7ecad76f9fedc (patch)
tree4fc788109c18ed0f817c2e77ee9b3042dab9dd51
parent2eee934d0cb2beef7c0aa29767eca1ce03452ae9 (diff)
downloadlibffi-746c3ce220cb155a8f3b613550a7ecad76f9fedc.tar.gz
Expand ABI tests on x86. Testsuite bug fixes.
-rw-r--r--testsuite/libffi.bhaible/test-call.c374
-rw-r--r--testsuite/libffi.bhaible/test-callback.c482
-rw-r--r--testsuite/libffi.bhaible/testcases.c179
-rw-r--r--testsuite/libffi.call/align_stdcall.c46
-rw-r--r--testsuite/libffi.call/ffitest.h2
5 files changed, 584 insertions, 499 deletions
diff --git a/testsuite/libffi.bhaible/test-call.c b/testsuite/libffi.bhaible/test-call.c
index fa91f35..e1a15fe 100644
--- a/testsuite/libffi.bhaible/test-call.c
+++ b/testsuite/libffi.bhaible/test-call.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <ffi.h>
#include "alignof.h"
+#include <stdarg.h>
#include "testcases.c"
@@ -33,28 +34,39 @@
int count = 0;
char rbuf1[2048];
char rbuf2[2048];
-#define FPRINTF(STREAM,FMT,ARGS...) \
- { fprintf(STREAM, FMT, ##ARGS) ; \
- switch (count++) \
- { \
- case 0: \
- case 1: \
- sprintf(&rbuf1[strlen(rbuf1)], FMT, ##ARGS); \
- break ; \
- case 2: \
- sprintf(rbuf2, FMT, ##ARGS); \
- break; \
- case 3: \
- sprintf(&rbuf2[strlen(rbuf2)], FMT, ##ARGS); \
- if (strcmp (rbuf1, rbuf2)) abort(); \
- break; \
- } \
- }
-#else
-#define FPRINTF fprintf
+int fprintf(FILE *stream, const char *format, ...)
+{
+ va_list args;
+ va_start(args, format);
+
+ switch (count++)
+ {
+ case 0:
+ case 1:
+ vsprintf(&rbuf1[strlen(rbuf1)], format, args);
+ break;
+ case 2:
+ printf(rbuf1);
+ vsprintf(rbuf2, format, args);
+ break;
+ case 3:
+ vsprintf(&rbuf2[strlen(rbuf2)], format, args);
+ printf(rbuf2);
+ if (strcmp (rbuf1, rbuf2)) abort();
+ break;
+ }
+
+ va_end(args);
+
+ return 0;
+}
#endif
/* --------------------------------------------------------------- */
+#ifndef ABI_NUM
+#define ABI_NUM FFI_DEFAULT_ABI
+#endif
+
/* Definitions that ought to be part of libffi. */
static ffi_type ffi_type_char;
#define ffi_type_slonglong ffi_type_sint64
@@ -64,9 +76,9 @@ static ffi_type ffi_type_char;
#define SKIP_EXTRA_STRUCTS
#define FFI_PREP_CIF(cif,argtypes,rettype) \
- if (ffi_prep_cif(&(cif),FFI_DEFAULT_ABI,sizeof(argtypes)/sizeof(argtypes[0]),&rettype,argtypes) != FFI_OK) abort()
+ if (ffi_prep_cif(&(cif),ABI_NUM,sizeof(argtypes)/sizeof(argtypes[0]),&rettype,argtypes) != FFI_OK) abort()
#define FFI_PREP_CIF_NOARGS(cif,rettype) \
- if (ffi_prep_cif(&(cif),FFI_DEFAULT_ABI,0,&rettype,NULL) != FFI_OK) abort()
+ if (ffi_prep_cif(&(cif),ABI_NUM,0,&rettype,NULL) != FFI_OK) abort()
#define FFI_CALL(cif,fn,args,retaddr) \
ffi_call(&(cif),(void(*)(void))(fn),retaddr,args)
@@ -112,7 +124,7 @@ void
int ir;
#if (!defined(DGTEST)) || DGTEST == 2
ir = i_v();
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
ir = 0; clear_traces();
{
@@ -122,13 +134,13 @@ void
FFI_CALL(cif,i_v,NULL,&ir);
}
}
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 3
ir = i_i(i1);
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
ir = 0; clear_traces();
{
@@ -140,13 +152,13 @@ void
FFI_CALL(cif,i_i,args,&ir);
}
}
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 4
ir = i_i2(i1,i2);
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
ir = 0; clear_traces();
{
@@ -158,13 +170,13 @@ void
FFI_CALL(cif,i_i2,args,&ir);
}
}
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 5
ir = i_i4(i1,i2,i3,i4);
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
ir = 0; clear_traces();
{
@@ -176,13 +188,13 @@ void
FFI_CALL(cif,i_i4,args,&ir);
}
}
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 6
ir = i_i8(i1,i2,i3,i4,i5,i6,i7,i8);
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
ir = 0; clear_traces();
{
@@ -194,13 +206,13 @@ void
FFI_CALL(cif,i_i8,args,&ir);
}
}
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 7
ir = i_i16(i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16);
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
ir = 0; clear_traces();
{
@@ -212,7 +224,7 @@ void
FFI_CALL(cif,i_i16,args,&ir);
}
}
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
@@ -225,7 +237,7 @@ void
#if (!defined(DGTEST)) || DGTEST == 8
fr = f_f(f1);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -237,13 +249,13 @@ void
FFI_CALL(cif,f_f,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 9
fr = f_f2(f1,f2);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -255,13 +267,13 @@ void
FFI_CALL(cif,f_f2,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 10
fr = f_f4(f1,f2,f3,f4);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -273,13 +285,13 @@ void
FFI_CALL(cif,f_f4,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 11
fr = f_f8(f1,f2,f3,f4,f5,f6,f7,f8);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -291,13 +303,13 @@ void
FFI_CALL(cif,f_f8,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 12
fr = f_f16(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -309,13 +321,13 @@ void
FFI_CALL(cif,f_f16,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 13
fr = f_f24(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -327,7 +339,7 @@ void
FFI_CALL(cif,f_f24,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
}
@@ -339,7 +351,7 @@ void
#if (!defined(DGTEST)) || DGTEST == 14
dr = d_d(d1);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -351,13 +363,13 @@ void
FFI_CALL(cif,d_d,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 15
dr = d_d2(d1,d2);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -369,13 +381,13 @@ void
FFI_CALL(cif,d_d2,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 16
dr = d_d4(d1,d2,d3,d4);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -387,13 +399,13 @@ void
FFI_CALL(cif,d_d4,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 17
dr = d_d8(d1,d2,d3,d4,d5,d6,d7,d8);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -405,13 +417,13 @@ void
FFI_CALL(cif,d_d8,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 18
dr = d_d16(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15,d16);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -423,7 +435,7 @@ void
FFI_CALL(cif,d_d16,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
return;
@@ -435,7 +447,7 @@ void
#if (!defined(DGTEST)) || DGTEST == 19
vpr = vp_vpdpcpsp(&uc1,&d2,str3,&I4);
- FPRINTF(out,"->0x%p\n",vpr);
+ fprintf(out,"->0x%p\n",vpr);
fflush(out);
vpr = 0; clear_traces();
{
@@ -451,7 +463,7 @@ void
FFI_CALL(cif,vp_vpdpcpsp,args,&vpr);
}
}
- FPRINTF(out,"->0x%p\n",vpr);
+ fprintf(out,"->0x%p\n",vpr);
fflush(out);
#endif
return;
@@ -469,7 +481,7 @@ void
*/
#if (!defined(DGTEST)) || DGTEST == 20
ucr = uc_ucsil(uc1, us2, ui3, ul4);
- FPRINTF(out,"->%u\n",ucr);
+ fprintf(out,"->%u\n",ucr);
fflush(out);
ucr = 0; clear_traces();
{
@@ -483,7 +495,7 @@ void
ucr = (uchar) r;
}
}
- FPRINTF(out,"->%u\n",ucr);
+ fprintf(out,"->%u\n",ucr);
fflush(out);
#endif
@@ -491,7 +503,7 @@ void
/* Mixed int & float types.
*/
dr = d_iidd(i1,i2,d3,d4);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -503,13 +515,13 @@ void
FFI_CALL(cif,d_iidd,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 22
dr = d_iiidi(i1,i2,i3,d4,i5);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -521,13 +533,13 @@ void
FFI_CALL(cif,d_iiidi,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 23
dr = d_idid(i1,d2,i3,d4);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -539,13 +551,13 @@ void
FFI_CALL(cif,d_idid,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 24
dr = d_fdi(f1,d2,i3);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -557,13 +569,13 @@ void
FFI_CALL(cif,d_fdi,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 25
usr = us_cdcd(c1,d2,c3,d4);
- FPRINTF(out,"->%u\n",usr);
+ fprintf(out,"->%u\n",usr);
fflush(out);
usr = 0; clear_traces();
{
@@ -577,7 +589,7 @@ void
usr = (ushort) rint;
}
}
- FPRINTF(out,"->%u\n",usr);
+ fprintf(out,"->%u\n",usr);
fflush(out);
#endif
@@ -585,7 +597,7 @@ void
/* Long long types.
*/
llr = ll_iiilli(i1,i2,i3,ll1,i13);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
{
@@ -597,13 +609,13 @@ void
FFI_CALL(cif,ll_iiilli,args,&llr);
}
}
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 27
llr = ll_flli(f13,ll1,i13);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
{
@@ -615,13 +627,13 @@ void
FFI_CALL(cif,ll_flli,args,&llr);
}
}
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 28
fr = f_fi(f1,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -633,13 +645,13 @@ void
FFI_CALL(cif,f_fi,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 29
fr = f_f2i(f1,f2,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -651,13 +663,13 @@ void
FFI_CALL(cif,f_f2i,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 30
fr = f_f3i(f1,f2,f3,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -669,13 +681,13 @@ void
FFI_CALL(cif,f_f3i,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 31
fr = f_f4i(f1,f2,f3,f4,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -687,13 +699,13 @@ void
FFI_CALL(cif,f_f4i,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 32
fr = f_f7i(f1,f2,f3,f4,f5,f6,f7,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -705,13 +717,13 @@ void
FFI_CALL(cif,f_f7i,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 33
fr = f_f8i(f1,f2,f3,f4,f5,f6,f7,f8,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -723,13 +735,13 @@ void
FFI_CALL(cif,f_f8i,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 34
fr = f_f12i(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -741,13 +753,13 @@ void
FFI_CALL(cif,f_f12i,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 35
fr = f_f13i(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -759,13 +771,13 @@ void
FFI_CALL(cif,f_f13i,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 36
dr = d_di(d1,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -777,13 +789,13 @@ void
FFI_CALL(cif,d_di,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 37
dr = d_d2i(d1,d2,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -795,13 +807,13 @@ void
FFI_CALL(cif,d_d2i,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 38
dr = d_d3i(d1,d2,d3,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -813,13 +825,13 @@ void
FFI_CALL(cif,d_d3i,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 39
dr = d_d4i(d1,d2,d3,d4,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -831,13 +843,13 @@ void
FFI_CALL(cif,d_d4i,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 40
dr = d_d7i(d1,d2,d3,d4,d5,d6,d7,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -849,13 +861,13 @@ void
FFI_CALL(cif,d_d7i,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 41
dr = d_d8i(d1,d2,d3,d4,d5,d6,d7,d8,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -867,13 +879,13 @@ void
FFI_CALL(cif,d_d8i,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 42
dr = d_d12i(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -885,13 +897,13 @@ void
FFI_CALL(cif,d_d12i,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 43
dr = d_d13i(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -903,7 +915,7 @@ void
FFI_CALL(cif,d_d13i,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
return;
@@ -914,7 +926,7 @@ void
#if (!defined(DGTEST)) || DGTEST == 44
{
Size1 r = S1_v();
- FPRINTF(out,"->{%c}\n",r.x1);
+ fprintf(out,"->{%c}\n",r.x1);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
{
@@ -930,14 +942,14 @@ void
FFI_CALL(cif,S1_v,NULL,&r);
}
}
- FPRINTF(out,"->{%c}\n",r.x1);
+ fprintf(out,"->{%c}\n",r.x1);
fflush(out);
}
#endif
#if (!defined(DGTEST)) || DGTEST == 45
{
Size2 r = S2_v();
- FPRINTF(out,"->{%c%c}\n",r.x1,r.x2);
+ fprintf(out,"->{%c%c}\n",r.x1,r.x2);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
{
@@ -953,14 +965,14 @@ void
FFI_CALL(cif,S2_v,NULL,&r);
}
}
- FPRINTF(out,"->{%c%c}\n",r.x1,r.x2);
+ fprintf(out,"->{%c%c}\n",r.x1,r.x2);
fflush(out);
}
#endif
#if (!defined(DGTEST)) || DGTEST == 46
{
Size3 r = S3_v();
- FPRINTF(out,"->{%c%c%c}\n",r.x1,r.x2,r.x3);
+ fprintf(out,"->{%c%c%c}\n",r.x1,r.x2,r.x3);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
{
@@ -976,14 +988,14 @@ void
FFI_CALL(cif,S3_v,NULL,&r);
}
}
- FPRINTF(out,"->{%c%c%c}\n",r.x1,r.x2,r.x3);
+ fprintf(out,"->{%c%c%c}\n",r.x1,r.x2,r.x3);
fflush(out);
}
#endif
#if (!defined(DGTEST)) || DGTEST == 47
{
Size4 r = S4_v();
- FPRINTF(out,"->{%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4);
+ fprintf(out,"->{%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
{
@@ -999,14 +1011,14 @@ void
FFI_CALL(cif,S4_v,NULL,&r);
}
}
- FPRINTF(out,"->{%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4);
+ fprintf(out,"->{%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4);
fflush(out);
}
#endif
#if (!defined(DGTEST)) || DGTEST == 48
{
Size7 r = S7_v();
- FPRINTF(out,"->{%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7);
+ fprintf(out,"->{%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
{
@@ -1022,14 +1034,14 @@ void
FFI_CALL(cif,S7_v,NULL,&r);
}
}
- FPRINTF(out,"->{%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7);
+ fprintf(out,"->{%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7);
fflush(out);
}
#endif
#if (!defined(DGTEST)) || DGTEST == 49
{
Size8 r = S8_v();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
{
@@ -1045,14 +1057,14 @@ void
FFI_CALL(cif,S8_v,NULL,&r);
}
}
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8);
fflush(out);
}
#endif
#if (!defined(DGTEST)) || DGTEST == 50
{
Size12 r = S12_v();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
{
@@ -1068,14 +1080,14 @@ void
FFI_CALL(cif,S12_v,NULL,&r);
}
}
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12);
fflush(out);
}
#endif
#if (!defined(DGTEST)) || DGTEST == 51
{
Size15 r = S15_v();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
{
@@ -1091,14 +1103,14 @@ void
FFI_CALL(cif,S15_v,NULL,&r);
}
}
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15);
fflush(out);
}
#endif
#if (!defined(DGTEST)) || DGTEST == 52
{
Size16 r = S16_v();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15,r.x16);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15,r.x16);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
{
@@ -1114,7 +1126,7 @@ void
FFI_CALL(cif,S16_v,NULL,&r);
}
}
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15,r.x16);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15,r.x16);
fflush(out);
}
#endif
@@ -1134,7 +1146,7 @@ void
#if (!defined(DGTEST)) || DGTEST == 53
Ir = I_III(I1,I2,I3);
- FPRINTF(out,"->{%d}\n",Ir.x);
+ fprintf(out,"->{%d}\n",Ir.x);
fflush(out);
Ir.x = 0; clear_traces();
{
@@ -1152,12 +1164,12 @@ void
FFI_CALL(cif,I_III,args,&Ir);
}
}
- FPRINTF(out,"->{%d}\n",Ir.x);
+ fprintf(out,"->{%d}\n",Ir.x);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 54
Cr = C_CdC(C1,d2,C3);
- FPRINTF(out,"->{'%c'}\n",Cr.x);
+ fprintf(out,"->{'%c'}\n",Cr.x);
fflush(out);
Cr.x = '\0'; clear_traces();
{
@@ -1175,12 +1187,12 @@ void
FFI_CALL(cif,C_CdC,args,&Cr);
}
}
- FPRINTF(out,"->{'%c'}\n",Cr.x);
+ fprintf(out,"->{'%c'}\n",Cr.x);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 55
Fr = F_Ffd(F1,f2,d3);
- FPRINTF(out,"->{%g}\n",Fr.x);
+ fprintf(out,"->{%g}\n",Fr.x);
fflush(out);
Fr.x = 0.0; clear_traces();
{
@@ -1198,12 +1210,12 @@ void
FFI_CALL(cif,F_Ffd,args,&Fr);
}
}
- FPRINTF(out,"->{%g}\n",Fr.x);
+ fprintf(out,"->{%g}\n",Fr.x);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 56
Dr = D_fDd(f1,D2,d3);
- FPRINTF(out,"->{%g}\n",Dr.x);
+ fprintf(out,"->{%g}\n",Dr.x);
fflush(out);
Dr.x = 0.0; clear_traces();
{
@@ -1221,12 +1233,12 @@ void
FFI_CALL(cif,D_fDd,args,&Dr);
}
}
- FPRINTF(out,"->{%g}\n",Dr.x);
+ fprintf(out,"->{%g}\n",Dr.x);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 57
Dr = D_Dfd(D1,f2,d3);
- FPRINTF(out,"->{%g}\n",Dr.x);
+ fprintf(out,"->{%g}\n",Dr.x);
fflush(out);
Dr.x = 0.0; clear_traces();
{
@@ -1244,12 +1256,12 @@ void
FFI_CALL(cif,D_Dfd,args,&Dr);
}
}
- FPRINTF(out,"->{%g}\n",Dr.x);
+ fprintf(out,"->{%g}\n",Dr.x);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 58
Jr = J_JiJ(J1,i2,J2);
- FPRINTF(out,"->{%ld,%ld}\n",Jr.l1,Jr.l2);
+ fprintf(out,"->{%ld,%ld}\n",Jr.l1,Jr.l2);
fflush(out);
Jr.l1 = Jr.l2 = 0; clear_traces();
{
@@ -1267,13 +1279,13 @@ void
FFI_CALL(cif,J_JiJ,args,&Jr);
}
}
- FPRINTF(out,"->{%ld,%ld}\n",Jr.l1,Jr.l2);
+ fprintf(out,"->{%ld,%ld}\n",Jr.l1,Jr.l2);
fflush(out);
#endif
#ifndef SKIP_EXTRA_STRUCTS
#if (!defined(DGTEST)) || DGTEST == 59
Tr = T_TcT(T1,' ',T2);
- FPRINTF(out,"->{\"%c%c%c\"}\n",Tr.c[0],Tr.c[1],Tr.c[2]);
+ fprintf(out,"->{\"%c%c%c\"}\n",Tr.c[0],Tr.c[1],Tr.c[2]);
fflush(out);
Tr.c[0] = Tr.c[1] = Tr.c[2] = 0; clear_traces();
{
@@ -1292,12 +1304,12 @@ void
FFI_CALL(cif,T_TcT,args,&Tr);
}
}
- FPRINTF(out,"->{\"%c%c%c\"}\n",Tr.c[0],Tr.c[1],Tr.c[2]);
+ fprintf(out,"->{\"%c%c%c\"}\n",Tr.c[0],Tr.c[1],Tr.c[2]);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 60
Xr = X_BcdB(B1,c2,d3,B2);
- FPRINTF(out,"->{\"%s\",'%c'}\n",Xr.c,Xr.c1);
+ fprintf(out,"->{\"%s\",'%c'}\n",Xr.c,Xr.c1);
fflush(out);
Xr.c[0]=Xr.c1='\0'; clear_traces();
{
@@ -1315,7 +1327,7 @@ void
FFI_CALL(cif,X_BcdB,args,&Xr);
}
}
- FPRINTF(out,"->{\"%s\",'%c'}\n",Xr.c,Xr.c1);
+ fprintf(out,"->{\"%s\",'%c'}\n",Xr.c,Xr.c1);
fflush(out);
#endif
#endif
@@ -1347,7 +1359,7 @@ void
#if (!defined(DGTEST)) || DGTEST == 61
lr = l_l0K(K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
{
@@ -1359,12 +1371,12 @@ void
FFI_CALL(cif,l_l0K,args,&lr);
}
}
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 62
lr = l_l1K(l1,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
{
@@ -1376,12 +1388,12 @@ void
FFI_CALL(cif,l_l1K,args,&lr);
}
}
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 63
lr = l_l2K(l1,l2,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
{
@@ -1393,12 +1405,12 @@ void
FFI_CALL(cif,l_l2K,args,&lr);
}
}
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 64
lr = l_l3K(l1,l2,l3,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
{
@@ -1410,12 +1422,12 @@ void
FFI_CALL(cif,l_l3K,args,&lr);
}
}
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 65
lr = l_l4K(l1,l2,l3,l4,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
{
@@ -1427,12 +1439,12 @@ void
FFI_CALL(cif,l_l4K,args,&lr);
}
}
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 66
lr = l_l5K(l1,l2,l3,l4,l5,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
{
@@ -1444,12 +1456,12 @@ void
FFI_CALL(cif,l_l5K,args,&lr);
}
}
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 67
lr = l_l6K(l1,l2,l3,l4,l5,l6,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
{
@@ -1461,12 +1473,12 @@ void
FFI_CALL(cif,l_l6K,args,&lr);
}
}
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 68
fr = f_f17l3L(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,l6,l7,l8,L1);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
{
@@ -1478,12 +1490,12 @@ void
FFI_CALL(cif,f_f17l3L,args,&fr);
}
}
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 69
dr = d_d17l3L(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15,d16,d17,l6,l7,l8,L1);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -1495,12 +1507,12 @@ void
FFI_CALL(cif,d_d17l3L,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 70
llr = ll_l2ll(l1,l2,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
{
@@ -1512,12 +1524,12 @@ void
FFI_CALL(cif,ll_l2ll,args,&llr);
}
}
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 71
llr = ll_l3ll(l1,l2,l3,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
{
@@ -1529,12 +1541,12 @@ void
FFI_CALL(cif,ll_l3ll,args,&llr);
}
}
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 72
llr = ll_l4ll(l1,l2,l3,l4,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
{
@@ -1546,12 +1558,12 @@ void
FFI_CALL(cif,ll_l4ll,args,&llr);
}
}
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 73
llr = ll_l5ll(l1,l2,l3,l4,l5,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
{
@@ -1563,12 +1575,12 @@ void
FFI_CALL(cif,ll_l5ll,args,&llr);
}
}
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 74
llr = ll_l6ll(l1,l2,l3,l4,l5,l6,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
{
@@ -1580,12 +1592,12 @@ void
FFI_CALL(cif,ll_l6ll,args,&llr);
}
}
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 75
llr = ll_l7ll(l1,l2,l3,l4,l5,l6,l7,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
{
@@ -1597,12 +1609,12 @@ void
FFI_CALL(cif,ll_l7ll,args,&llr);
}
}
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 76
dr = d_l2d(l1,l2,d2,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -1614,12 +1626,12 @@ void
FFI_CALL(cif,d_l2d,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 77
dr = d_l3d(l1,l2,l3,d2,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -1631,12 +1643,12 @@ void
FFI_CALL(cif,d_l3d,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 78
dr = d_l4d(l1,l2,l3,l4,d2,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -1648,12 +1660,12 @@ void
FFI_CALL(cif,d_l4d,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 79
dr = d_l5d(l1,l2,l3,l4,l5,d2,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -1665,12 +1677,12 @@ void
FFI_CALL(cif,d_l5d,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 80
dr = d_l6d(l1,l2,l3,l4,l5,l6,d2,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -1682,12 +1694,12 @@ void
FFI_CALL(cif,d_l6d,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 81
dr = d_l7d(l1,l2,l3,l4,l5,l6,l7,d2,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
{
@@ -1699,7 +1711,7 @@ void
FFI_CALL(cif,d_l7d,args,&dr);
}
}
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
return;
diff --git a/testsuite/libffi.bhaible/test-callback.c b/testsuite/libffi.bhaible/test-callback.c
index 8bf9dd2..cb52a31 100644
--- a/testsuite/libffi.bhaible/test-callback.c
+++ b/testsuite/libffi.bhaible/test-callback.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <ffi.h>
#include "alignof.h"
+#include <stdarg.h>
#include "testcases.c"
@@ -33,28 +34,39 @@
int count = 0;
char rbuf1[2048];
char rbuf2[2048];
-#define FPRINTF(STREAM,FMT,ARGS...) \
- { fprintf(STREAM, FMT, ##ARGS) ; \
- switch (count++) \
- { \
- case 0: \
- case 1: \
- sprintf(&rbuf1[strlen(rbuf1)], FMT, ##ARGS); \
- break ; \
- case 2: \
- sprintf(rbuf2, FMT, ##ARGS); \
- break; \
- case 3: \
- sprintf(&rbuf2[strlen(rbuf2)], FMT, ##ARGS); \
- if (strcmp (rbuf1, rbuf2)) abort(); \
- break; \
- } \
- }
-#else
-#define FPRINTF fprintf
+int fprintf(FILE *stream, const char *format, ...)
+{
+ va_list args;
+ va_start(args, format);
+
+ switch (count++)
+ {
+ case 0:
+ case 1:
+ vsprintf(&rbuf1[strlen(rbuf1)], format, args);
+ break;
+ case 2:
+ printf(rbuf1);
+ vsprintf(rbuf2, format, args);
+ break;
+ case 3:
+ vsprintf(&rbuf2[strlen(rbuf2)], format, args);
+ printf(rbuf2);
+ if (strcmp (rbuf1, rbuf2)) abort();
+ break;
+ }
+
+ va_end(args);
+
+ return 0;
+}
#endif
/* --------------------------------------------------------------- */
+#ifndef ABI_NUM
+#define ABI_NUM FFI_DEFAULT_ABI
+#endif
+
/* Definitions that ought to be part of libffi. */
static ffi_type ffi_type_char;
#define ffi_type_slonglong ffi_type_sint64
@@ -64,9 +76,9 @@ static ffi_type ffi_type_char;
#define SKIP_EXTRA_STRUCTS
#define FFI_PREP_CIF(cif,argtypes,rettype) \
- if (ffi_prep_cif(&(cif),FFI_DEFAULT_ABI,sizeof(argtypes)/sizeof(argtypes[0]),&rettype,argtypes) != FFI_OK) abort()
+ if (ffi_prep_cif(&(cif),ABI_NUM,sizeof(argtypes)/sizeof(argtypes[0]),&rettype,argtypes) != FFI_OK) abort()
#define FFI_PREP_CIF_NOARGS(cif,rettype) \
- if (ffi_prep_cif(&(cif),FFI_DEFAULT_ABI,0,&rettype,NULL) != FFI_OK) abort()
+ if (ffi_prep_cif(&(cif),ABI_NUM,0,&rettype,NULL) != FFI_OK) abort()
#if defined(__sparc__) && defined(__sun) && defined(__SUNPRO_C) /* SUNWspro cc */
/* SunPRO cc miscompiles the simulator function for X_BcdB: d.i[1] is
@@ -88,7 +100,7 @@ static ffi_type ffi_type_char;
void v_v_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args, void* data)
{
if (data != (void*)&v_v) { fprintf(out,"wrong data for v_v\n"); exit(1); }
- FPRINTF(out,"void f(void):\n");
+ fprintf(out,"void f(void):\n");
fflush(out);
}
@@ -97,7 +109,7 @@ void i_v_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args, v
{
if (data != (void*)&i_v) { fprintf(out,"wrong data for i_v\n"); exit(1); }
{int r=99;
- FPRINTF(out,"int f(void):");
+ fprintf(out,"int f(void):");
fflush(out);
*(ffi_arg*)retp = r;
}}
@@ -106,7 +118,7 @@ void i_i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args, v
if (data != (void*)&i_i) { fprintf(out,"wrong data for i_i\n"); exit(1); }
int a = *(int*)(*args++);
int r=a+1;
- FPRINTF(out,"int f(int):(%d)",a);
+ fprintf(out,"int f(int):(%d)",a);
fflush(out);
*(ffi_arg*)retp = r;
}
@@ -116,7 +128,7 @@ void i_i2_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{int a = *(int*)(*args++);
int b = *(int*)(*args++);
int r=a+b;
- FPRINTF(out,"int f(2*int):(%d,%d)",a,b);
+ fprintf(out,"int f(2*int):(%d,%d)",a,b);
fflush(out);
*(ffi_arg*)retp = r;
}}
@@ -128,7 +140,7 @@ void i_i4_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
int c = *(int*)(*args++);
int d = *(int*)(*args++);
int r=a+b+c+d;
- FPRINTF(out,"int f(4*int):(%d,%d,%d,%d)",a,b,c,d);
+ fprintf(out,"int f(4*int):(%d,%d,%d,%d)",a,b,c,d);
fflush(out);
*(ffi_arg*)retp = r;
}}
@@ -144,7 +156,7 @@ void i_i8_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
int g = *(int*)(*args++);
int h = *(int*)(*args++);
int r=a+b+c+d+e+f+g+h;
- FPRINTF(out,"int f(8*int):(%d,%d,%d,%d,%d,%d,%d,%d)",a,b,c,d,e,f,g,h);
+ fprintf(out,"int f(8*int):(%d,%d,%d,%d,%d,%d,%d,%d)",a,b,c,d,e,f,g,h);
fflush(out);
*(ffi_arg*)retp = r;
}}
@@ -168,7 +180,7 @@ void i_i16_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
int o = *(int*)(*args++);
int p = *(int*)(*args++);
int r=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p;
- FPRINTF(out,"int f(16*int):(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)",
+ fprintf(out,"int f(16*int):(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)",
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
fflush(out);
*(ffi_arg*)retp = r;
@@ -180,7 +192,7 @@ void f_f_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args, v
if (data != (void*)&f_f) { fprintf(out,"wrong data for f_f\n"); exit(1); }
{float a = *(float*)(*args++);
float r=a+1.0;
- FPRINTF(out,"float f(float):(%g)",a);
+ fprintf(out,"float f(float):(%g)",a);
fflush(out);
*(float*)retp = r;
}}
@@ -190,7 +202,7 @@ void f_f2_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{float a = *(float*)(*args++);
float b = *(float*)(*args++);
float r=a+b;
- FPRINTF(out,"float f(2*float):(%g,%g)",a,b);
+ fprintf(out,"float f(2*float):(%g,%g)",a,b);
fflush(out);
*(float*)retp = r;
}}
@@ -202,7 +214,7 @@ void f_f4_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
float c = *(float*)(*args++);
float d = *(float*)(*args++);
float r=a+b+c+d;
- FPRINTF(out,"float f(4*float):(%g,%g,%g,%g)",a,b,c,d);
+ fprintf(out,"float f(4*float):(%g,%g,%g,%g)",a,b,c,d);
fflush(out);
*(float*)retp = r;
}}
@@ -218,7 +230,7 @@ void f_f8_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
float g = *(float*)(*args++);
float h = *(float*)(*args++);
float r=a+b+c+d+e+f+g+h;
- FPRINTF(out,"float f(8*float):(%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h);
+ fprintf(out,"float f(8*float):(%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h);
fflush(out);
*(float*)retp = r;
}}
@@ -242,7 +254,7 @@ void f_f16_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
float o = *(float*)(*args++);
float p = *(float*)(*args++);
float r=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p;
- FPRINTF(out,"float f(16*float):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
+ fprintf(out,"float f(16*float):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
fflush(out);
*(float*)retp = r;
}}
@@ -274,7 +286,7 @@ void f_f24_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
float x = *(float*)(*args++);
float y = *(float*)(*args++);
float r=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+s+t+u+v+w+x+y;
- FPRINTF(out,"float f(24*float):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,v,w,x,y);
+ fprintf(out,"float f(24*float):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,v,w,x,y);
fflush(out);
*(float*)retp = r;
}}
@@ -285,7 +297,7 @@ void d_d_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args, v
if (data != (void*)&d_d) { fprintf(out,"wrong data for d_d\n"); exit(1); }
{double a = *(double*)(*args++);
double r=a+1.0;
- FPRINTF(out,"double f(double):(%g)",a);
+ fprintf(out,"double f(double):(%g)",a);
fflush(out);
*(double*)retp = r;
}}
@@ -295,7 +307,7 @@ void d_d2_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{double a = *(double*)(*args++);
double b = *(double*)(*args++);
double r=a+b;
- FPRINTF(out,"double f(2*double):(%g,%g)",a,b);
+ fprintf(out,"double f(2*double):(%g,%g)",a,b);
fflush(out);
*(double*)retp = r;
}}
@@ -307,7 +319,7 @@ void d_d4_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double c = *(double*)(*args++);
double d = *(double*)(*args++);
double r=a+b+c+d;
- FPRINTF(out,"double f(4*double):(%g,%g,%g,%g)",a,b,c,d);
+ fprintf(out,"double f(4*double):(%g,%g,%g,%g)",a,b,c,d);
fflush(out);
*(double*)retp = r;
}}
@@ -323,7 +335,7 @@ void d_d8_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double g = *(double*)(*args++);
double h = *(double*)(*args++);
double r=a+b+c+d+e+f+g+h;
- FPRINTF(out,"double f(8*double):(%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h);
+ fprintf(out,"double f(8*double):(%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h);
fflush(out);
*(double*)retp = r;
}}
@@ -347,7 +359,7 @@ void d_d16_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double o = *(double*)(*args++);
double p = *(double*)(*args++);
double r=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p;
- FPRINTF(out,"double f(16*double):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
+ fprintf(out,"double f(16*double):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
fflush(out);
*(double*)retp = r;
}}
@@ -361,7 +373,7 @@ void vp_vpdpcpsp_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/
char* c = *(char* *)(*args++);
Int* d = *(Int* *)(*args++);
void* ret = (char*)b + 1;
- FPRINTF(out,"void* f(void*,double*,char*,Int*):(0x%p,0x%p,0x%p,0x%p)",a,b,c,d);
+ fprintf(out,"void* f(void*,double*,char*,Int*):(0x%p,0x%p,0x%p,0x%p)",a,b,c,d);
fflush(out);
*(void* *)retp = ret;
}}
@@ -375,7 +387,7 @@ void uc_ucsil_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *ar
uint c = *(unsigned int *)(*args++);
ulong d = *(unsigned long *)(*args++);
uchar r = (uchar)-1;
- FPRINTF(out,"uchar f(uchar,ushort,uint,ulong):(%u,%u,%u,%lu)",a,b,c,d);
+ fprintf(out,"uchar f(uchar,ushort,uint,ulong):(%u,%u,%u,%lu)",a,b,c,d);
fflush(out);
*(ffi_arg *)retp = r;
}}
@@ -387,7 +399,7 @@ void d_iidd_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args
double c = *(double*)(*args++);
double d = *(double*)(*args++);
double r=a+b+c+d;
- FPRINTF(out,"double f(int,int,double,double):(%d,%d,%g,%g)",a,b,c,d);
+ fprintf(out,"double f(int,int,double,double):(%d,%d,%g,%g)",a,b,c,d);
fflush(out);
*(double*)retp = r;
}}
@@ -400,7 +412,7 @@ void d_iiidi_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *arg
double d = *(double*)(*args++);
int e = *(int*)(*args++);
double r=a+b+c+d+e;
- FPRINTF(out,"double f(int,int,int,double,int):(%d,%d,%d,%g,%d)",a,b,c,d,e);
+ fprintf(out,"double f(int,int,int,double,int):(%d,%d,%d,%g,%d)",a,b,c,d,e);
fflush(out);
*(double*)retp = r;
}}
@@ -412,7 +424,7 @@ void d_idid_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args
int c = *(int*)(*args++);
double d = *(double*)(*args++);
double r=a+b+c+d;
- FPRINTF(out,"double f(int,double,int,double):(%d,%g,%d,%g)",a,b,c,d);
+ fprintf(out,"double f(int,double,int,double):(%d,%g,%d,%g)",a,b,c,d);
fflush(out);
*(double*)retp = r;
}}
@@ -423,7 +435,7 @@ void d_fdi_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double b = *(double*)(*args++);
int c = *(int*)(*args++);
double r=a+b+c;
- FPRINTF(out,"double f(float,double,int):(%g,%g,%d)",a,b,c);
+ fprintf(out,"double f(float,double,int):(%g,%g,%d)",a,b,c);
fflush(out);
*(double*)retp = r;
}}
@@ -435,7 +447,7 @@ void us_cdcd_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *arg
char c = *(char*)(*args++);
double d = *(double*)(*args++);
ushort r = (ushort)(a + b + c + d);
- FPRINTF(out,"ushort f(char,double,char,double):('%c',%g,'%c',%g)",a,b,c,d);
+ fprintf(out,"ushort f(char,double,char,double):('%c',%g,'%c',%g)",a,b,c,d);
fflush(out);
*(ffi_arg *)retp = r;
}}
@@ -448,7 +460,7 @@ void ll_iiilli_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *a
long long d = *(long long *)(*args++);
int e = *(int*)(*args++);
long long r = (long long)(int)a + (long long)(int)b + (long long)(int)c + d + (long long)e;
- FPRINTF(out,"long long f(int,int,int,long long,int):(%d,%d,%d,0x%lx%08lx,%d)",a,b,c,(long)(d>>32),(long)(d&0xffffffff),e);
+ fprintf(out,"long long f(int,int,int,long long,int):(%d,%d,%d,0x%lx%08lx,%d)",a,b,c,(long)(d>>32),(long)(d&0xffffffff),e);
fflush(out);
*(long long *)retp = r;
}}
@@ -459,7 +471,7 @@ void ll_flli_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *arg
long long b = *(long long *)(*args++);
int c = *(int*)(*args++);
long long r = (long long)(int)a + b + (long long)c;
- FPRINTF(out,"long long f(float,long long,int):(%g,0x%lx%08lx,0x%lx)",a,(long)(b>>32),(long)(b&0xffffffff),(long)c);
+ fprintf(out,"long long f(float,long long,int):(%g,0x%lx%08lx,0x%lx)",a,(long)(b>>32),(long)(b&0xffffffff),(long)c);
fflush(out);
*(long long *)retp = r;
}}
@@ -469,7 +481,7 @@ void f_fi_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{float a = *(float*)(*args++);
int z = *(int*)(*args++);
float r=a+z;
- FPRINTF(out,"float f(float,int):(%g,%d)",a,z);
+ fprintf(out,"float f(float,int):(%g,%d)",a,z);
fflush(out);
*(float*)retp = r;
}}
@@ -480,7 +492,7 @@ void f_f2i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
float b = *(float*)(*args++);
int z = *(int*)(*args++);
float r=a+b+z;
- FPRINTF(out,"float f(2*float,int):(%g,%g,%d)",a,b,z);
+ fprintf(out,"float f(2*float,int):(%g,%g,%d)",a,b,z);
fflush(out);
*(float*)retp = r;
}}
@@ -492,7 +504,7 @@ void f_f3i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
float c = *(float*)(*args++);
int z = *(int*)(*args++);
float r=a+b+c+z;
- FPRINTF(out,"float f(3*float,int):(%g,%g,%g,%d)",a,b,c,z);
+ fprintf(out,"float f(3*float,int):(%g,%g,%g,%d)",a,b,c,z);
fflush(out);
*(float*)retp = r;
}}
@@ -505,7 +517,7 @@ void f_f4i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
float d = *(float*)(*args++);
int z = *(int*)(*args++);
float r=a+b+c+d+z;
- FPRINTF(out,"float f(4*float,int):(%g,%g,%g,%g,%d)",a,b,c,d,z);
+ fprintf(out,"float f(4*float,int):(%g,%g,%g,%g,%d)",a,b,c,d,z);
fflush(out);
*(float*)retp = r;
}}
@@ -521,7 +533,7 @@ void f_f7i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
float g = *(float*)(*args++);
int z = *(int*)(*args++);
float r=a+b+c+d+e+f+g+z;
- FPRINTF(out,"float f(7*float,int):(%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,z);
+ fprintf(out,"float f(7*float,int):(%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,z);
fflush(out);
*(float*)retp = r;
}}
@@ -538,7 +550,7 @@ void f_f8i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
float h = *(float*)(*args++);
int z = *(int*)(*args++);
float r=a+b+c+d+e+f+g+h+z;
- FPRINTF(out,"float f(8*float,int):(%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,z);
+ fprintf(out,"float f(8*float,int):(%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,z);
fflush(out);
*(float*)retp = r;
}}
@@ -559,7 +571,7 @@ void f_f12i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args
float l = *(float*)(*args++);
int z = *(int*)(*args++);
float r=a+b+c+d+e+f+g+h+i+j+k+l+z;
- FPRINTF(out,"float f(12*float,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,z);
+ fprintf(out,"float f(12*float,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,z);
fflush(out);
*(float*)retp = r;
}}
@@ -581,7 +593,7 @@ void f_f13i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args
float m = *(float*)(*args++);
int z = *(int*)(*args++);
float r=a+b+c+d+e+f+g+h+i+j+k+l+m+z;
- FPRINTF(out,"float f(13*float,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,m,z);
+ fprintf(out,"float f(13*float,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,m,z);
fflush(out);
*(float*)retp = r;
}}
@@ -591,7 +603,7 @@ void d_di_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{double a = *(double*)(*args++);
int z = *(int*)(*args++);
double r=a+z;
- FPRINTF(out,"double f(double,int):(%g,%d)",a,z);
+ fprintf(out,"double f(double,int):(%g,%d)",a,z);
fflush(out);
*(double*)retp = r;
}}
@@ -602,7 +614,7 @@ void d_d2i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double b = *(double*)(*args++);
int z = *(int*)(*args++);
double r=a+b+z;
- FPRINTF(out,"double f(2*double,int):(%g,%g,%d)",a,b,z);
+ fprintf(out,"double f(2*double,int):(%g,%g,%d)",a,b,z);
fflush(out);
*(double*)retp = r;
}}
@@ -614,7 +626,7 @@ void d_d3i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double c = *(double*)(*args++);
int z = *(int*)(*args++);
double r=a+b+c+z;
- FPRINTF(out,"double f(3*double,int):(%g,%g,%g,%d)",a,b,c,z);
+ fprintf(out,"double f(3*double,int):(%g,%g,%g,%d)",a,b,c,z);
fflush(out);
*(double*)retp = r;
}}
@@ -627,7 +639,7 @@ void d_d4i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double d = *(double*)(*args++);
int z = *(int*)(*args++);
double r=a+b+c+d+z;
- FPRINTF(out,"double f(4*double,int):(%g,%g,%g,%g,%d)",a,b,c,d,z);
+ fprintf(out,"double f(4*double,int):(%g,%g,%g,%g,%d)",a,b,c,d,z);
fflush(out);
*(double*)retp = r;
}}
@@ -643,7 +655,7 @@ void d_d7i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double g = *(double*)(*args++);
int z = *(int*)(*args++);
double r=a+b+c+d+e+f+g+z;
- FPRINTF(out,"double f(7*double,int):(%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,z);
+ fprintf(out,"double f(7*double,int):(%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,z);
fflush(out);
*(double*)retp = r;
}}
@@ -660,7 +672,7 @@ void d_d8i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double h = *(double*)(*args++);
int z = *(int*)(*args++);
double r=a+b+c+d+e+f+g+h+z;
- FPRINTF(out,"double f(8*double,int):(%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,z);
+ fprintf(out,"double f(8*double,int):(%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,z);
fflush(out);
*(double*)retp = r;
}}
@@ -681,7 +693,7 @@ void d_d12i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args
double l = *(double*)(*args++);
int z = *(int*)(*args++);
double r=a+b+c+d+e+f+g+h+i+j+k+l+z;
- FPRINTF(out,"double f(12*double,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,z);
+ fprintf(out,"double f(12*double,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,z);
fflush(out);
*(double*)retp = r;
}}
@@ -703,7 +715,7 @@ void d_d13i_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args
double m = *(double*)(*args++);
int z = *(int*)(*args++);
double r=a+b+c+d+e+f+g+h+i+j+k+l+m+z;
- FPRINTF(out,"double f(13*double,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,m,z);
+ fprintf(out,"double f(13*double,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,m,z);
fflush(out);
*(double*)retp = r;
}}
@@ -713,7 +725,7 @@ void S1_v_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{
if (data != (void*)&S1_v) { fprintf(out,"wrong data for S1_v\n"); exit(1); }
{Size1 r = Size1_1;
- FPRINTF(out,"Size1 f(void):");
+ fprintf(out,"Size1 f(void):");
fflush(out);
*(Size1*)retp = r;
}}
@@ -721,7 +733,7 @@ void S2_v_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{
if (data != (void*)&S2_v) { fprintf(out,"wrong data for S2_v\n"); exit(1); }
{Size2 r = Size2_1;
- FPRINTF(out,"Size2 f(void):");
+ fprintf(out,"Size2 f(void):");
fflush(out);
*(Size2*)retp = r;
}}
@@ -729,7 +741,7 @@ void S3_v_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{
if (data != (void*)&S3_v) { fprintf(out,"wrong data for S3_v\n"); exit(1); }
{Size3 r = Size3_1;
- FPRINTF(out,"Size3 f(void):");
+ fprintf(out,"Size3 f(void):");
fflush(out);
*(Size3*)retp = r;
}}
@@ -737,7 +749,7 @@ void S4_v_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{
if (data != (void*)&S4_v) { fprintf(out,"wrong data for S4_v\n"); exit(1); }
{Size4 r = Size4_1;
- FPRINTF(out,"Size4 f(void):");
+ fprintf(out,"Size4 f(void):");
fflush(out);
*(Size4*)retp = r;
}}
@@ -745,7 +757,7 @@ void S7_v_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{
if (data != (void*)&S7_v) { fprintf(out,"wrong data for S7_v\n"); exit(1); }
{Size7 r = Size7_1;
- FPRINTF(out,"Size7 f(void):");
+ fprintf(out,"Size7 f(void):");
fflush(out);
*(Size7*)retp = r;
}}
@@ -753,7 +765,7 @@ void S8_v_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{
if (data != (void*)&S8_v) { fprintf(out,"wrong data for S8_v\n"); exit(1); }
{Size8 r = Size8_1;
- FPRINTF(out,"Size8 f(void):");
+ fprintf(out,"Size8 f(void):");
fflush(out);
*(Size8*)retp = r;
}}
@@ -761,7 +773,7 @@ void S12_v_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{
if (data != (void*)&S12_v) { fprintf(out,"wrong data for S12_v\n"); exit(1); }
{Size12 r = Size12_1;
- FPRINTF(out,"Size12 f(void):");
+ fprintf(out,"Size12 f(void):");
fflush(out);
*(Size12*)retp = r;
}}
@@ -769,7 +781,7 @@ void S15_v_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{
if (data != (void*)&S15_v) { fprintf(out,"wrong data for S15_v\n"); exit(1); }
{Size15 r = Size15_1;
- FPRINTF(out,"Size15 f(void):");
+ fprintf(out,"Size15 f(void):");
fflush(out);
*(Size15*)retp = r;
}}
@@ -777,7 +789,7 @@ void S16_v_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{
if (data != (void*)&S16_v) { fprintf(out,"wrong data for S16_v\n"); exit(1); }
{Size16 r = Size16_1;
- FPRINTF(out,"Size16 f(void):");
+ fprintf(out,"Size16 f(void):");
fflush(out);
*(Size16*)retp = r;
}}
@@ -791,7 +803,7 @@ void I_III_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
Int c = *(Int*)(*args++);
Int r;
r.x = a.x + b.x + c.x;
- FPRINTF(out,"Int f(Int,Int,Int):({%d},{%d},{%d})",a.x,b.x,c.x);
+ fprintf(out,"Int f(Int,Int,Int):({%d},{%d},{%d})",a.x,b.x,c.x);
fflush(out);
*(Int*)retp = r;
}}
@@ -803,7 +815,7 @@ void C_CdC_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
Char c = *(Char*)(*args++);
Char r;
r.x = (a.x + c.x)/2;
- FPRINTF(out,"Char f(Char,double,Char):({'%c'},%g,{'%c'})",a.x,b,c.x);
+ fprintf(out,"Char f(Char,double,Char):({'%c'},%g,{'%c'})",a.x,b,c.x);
fflush(out);
*(Char*)retp = r;
}}
@@ -815,7 +827,7 @@ void F_Ffd_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double c = *(double*)(*args++);
Float r;
r.x = a.x + b + c;
- FPRINTF(out,"Float f(Float,float,double):({%g},%g,%g)",a.x,b,c);
+ fprintf(out,"Float f(Float,float,double):({%g},%g,%g)",a.x,b,c);
fflush(out);
*(Float*)retp = r;
}}
@@ -827,7 +839,7 @@ void D_fDd_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double c = *(double*)(*args++);
Double r;
r.x = a + b.x + c;
- FPRINTF(out,"Double f(float,Double,double):(%g,{%g},%g)",a,b.x,c);
+ fprintf(out,"Double f(float,Double,double):(%g,{%g},%g)",a,b.x,c);
fflush(out);
*(Double*)retp = r;
}}
@@ -839,7 +851,7 @@ void D_Dfd_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double c = *(double*)(*args++);
Double r;
r.x = a.x + b + c;
- FPRINTF(out,"Double f(Double,float,double):({%g},%g,%g)",a.x,b,c);
+ fprintf(out,"Double f(Double,float,double):({%g},%g,%g)",a.x,b,c);
fflush(out);
*(Double*)retp = r;
}}
@@ -851,7 +863,7 @@ void J_JiJ_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
J c = *(J*)(*args++);
J r;
r.l1 = a.l1+c.l1; r.l2 = a.l2+b+c.l2;
- FPRINTF(out,"J f(J,int,J):({%ld,%ld},%d,{%ld,%ld})",a.l1,a.l2,b,c.l1,c.l2);
+ fprintf(out,"J f(J,int,J):({%ld,%ld},%d,{%ld,%ld})",a.l1,a.l2,b,c.l1,c.l2);
fflush(out);
*(J*)retp = r;
}}
@@ -864,7 +876,7 @@ void T_TcT_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
T c = *(T*)(*args++);
T r;
r.c[0]='b'; r.c[1]=c.c[1]; r.c[2]=c.c[2];
- FPRINTF(out,"T f(T,char,T):({\"%c%c%c\"},'%c',{\"%c%c%c\"})",a.c[0],a.c[1],a.c[2],b,c.c[0],c.c[1],c.c[2]);
+ fprintf(out,"T f(T,char,T):({\"%c%c%c\"},'%c',{\"%c%c%c\"})",a.c[0],a.c[1],a.c[2],b,c.c[0],c.c[1],c.c[2]);
fflush(out);
*(T*)retp = r;
}}
@@ -879,7 +891,7 @@ void X_BcdB_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args
X r;
r = xr;
r.c1 = b;
- FPRINTF(out,"X f(B,char,double,B):({%g,{%d,%d,%d}},'%c',%g,{%g,{%d,%d,%d}})",
+ fprintf(out,"X f(B,char,double,B):({%g,{%d,%d,%d}},'%c',%g,{%g,{%d,%d,%d}})",
a.d,a.i[0],a.i[1],a.i[2],b,c,d.d,d.i[0],d.i[1],d.i[2]);
fflush(out);
*(X*)retp = r;
@@ -893,7 +905,7 @@ void l_l0K_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
{K b = *(K*)(*args++);
long c = *(long*)(*args++);
long r = b.l1 + b.l2 + b.l3 + b.l4 + c;
- FPRINTF(out,"long f(K,long):(%ld,%ld,%ld,%ld,%ld)",b.l1,b.l2,b.l3,b.l4,c);
+ fprintf(out,"long f(K,long):(%ld,%ld,%ld,%ld,%ld)",b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
*(ffi_arg*)retp = r;
}}
@@ -904,7 +916,7 @@ void l_l1K_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
K b = *(K*)(*args++);
long c = *(long*)(*args++);
long r = a1 + b.l1 + b.l2 + b.l3 + b.l4 + c;
- FPRINTF(out,"long f(long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld)",a1,b.l1,b.l2,b.l3,b.l4,c);
+ fprintf(out,"long f(long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld)",a1,b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
*(ffi_arg*)retp = r;
}}
@@ -916,7 +928,7 @@ void l_l2K_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
K b = *(K*)(*args++);
long c = *(long*)(*args++);
long r = a1 + a2 + b.l1 + b.l2 + b.l3 + b.l4 + c;
- FPRINTF(out,"long f(2*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,b.l1,b.l2,b.l3,b.l4,c);
+ fprintf(out,"long f(2*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
*(ffi_arg*)retp = r;
}}
@@ -929,7 +941,7 @@ void l_l3K_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
K b = *(K*)(*args++);
long c = *(long*)(*args++);
long r = a1 + a2 + a3 + b.l1 + b.l2 + b.l3 + b.l4 + c;
- FPRINTF(out,"long f(3*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,b.l1,b.l2,b.l3,b.l4,c);
+ fprintf(out,"long f(3*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
*(ffi_arg*)retp = r;
}}
@@ -943,7 +955,7 @@ void l_l4K_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
K b = *(K*)(*args++);
long c = *(long*)(*args++);
long r = a1 + a2 + a3 + a4 + b.l1 + b.l2 + b.l3 + b.l4 + c;
- FPRINTF(out,"long f(4*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,b.l1,b.l2,b.l3,b.l4,c);
+ fprintf(out,"long f(4*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
*(ffi_arg*)retp = r;
}}
@@ -958,7 +970,7 @@ void l_l5K_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
K b = *(K*)(*args++);
long c = *(long*)(*args++);
long r = a1 + a2 + a3 + a4 + a5 + b.l1 + b.l2 + b.l3 + b.l4 + c;
- FPRINTF(out,"long f(5*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,a5,b.l1,b.l2,b.l3,b.l4,c);
+ fprintf(out,"long f(5*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,a5,b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
*(ffi_arg*)retp = r;
}}
@@ -974,7 +986,7 @@ void l_l6K_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
K b = *(K*)(*args++);
long c = *(long*)(*args++);
long r = a1 + a2 + a3 + a4 + a5 + a6 + b.l1 + b.l2 + b.l3 + b.l4 + c;
- FPRINTF(out,"long f(6*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,a5,a6,b.l1,b.l2,b.l3,b.l4,c);
+ fprintf(out,"long f(6*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,a5,a6,b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
*(ffi_arg*)retp = r;
}}
@@ -1003,7 +1015,7 @@ void f_f17l3L_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *ar
long u = *(long*)(*args++);
L z = *(L*)(*args++);
float r = a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+s+t+u+z.l1+z.l2+z.l3+z.l4+z.l5+z.l6;
- FPRINTF(out,"float f(17*float,3*int,L):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,z.l1,z.l2,z.l3,z.l4,z.l5,z.l6);
+ fprintf(out,"float f(17*float,3*int,L):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,z.l1,z.l2,z.l3,z.l4,z.l5,z.l6);
fflush(out);
*(float*)retp = r;
}}
@@ -1032,7 +1044,7 @@ void d_d17l3L_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *ar
long u = *(long*)(*args++);
L z = *(L*)(*args++);
double r = a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+s+t+u+z.l1+z.l2+z.l3+z.l4+z.l5+z.l6;
- FPRINTF(out,"double f(17*double,3*int,L):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,z.l1,z.l2,z.l3,z.l4,z.l5,z.l6);
+ fprintf(out,"double f(17*double,3*int,L):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,z.l1,z.l2,z.l3,z.l4,z.l5,z.l6);
fflush(out);
*(double*)retp = r;
}}
@@ -1044,7 +1056,7 @@ void ll_l2ll_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *arg
long long b = *(long long *)(*args++);
long c = *(long*)(*args++);
long long r = (long long) (a1 + a2) + b + c;
- FPRINTF(out,"long long f(2*long,long long,long):(%ld,%ld,0x%lx%08lx,%ld)",a1,a2,(long)(b>>32),(long)(b&0xffffffff),c);
+ fprintf(out,"long long f(2*long,long long,long):(%ld,%ld,0x%lx%08lx,%ld)",a1,a2,(long)(b>>32),(long)(b&0xffffffff),c);
fflush(out);
*(long long *)retp = r;
}}
@@ -1057,7 +1069,7 @@ void ll_l3ll_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *arg
long long b = *(long long *)(*args++);
long c = *(long*)(*args++);
long long r = (long long) (a1 + a2 + a3) + b + c;
- FPRINTF(out,"long long f(3*long,long long,long):(%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,(long)(b>>32),(long)(b&0xffffffff),c);
+ fprintf(out,"long long f(3*long,long long,long):(%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,(long)(b>>32),(long)(b&0xffffffff),c);
fflush(out);
*(long long *)retp = r;
}}
@@ -1071,7 +1083,7 @@ void ll_l4ll_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *arg
long long b = *(long long *)(*args++);
long c = *(long*)(*args++);
long long r = (long long) (a1 + a2 + a3 + a4) + b + c;
- FPRINTF(out,"long long f(4*long,long long,long):(%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,(long)(b>>32),(long)(b&0xffffffff),c);
+ fprintf(out,"long long f(4*long,long long,long):(%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,(long)(b>>32),(long)(b&0xffffffff),c);
fflush(out);
*(long long *)retp = r;
}}
@@ -1086,7 +1098,7 @@ void ll_l5ll_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *arg
long long b = *(long long *)(*args++);
long c = *(long*)(*args++);
long long r = (long long) (a1 + a2 + a3 + a4 + a5) + b + c;
- FPRINTF(out,"long long f(5*long,long long,long):(%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,(long)(b>>32),(long)(b&0xffffffff),c);
+ fprintf(out,"long long f(5*long,long long,long):(%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,(long)(b>>32),(long)(b&0xffffffff),c);
fflush(out);
*(long long *)retp = r;
}}
@@ -1102,7 +1114,7 @@ void ll_l6ll_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *arg
long long b = *(long long *)(*args++);
long c = *(long*)(*args++);
long long r = (long long) (a1 + a2 + a3 + a4 + a5 + a6) + b + c;
- FPRINTF(out,"long long f(6*long,long long,long):(%ld,%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,a6,(long)(b>>32),(long)(b&0xffffffff),c);
+ fprintf(out,"long long f(6*long,long long,long):(%ld,%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,a6,(long)(b>>32),(long)(b&0xffffffff),c);
fflush(out);
*(long long *)retp = r;
}}
@@ -1119,7 +1131,7 @@ void ll_l7ll_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *arg
long long b = *(long long *)(*args++);
long c = *(long*)(*args++);
long long r = (long long) (a1 + a2 + a3 + a4 + a5 + a6 + a7) + b + c;
- FPRINTF(out,"long long f(7*long,long long,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,a6,a7,(long)(b>>32),(long)(b&0xffffffff),c);
+ fprintf(out,"long long f(7*long,long long,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,a6,a7,(long)(b>>32),(long)(b&0xffffffff),c);
fflush(out);
*(long long *)retp = r;
}}
@@ -1131,7 +1143,7 @@ void d_l2d_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double b = *(double*)(*args++);
long c = *(long*)(*args++);
double r = (double) (a1 + a2) + b + c;
- FPRINTF(out,"double f(2*long,double,long):(%ld,%ld,%g,%ld)",a1,a2,b,c);
+ fprintf(out,"double f(2*long,double,long):(%ld,%ld,%g,%ld)",a1,a2,b,c);
fflush(out);
*(double*)retp = r;
}}
@@ -1144,7 +1156,7 @@ void d_l3d_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double b = *(double*)(*args++);
long c = *(long*)(*args++);
double r = (double) (a1 + a2 + a3) + b + c;
- FPRINTF(out,"double f(3*long,double,long):(%ld,%ld,%ld,%g,%ld)",a1,a2,a3,b,c);
+ fprintf(out,"double f(3*long,double,long):(%ld,%ld,%ld,%g,%ld)",a1,a2,a3,b,c);
fflush(out);
*(double*)retp = r;
}}
@@ -1158,7 +1170,7 @@ void d_l4d_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double b = *(double*)(*args++);
long c = *(long*)(*args++);
double r = (double) (a1 + a2 + a3 + a4) + b + c;
- FPRINTF(out,"double f(4*long,double,long):(%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,b,c);
+ fprintf(out,"double f(4*long,double,long):(%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,b,c);
fflush(out);
*(double*)retp = r;
}}
@@ -1173,7 +1185,7 @@ void d_l5d_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double b = *(double*)(*args++);
long c = *(long*)(*args++);
double r = (double) (a1 + a2 + a3 + a4 + a5) + b + c;
- FPRINTF(out,"double f(5*long,double,long):(%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,b,c);
+ fprintf(out,"double f(5*long,double,long):(%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,b,c);
fflush(out);
*(double*)retp = r;
}}
@@ -1189,7 +1201,7 @@ void d_l6d_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double b = *(double*)(*args++);
long c = *(long*)(*args++);
double r = (double) (a1 + a2 + a3 + a4 + a5 + a6) + b + c;
- FPRINTF(out,"double f(6*long,double,long):(%ld,%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,a6,b,c);
+ fprintf(out,"double f(6*long,double,long):(%ld,%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,a6,b,c);
fflush(out);
*(double*)retp = r;
}}
@@ -1206,7 +1218,7 @@ void d_l7d_simulator (ffi_cif* cif, void* retp, /*const*/ void* /*const*/ *args,
double b = *(double*)(*args++);
long c = *(long*)(*args++);
double r = (double) (a1 + a2 + a3 + a4 + a5 + a6 + a7) + b + c;
- FPRINTF(out,"double f(7*long,double,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,a6,a7,b,c);
+ fprintf(out,"double f(7*long,double,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,a6,a7,b,c);
fflush(out);
*(double*)retp = r;
}}
@@ -1284,7 +1296,7 @@ int main (void)
ir = ((int (*) (void)) callback_code) ();
}
FREE_CALLBACK();
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
@@ -1302,7 +1314,7 @@ int main (void)
ir = ((int (*) (int)) callback_code) (i1);
}
FREE_CALLBACK();
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
@@ -1320,7 +1332,7 @@ int main (void)
ir = ((int (*) (int,int)) callback_code) (i1,i2);
}
FREE_CALLBACK();
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
@@ -1338,7 +1350,7 @@ int main (void)
ir = ((int (*) (int,int,int,int)) callback_code) (i1,i2,i3,i4);
}
FREE_CALLBACK();
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
@@ -1356,7 +1368,7 @@ int main (void)
ir = ((int (*) (int,int,int,int,int,int,int,int)) callback_code) (i1,i2,i3,i4,i5,i6,i7,i8);
}
FREE_CALLBACK();
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
@@ -1374,7 +1386,7 @@ int main (void)
ir = ((int (*) (int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int)) callback_code) (i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16);
}
FREE_CALLBACK();
- FPRINTF(out,"->%d\n",ir);
+ fprintf(out,"->%d\n",ir);
fflush(out);
#endif
}
@@ -1396,7 +1408,7 @@ int main (void)
fr = ((float (*) (float)) callback_code) (f1);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
@@ -1414,7 +1426,7 @@ int main (void)
fr = ((float (*) (float,float)) callback_code) (f1,f2);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
@@ -1432,7 +1444,7 @@ int main (void)
fr = ((float (*) (float,float,float,float)) callback_code) (f1,f2,f3,f4);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
@@ -1450,7 +1462,7 @@ int main (void)
fr = ((float (*) (float,float,float,float,float,float,float,float)) callback_code) (f1,f2,f3,f4,f5,f6,f7,f8);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
@@ -1468,7 +1480,7 @@ int main (void)
fr = ((float (*) (float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float)) callback_code) (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
@@ -1486,7 +1498,7 @@ int main (void)
fr = ((float (*) (float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float)) callback_code) (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
@@ -1509,7 +1521,7 @@ int main (void)
dr = ((double (*) (double)) callback_code) (d1);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
@@ -1527,7 +1539,7 @@ int main (void)
dr = ((double (*) (double,double)) callback_code) (d1,d2);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
@@ -1545,7 +1557,7 @@ int main (void)
dr = ((double (*) (double,double,double,double)) callback_code) (d1,d2,d3,d4);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
@@ -1563,7 +1575,7 @@ int main (void)
dr = ((double (*) (double,double,double,double,double,double,double,double)) callback_code) (d1,d2,d3,d4,d5,d6,d7,d8);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
@@ -1581,7 +1593,7 @@ int main (void)
dr = ((double (*) (double,double,double,double,double,double,double,double,double,double,double,double,double,double,double,double)) callback_code) (d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15,d16);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
}
@@ -1603,7 +1615,7 @@ int main (void)
vpr = ((void* (*) (void*,double*,char*,Int*)) callback_code) (&uc1,&d2,str3,&I4);
}
FREE_CALLBACK();
- FPRINTF(out,"->0x%p\n",vpr);
+ fprintf(out,"->0x%p\n",vpr);
fflush(out);
#endif
}
@@ -1629,7 +1641,7 @@ int main (void)
ucr = ((uchar (*) (uchar,ushort,uint,ulong)) callback_code) (uc1,us2,ui3,ul4);
}
FREE_CALLBACK();
- FPRINTF(out,"->%u\n",ucr);
+ fprintf(out,"->%u\n",ucr);
fflush(out);
#endif
@@ -1647,7 +1659,7 @@ int main (void)
dr = ((double (*) (int,int,double,double)) callback_code) (i1,i2,d3,d4);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
@@ -1671,7 +1683,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 23
dr = d_idid(i1,d2,i3,d4);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1689,7 +1701,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 24
dr = d_fdi(f1,d2,i3);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1707,7 +1719,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 25
usr = us_cdcd(c1,d2,c3,d4);
- FPRINTF(out,"->%u\n",usr);
+ fprintf(out,"->%u\n",usr);
fflush(out);
usr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -1725,7 +1737,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 26
llr = ll_iiilli(i1,i2,i3,ll1,i13);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -1737,13 +1749,13 @@ int main (void)
llr = ((long long (*) (int,int,int,long long,int)) callback_code) (i1,i2,i3,ll1,i13);
}
FREE_CALLBACK();
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 27
llr = ll_flli(f13,ll1,i13);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -1755,13 +1767,13 @@ int main (void)
llr = ((long long (*) (float,long long,int)) callback_code) (f13,ll1,i13);
}
FREE_CALLBACK();
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 28
fr = f_fi(f1,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1773,13 +1785,13 @@ int main (void)
fr = ((float (*) (float,int)) callback_code) (f1,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 29
fr = f_f2i(f1,f2,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1791,13 +1803,13 @@ int main (void)
fr = ((float (*) (float,float,int)) callback_code) (f1,f2,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 30
fr = f_f3i(f1,f2,f3,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1809,13 +1821,13 @@ int main (void)
fr = ((float (*) (float,float,float,int)) callback_code) (f1,f2,f3,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 31
fr = f_f4i(f1,f2,f3,f4,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1827,13 +1839,13 @@ int main (void)
fr = ((float (*) (float,float,float,float,int)) callback_code) (f1,f2,f3,f4,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 32
fr = f_f7i(f1,f2,f3,f4,f5,f6,f7,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1845,13 +1857,13 @@ int main (void)
fr = ((float (*) (float,float,float,float,float,float,float,int)) callback_code) (f1,f2,f3,f4,f5,f6,f7,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 33
fr = f_f8i(f1,f2,f3,f4,f5,f6,f7,f8,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1863,13 +1875,13 @@ int main (void)
fr = ((float (*) (float,float,float,float,float,float,float,float,int)) callback_code) (f1,f2,f3,f4,f5,f6,f7,f8,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 34
fr = f_f13i(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,i9);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1881,13 +1893,13 @@ int main (void)
fr = ((float (*) (float,float,float,float,float,float,float,float,float,float,float,float,float,int)) callback_code) (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 35
dr = d_di(d1,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1899,13 +1911,13 @@ int main (void)
dr = ((double (*) (double,int)) callback_code) (d1,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 36
dr = d_d2i(d1,d2,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1917,13 +1929,13 @@ int main (void)
dr = ((double (*) (double,double,int)) callback_code) (d1,d2,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 37
dr = d_d3i(d1,d2,d3,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1935,13 +1947,13 @@ int main (void)
dr = ((double (*) (double,double,double,int)) callback_code) (d1,d2,d3,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 38
dr = d_d4i(d1,d2,d3,d4,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1953,13 +1965,13 @@ int main (void)
dr = ((double (*) (double,double,double,double,int)) callback_code) (d1,d2,d3,d4,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 39
dr = d_d7i(d1,d2,d3,d4,d5,d6,d7,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1971,13 +1983,13 @@ int main (void)
dr = ((double (*) (double,double,double,double,double,double,double,int)) callback_code) (d1,d2,d3,d4,d5,d6,d7,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 40
dr = d_d8i(d1,d2,d3,d4,d5,d6,d7,d8,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -1989,13 +2001,13 @@ int main (void)
dr = ((double (*) (double,double,double,double,double,double,double,double,int)) callback_code) (d1,d2,d3,d4,d5,d6,d7,d8,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 41
dr = d_d12i(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2007,13 +2019,13 @@ int main (void)
dr = ((double (*) (double,double,double,double,double,double,double,double,double,double,double,double,int)) callback_code) (d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 42
dr = d_d13i(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,i9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2025,7 +2037,7 @@ int main (void)
dr = ((double (*) (double,double,double,double,double,double,double,double,double,double,double,double,double,int)) callback_code) (d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,i9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
}
@@ -2034,7 +2046,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 43
{
Size1 r = S1_v();
- FPRINTF(out,"->{%c}\n",r.x1);
+ fprintf(out,"->{%c}\n",r.x1);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
ALLOC_CALLBACK();
@@ -2051,7 +2063,7 @@ int main (void)
r = ((Size1 (*) (void)) callback_code) ();
}
FREE_CALLBACK();
- FPRINTF(out,"->{%c}\n",r.x1);
+ fprintf(out,"->{%c}\n",r.x1);
fflush(out);
}
#endif
@@ -2059,7 +2071,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 44
{
Size2 r = S2_v();
- FPRINTF(out,"->{%c%c}\n",r.x1,r.x2);
+ fprintf(out,"->{%c%c}\n",r.x1,r.x2);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
ALLOC_CALLBACK();
@@ -2076,7 +2088,7 @@ int main (void)
r = ((Size2 (*) (void)) callback_code) ();
}
FREE_CALLBACK();
- FPRINTF(out,"->{%c%c}\n",r.x1,r.x2);
+ fprintf(out,"->{%c%c}\n",r.x1,r.x2);
fflush(out);
}
#endif
@@ -2084,7 +2096,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 45
{
Size3 r = S3_v();
- FPRINTF(out,"->{%c%c%c}\n",r.x1,r.x2,r.x3);
+ fprintf(out,"->{%c%c%c}\n",r.x1,r.x2,r.x3);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
ALLOC_CALLBACK();
@@ -2101,7 +2113,7 @@ int main (void)
r = ((Size3 (*) (void)) callback_code) ();
}
FREE_CALLBACK();
- FPRINTF(out,"->{%c%c%c}\n",r.x1,r.x2,r.x3);
+ fprintf(out,"->{%c%c%c}\n",r.x1,r.x2,r.x3);
fflush(out);
}
#endif
@@ -2109,7 +2121,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 46
{
Size4 r = S4_v();
- FPRINTF(out,"->{%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4);
+ fprintf(out,"->{%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
ALLOC_CALLBACK();
@@ -2126,7 +2138,7 @@ int main (void)
r = ((Size4 (*) (void)) callback_code) ();
}
FREE_CALLBACK();
- FPRINTF(out,"->{%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4);
+ fprintf(out,"->{%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4);
fflush(out);
}
#endif
@@ -2134,7 +2146,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 47
{
Size7 r = S7_v();
- FPRINTF(out,"->{%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7);
+ fprintf(out,"->{%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
ALLOC_CALLBACK();
@@ -2151,7 +2163,7 @@ int main (void)
r = ((Size7 (*) (void)) callback_code) ();
}
FREE_CALLBACK();
- FPRINTF(out,"->{%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7);
+ fprintf(out,"->{%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7);
fflush(out);
}
#endif
@@ -2159,7 +2171,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 48
{
Size8 r = S8_v();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
ALLOC_CALLBACK();
@@ -2176,7 +2188,7 @@ int main (void)
r = ((Size8 (*) (void)) callback_code) ();
}
FREE_CALLBACK();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8);
fflush(out);
}
#endif
@@ -2184,7 +2196,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 49
{
Size12 r = S12_v();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
ALLOC_CALLBACK();
@@ -2201,7 +2213,7 @@ int main (void)
r = ((Size12 (*) (void)) callback_code) ();
}
FREE_CALLBACK();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12);
fflush(out);
}
#endif
@@ -2209,7 +2221,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 50
{
Size15 r = S15_v();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
ALLOC_CALLBACK();
@@ -2226,7 +2238,7 @@ int main (void)
r = ((Size15 (*) (void)) callback_code) ();
}
FREE_CALLBACK();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15);
fflush(out);
}
#endif
@@ -2234,7 +2246,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 51
{
Size16 r = S16_v();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15,r.x16);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15,r.x16);
fflush(out);
memset(&r,0,sizeof(r)); clear_traces();
ALLOC_CALLBACK();
@@ -2251,7 +2263,7 @@ int main (void)
r = ((Size16 (*) (void)) callback_code) ();
}
FREE_CALLBACK();
- FPRINTF(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15,r.x16);
+ fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15,r.x16);
fflush(out);
}
#endif
@@ -2270,7 +2282,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 52
Ir = I_III(I1,I2,I3);
- FPRINTF(out,"->{%d}\n",Ir.x);
+ fprintf(out,"->{%d}\n",Ir.x);
fflush(out);
Ir.x = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2288,13 +2300,13 @@ int main (void)
Ir = ((Int (*) (Int,Int,Int)) callback_code) (I1,I2,I3);
}
FREE_CALLBACK();
- FPRINTF(out,"->{%d}\n",Ir.x);
+ fprintf(out,"->{%d}\n",Ir.x);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 53
Cr = C_CdC(C1,d2,C3);
- FPRINTF(out,"->{'%c'}\n",Cr.x);
+ fprintf(out,"->{'%c'}\n",Cr.x);
fflush(out);
Cr.x = '\0'; clear_traces();
ALLOC_CALLBACK();
@@ -2312,13 +2324,13 @@ int main (void)
Cr = ((Char (*) (Char,double,Char)) callback_code) (C1,d2,C3);
}
FREE_CALLBACK();
- FPRINTF(out,"->{'%c'}\n",Cr.x);
+ fprintf(out,"->{'%c'}\n",Cr.x);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 54
Fr = F_Ffd(F1,f2,d3);
- FPRINTF(out,"->{%g}\n",Fr.x);
+ fprintf(out,"->{%g}\n",Fr.x);
fflush(out);
Fr.x = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2336,13 +2348,13 @@ int main (void)
Fr = ((Float (*) (Float,float,double)) callback_code) (F1,f2,d3);
}
FREE_CALLBACK();
- FPRINTF(out,"->{%g}\n",Fr.x);
+ fprintf(out,"->{%g}\n",Fr.x);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 55
Dr = D_fDd(f1,D2,d3);
- FPRINTF(out,"->{%g}\n",Dr.x);
+ fprintf(out,"->{%g}\n",Dr.x);
fflush(out);
Dr.x = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2360,13 +2372,13 @@ int main (void)
Dr = ((Double (*) (float,Double,double)) callback_code) (f1,D2,d3);
}
FREE_CALLBACK();
- FPRINTF(out,"->{%g}\n",Dr.x);
+ fprintf(out,"->{%g}\n",Dr.x);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 56
Dr = D_Dfd(D1,f2,d3);
- FPRINTF(out,"->{%g}\n",Dr.x);
+ fprintf(out,"->{%g}\n",Dr.x);
fflush(out);
Dr.x = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2384,13 +2396,13 @@ int main (void)
Dr = ((Double (*) (Double,float,double)) callback_code) (D1,f2,d3);
}
FREE_CALLBACK();
- FPRINTF(out,"->{%g}\n",Dr.x);
+ fprintf(out,"->{%g}\n",Dr.x);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 57
Jr = J_JiJ(J1,i2,J2);
- FPRINTF(out,"->{%ld,%ld}\n",Jr.l1,Jr.l2);
+ fprintf(out,"->{%ld,%ld}\n",Jr.l1,Jr.l2);
fflush(out);
Jr.l1 = Jr.l2 = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2408,14 +2420,14 @@ int main (void)
Jr = ((J (*) (J,int,J)) callback_code) (J1,i2,J2);
}
FREE_CALLBACK();
- FPRINTF(out,"->{%ld,%ld}\n",Jr.l1,Jr.l2);
+ fprintf(out,"->{%ld,%ld}\n",Jr.l1,Jr.l2);
fflush(out);
#endif
#ifndef SKIP_EXTRA_STRUCTS
#if (!defined(DGTEST)) || DGTEST == 58
Tr = T_TcT(T1,' ',T2);
- FPRINTF(out,"->{\"%c%c%c\"}\n",Tr.c[0],Tr.c[1],Tr.c[2]);
+ fprintf(out,"->{\"%c%c%c\"}\n",Tr.c[0],Tr.c[1],Tr.c[2]);
fflush(out);
Tr.c[0] = Tr.c[1] = Tr.c[2] = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2433,14 +2445,14 @@ int main (void)
Tr = ((T (*) (T,char,T)) callback_code) (T1,' ',T2);
}
FREE_CALLBACK();
- FPRINTF(out,"->{\"%c%c%c\"}\n",Tr.c[0],Tr.c[1],Tr.c[2]);
+ fprintf(out,"->{\"%c%c%c\"}\n",Tr.c[0],Tr.c[1],Tr.c[2]);
fflush(out);
#endif
#ifndef SKIP_X
#if (!defined(DGTEST)) || DGTEST == 59
Xr = X_BcdB(B1,c2,d3,B2);
- FPRINTF(out,"->{\"%s\",'%c'}\n",Xr.c,Xr.c1);
+ fprintf(out,"->{\"%s\",'%c'}\n",Xr.c,Xr.c1);
fflush(out);
Xr.c[0]=Xr.c1='\0'; clear_traces();
ALLOC_CALLBACK();
@@ -2458,7 +2470,7 @@ int main (void)
Xr = ((X (*) (B,char,double,B)) callback_code) (B1,c2,d3,B2);
}
FREE_CALLBACK();
- FPRINTF(out,"->{\"%s\",'%c'}\n",Xr.c,Xr.c1);
+ fprintf(out,"->{\"%s\",'%c'}\n",Xr.c,Xr.c1);
fflush(out);
#endif
#endif
@@ -2489,7 +2501,7 @@ int main (void)
#if (!defined(DGTEST)) || DGTEST == 60
lr = l_l0K(K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2501,13 +2513,13 @@ int main (void)
lr = ((long (*) (K,long)) callback_code) (K1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 61
lr = l_l1K(l1,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2519,13 +2531,13 @@ int main (void)
lr = ((long (*) (long,K,long)) callback_code) (l1,K1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 62
lr = l_l2K(l1,l2,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2537,13 +2549,13 @@ int main (void)
lr = ((long (*) (long,long,K,long)) callback_code) (l1,l2,K1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 63
lr = l_l3K(l1,l2,l3,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2555,13 +2567,13 @@ int main (void)
lr = ((long (*) (long,long,long,K,long)) callback_code) (l1,l2,l3,K1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 64
lr = l_l4K(l1,l2,l3,l4,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2573,13 +2585,13 @@ int main (void)
lr = ((long (*) (long,long,long,long,K,long)) callback_code) (l1,l2,l3,l4,K1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 65
lr = l_l5K(l1,l2,l3,l4,l5,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2591,13 +2603,13 @@ int main (void)
lr = ((long (*) (long,long,long,long,long,K,long)) callback_code) (l1,l2,l3,l4,l5,K1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 66
lr = l_l6K(l1,l2,l3,l4,l5,l6,K1,l9);
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
lr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2609,13 +2621,13 @@ int main (void)
lr = ((long (*) (long,long,long,long,long,long,K,long)) callback_code) (l1,l2,l3,l4,l5,l6,K1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%ld\n",lr);
+ fprintf(out,"->%ld\n",lr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 67
fr = f_f17l3L(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,l6,l7,l8,L1);
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
fr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2627,13 +2639,13 @@ int main (void)
fr = ((float (*) (float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,long,long,long,L)) callback_code) (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,l6,l7,l8,L1);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",fr);
+ fprintf(out,"->%g\n",fr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 68
dr = d_d17l3L(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15,d16,d17,l6,l7,l8,L1);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2645,13 +2657,13 @@ int main (void)
dr = ((double (*) (double,double,double,double,double,double,double,double,double,double,double,double,double,double,double,double,double,long,long,long,L)) callback_code) (d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15,d16,d17,l6,l7,l8,L1);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 69
llr = ll_l2ll(l1,l2,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2663,13 +2675,13 @@ int main (void)
llr = ((long long (*) (long,long,long long,long)) callback_code) (l1,l2,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 70
llr = ll_l3ll(l1,l2,l3,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2681,13 +2693,13 @@ int main (void)
llr = ((long long (*) (long,long,long,long long,long)) callback_code) (l1,l2,l3,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 71
llr = ll_l4ll(l1,l2,l3,l4,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2699,13 +2711,13 @@ int main (void)
llr = ((long long (*) (long,long,long,long,long long,long)) callback_code) (l1,l2,l3,l4,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 72
llr = ll_l5ll(l1,l2,l3,l4,l5,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2717,13 +2729,13 @@ int main (void)
llr = ((long long (*) (long,long,long,long,long,long long,long)) callback_code) (l1,l2,l3,l4,l5,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 73
llr = ll_l6ll(l1,l2,l3,l4,l5,l6,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2735,13 +2747,13 @@ int main (void)
llr = ((long long (*) (long,long,long,long,long,long,long long,long)) callback_code) (l1,l2,l3,l4,l5,l6,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 74
llr = ll_l7ll(l1,l2,l3,l4,l5,l6,l7,ll1,l9);
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
llr = 0; clear_traces();
ALLOC_CALLBACK();
@@ -2753,13 +2765,13 @@ int main (void)
llr = ((long long (*) (long,long,long,long,long,long,long,long long,long)) callback_code) (l1,l2,l3,l4,l5,l6,l7,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
+ fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 75
dr = d_l2d(l1,l2,ll1,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2771,13 +2783,13 @@ int main (void)
dr = ((double (*) (long,long,double,long)) callback_code) (l1,l2,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 76
dr = d_l3d(l1,l2,l3,ll1,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2789,13 +2801,13 @@ int main (void)
dr = ((double (*) (long,long,long,double,long)) callback_code) (l1,l2,l3,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 77
dr = d_l4d(l1,l2,l3,l4,ll1,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2807,13 +2819,13 @@ int main (void)
dr = ((double (*) (long,long,long,long,double,long)) callback_code) (l1,l2,l3,l4,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 78
dr = d_l5d(l1,l2,l3,l4,l5,ll1,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2825,13 +2837,13 @@ int main (void)
dr = ((double (*) (long,long,long,long,long,double,long)) callback_code) (l1,l2,l3,l4,l5,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 79
dr = d_l6d(l1,l2,l3,l4,l5,l6,ll1,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2843,13 +2855,13 @@ int main (void)
dr = ((double (*) (long,long,long,long,long,long,double,long)) callback_code) (l1,l2,l3,l4,l5,l6,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
#if (!defined(DGTEST)) || DGTEST == 80
dr = d_l7d(l1,l2,l3,l4,l5,l6,l7,ll1,l9);
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
dr = 0.0; clear_traces();
ALLOC_CALLBACK();
@@ -2861,7 +2873,7 @@ int main (void)
dr = ((double (*) (long,long,long,long,long,long,long,double,long)) callback_code) (l1,l2,l3,l4,l5,l6,l7,ll1,l9);
}
FREE_CALLBACK();
- FPRINTF(out,"->%g\n",dr);
+ fprintf(out,"->%g\n",dr);
fflush(out);
#endif
diff --git a/testsuite/libffi.bhaible/testcases.c b/testsuite/libffi.bhaible/testcases.c
index 4eb32b0..d25ebf4 100644
--- a/testsuite/libffi.bhaible/testcases.c
+++ b/testsuite/libffi.bhaible/testcases.c
@@ -4,7 +4,7 @@
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -105,50 +105,65 @@ Size16 Size16_1={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p'
T T1={{'t','h','e'}},T2={{'f','o','x'}};
X X1={"abcdefghijklmnopqrstuvwxyzABCDEF",'G'}, X2={"123",'9'}, X3={"return-return-return",'R'};
+#if defined(__GNUC__)
+#define __STDCALL__ __attribute__((stdcall))
+#define __THISCALL__ __attribute__((thiscall))
+#define __FASTCALL__ __attribute__((fastcall))
+#define __MSABI__ __attribute__((ms_abi))
+#else
+#define __STDCALL__ __stdcall
+#define __THISCALL__ __thiscall
+#define __FASTCALL__ __fastcall
+#endif
+
+#ifndef ABI_ATTR
+#define ABI_ATTR
+#endif
+
/* void tests */
-void v_v (void)
+void ABI_ATTR v_v (void)
{
fprintf(out,"void f(void):\n");
fflush(out);
}
/* int tests */
-int i_v (void)
+int ABI_ATTR i_v (void)
{
int r=99;
fprintf(out,"int f(void):");
fflush(out);
return r;
}
-int i_i (int a)
+int ABI_ATTR i_i (int a)
{
int r=a+1;
fprintf(out,"int f(int):(%d)",a);
fflush(out);
return r;
}
-int i_i2 (int a, int b)
+int ABI_ATTR i_i2 (int a, int b)
{
int r=a+b;
fprintf(out,"int f(2*int):(%d,%d)",a,b);
fflush(out);
return r;
}
-int i_i4 (int a, int b, int c, int d)
+int ABI_ATTR i_i4 (int a, int b, int c, int d)
{
int r=a+b+c+d;
fprintf(out,"int f(4*int):(%d,%d,%d,%d)",a,b,c,d);
fflush(out);
return r;
}
-int i_i8 (int a, int b, int c, int d, int e, int f, int g, int h)
+int ABI_ATTR i_i8 (int a, int b, int c, int d, int e, int f, int g, int h)
{
int r=a+b+c+d+e+f+g+h;
fprintf(out,"int f(8*int):(%d,%d,%d,%d,%d,%d,%d,%d)",a,b,c,d,e,f,g,h);
fflush(out);
return r;
}
-int i_i16 (int a, int b, int c, int d, int e, int f, int g, int h,
+int ABI_ATTR i_i16 (int a, int b, int c, int d, int e, int f, int g, int h,
int i, int j, int k, int l, int m, int n, int o, int p)
{
int r=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p;
@@ -159,28 +174,28 @@ int i_i16 (int a, int b, int c, int d, int e, int f, int g, int h,
}
/* float tests */
-float f_f (float a)
+float ABI_ATTR f_f (float a)
{
float r=a+1.0f;
fprintf(out,"float f(float):(%g)",a);
fflush(out);
return r;
}
-float f_f2 (float a, float b)
+float ABI_ATTR f_f2 (float a, float b)
{
float r=a+b;
fprintf(out,"float f(2*float):(%g,%g)",a,b);
fflush(out);
return r;
}
-float f_f4 (float a, float b, float c, float d)
+float ABI_ATTR f_f4 (float a, float b, float c, float d)
{
float r=a+b+c+d;
fprintf(out,"float f(4*float):(%g,%g,%g,%g)",a,b,c,d);
fflush(out);
return r;
}
-float f_f8 (float a, float b, float c, float d, float e, float f,
+float ABI_ATTR f_f8 (float a, float b, float c, float d, float e, float f,
float g, float h)
{
float r=a+b+c+d+e+f+g+h;
@@ -188,7 +203,7 @@ float f_f8 (float a, float b, float c, float d, float e, float f,
fflush(out);
return r;
}
-float f_f16 (float a, float b, float c, float d, float e, float f, float g, float h,
+float ABI_ATTR f_f16 (float a, float b, float c, float d, float e, float f, float g, float h,
float i, float j, float k, float l, float m, float n, float o, float p)
{
float r=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p;
@@ -196,7 +211,7 @@ float f_f16 (float a, float b, float c, float d, float e, float f, float g, floa
fflush(out);
return r;
}
-float f_f24 (float a, float b, float c, float d, float e, float f, float g, float h,
+float ABI_ATTR f_f24 (float a, float b, float c, float d, float e, float f, float g, float h,
float i, float j, float k, float l, float m, float n, float o, float p,
float q, float s, float t, float u, float v, float w, float x, float y)
{
@@ -207,28 +222,28 @@ float f_f24 (float a, float b, float c, float d, float e, float f, float g, floa
}
/* double tests */
-double d_d (double a)
+double ABI_ATTR d_d (double a)
{
double r=a+1.0;
fprintf(out,"double f(double):(%g)",a);
fflush(out);
return r;
}
-double d_d2 (double a, double b)
+double ABI_ATTR d_d2 (double a, double b)
{
double r=a+b;
fprintf(out,"double f(2*double):(%g,%g)",a,b);
fflush(out);
return r;
}
-double d_d4 (double a, double b, double c, double d)
+double ABI_ATTR d_d4 (double a, double b, double c, double d)
{
double r=a+b+c+d;
fprintf(out,"double f(4*double):(%g,%g,%g,%g)",a,b,c,d);
fflush(out);
return r;
}
-double d_d8 (double a, double b, double c, double d, double e, double f,
+double ABI_ATTR d_d8 (double a, double b, double c, double d, double e, double f,
double g, double h)
{
double r=a+b+c+d+e+f+g+h;
@@ -236,7 +251,7 @@ double d_d8 (double a, double b, double c, double d, double e, double f,
fflush(out);
return r;
}
-double d_d16 (double a, double b, double c, double d, double e, double f,
+double ABI_ATTR d_d16 (double a, double b, double c, double d, double e, double f,
double g, double h, double i, double j, double k, double l,
double m, double n, double o, double p)
{
@@ -247,7 +262,7 @@ double d_d16 (double a, double b, double c, double d, double e, double f,
}
/* pointer tests */
-void* vp_vpdpcpsp (void* a, double* b, char* c, Int* d)
+void* ABI_ATTR vp_vpdpcpsp (void* a, double* b, char* c, Int* d)
{
void* ret = (char*)b + 1;
fprintf(out,"void* f(void*,double*,char*,Int*):(0x%p,0x%p,0x%p,0x%p)",a,b,c,d);
@@ -256,42 +271,42 @@ void* vp_vpdpcpsp (void* a, double* b, char* c, Int* d)
}
/* mixed number tests */
-uchar uc_ucsil (uchar a, ushort b, uint c, ulong d)
+uchar ABI_ATTR uc_ucsil (uchar a, ushort b, uint c, ulong d)
{
uchar r = (uchar)-1;
fprintf(out,"uchar f(uchar,ushort,uint,ulong):(%u,%u,%u,%lu)",a,b,c,d);
fflush(out);
return r;
}
-double d_iidd (int a, int b, double c, double d)
+double ABI_ATTR d_iidd (int a, int b, double c, double d)
{
double r = a+b+c+d;
fprintf(out,"double f(int,int,double,double):(%d,%d,%g,%g)",a,b,c,d);
fflush(out);
return r;
}
-double d_iiidi (int a, int b, int c, double d, int e)
+double ABI_ATTR d_iiidi (int a, int b, int c, double d, int e)
{
double r = a+b+c+d+e;
fprintf(out,"double f(int,int,int,double,int):(%d,%d,%d,%g,%d)",a,b,c,d,e);
fflush(out);
return r;
}
-double d_idid (int a, double b, int c, double d)
+double ABI_ATTR d_idid (int a, double b, int c, double d)
{
double r = a+b+c+d;
fprintf(out,"double f(int,double,int,double):(%d,%g,%d,%g)",a,b,c,d);
fflush(out);
return r;
}
-double d_fdi (float a, double b, int c)
+double ABI_ATTR d_fdi (float a, double b, int c)
{
double r = a+b+c;
fprintf(out,"double f(float,double,int):(%g,%g,%d)",a,b,c);
fflush(out);
return r;
}
-ushort us_cdcd (char a, double b, char c, double d)
+ushort ABI_ATTR us_cdcd (char a, double b, char c, double d)
{
ushort r = (ushort)(a + b + c + d);
fprintf(out,"ushort f(char,double,char,double):('%c',%g,'%c',%g)",a,b,c,d);
@@ -299,14 +314,14 @@ ushort us_cdcd (char a, double b, char c, double d)
return r;
}
-long long ll_iiilli (int a, int b, int c, long long d, int e)
+long long ABI_ATTR ll_iiilli (int a, int b, int c, long long d, int e)
{
long long r = (long long)(int)a+(long long)(int)b+(long long)(int)c+d+(long long)(int)e;
fprintf(out,"long long f(int,int,int,long long,int):(%d,%d,%d,0x%lx%08lx,%d)",a,b,c,(long)(d>>32),(long)(d&0xffffffff),e);
fflush(out);
return r;
}
-long long ll_flli (float a, long long b, int c)
+long long ABI_ATTR ll_flli (float a, long long b, int c)
{
long long r = (long long)(int)a + b + (long long)c;
fprintf(out,"long long f(float,long long,int):(%g,0x%lx%08lx,0x%lx)",a,(long)(b>>32),(long)(b&0xffffffff),(long)c);
@@ -314,35 +329,35 @@ long long ll_flli (float a, long long b, int c)
return r;
}
-float f_fi (float a, int z)
+float ABI_ATTR f_fi (float a, int z)
{
float r = a+z;
fprintf(out,"float f(float,int):(%g,%d)",a,z);
fflush(out);
return r;
}
-float f_f2i (float a, float b, int z)
+float ABI_ATTR f_f2i (float a, float b, int z)
{
float r = a+b+z;
fprintf(out,"float f(2*float,int):(%g,%g,%d)",a,b,z);
fflush(out);
return r;
}
-float f_f3i (float a, float b, float c, int z)
+float ABI_ATTR f_f3i (float a, float b, float c, int z)
{
float r = a+b+c+z;
fprintf(out,"float f(3*float,int):(%g,%g,%g,%d)",a,b,c,z);
fflush(out);
return r;
}
-float f_f4i (float a, float b, float c, float d, int z)
+float ABI_ATTR f_f4i (float a, float b, float c, float d, int z)
{
float r = a+b+c+d+z;
fprintf(out,"float f(4*float,int):(%g,%g,%g,%g,%d)",a,b,c,d,z);
fflush(out);
return r;
}
-float f_f7i (float a, float b, float c, float d, float e, float f, float g,
+float ABI_ATTR f_f7i (float a, float b, float c, float d, float e, float f, float g,
int z)
{
float r = a+b+c+d+e+f+g+z;
@@ -350,7 +365,7 @@ float f_f7i (float a, float b, float c, float d, float e, float f, float g,
fflush(out);
return r;
}
-float f_f8i (float a, float b, float c, float d, float e, float f, float g,
+float ABI_ATTR f_f8i (float a, float b, float c, float d, float e, float f, float g,
float h, int z)
{
float r = a+b+c+d+e+f+g+h+z;
@@ -358,7 +373,7 @@ float f_f8i (float a, float b, float c, float d, float e, float f, float g,
fflush(out);
return r;
}
-float f_f12i (float a, float b, float c, float d, float e, float f, float g,
+float ABI_ATTR f_f12i (float a, float b, float c, float d, float e, float f, float g,
float h, float i, float j, float k, float l, int z)
{
float r = a+b+c+d+e+f+g+h+i+j+k+l+z;
@@ -366,7 +381,7 @@ float f_f12i (float a, float b, float c, float d, float e, float f, float g,
fflush(out);
return r;
}
-float f_f13i (float a, float b, float c, float d, float e, float f, float g,
+float ABI_ATTR f_f13i (float a, float b, float c, float d, float e, float f, float g,
float h, float i, float j, float k, float l, float m, int z)
{
float r = a+b+c+d+e+f+g+h+i+j+k+l+m+z;
@@ -375,35 +390,35 @@ float f_f13i (float a, float b, float c, float d, float e, float f, float g,
return r;
}
-double d_di (double a, int z)
+double ABI_ATTR d_di (double a, int z)
{
double r = a+z;
fprintf(out,"double f(double,int):(%g,%d)",a,z);
fflush(out);
return r;
}
-double d_d2i (double a, double b, int z)
+double ABI_ATTR d_d2i (double a, double b, int z)
{
double r = a+b+z;
fprintf(out,"double f(2*double,int):(%g,%g,%d)",a,b,z);
fflush(out);
return r;
}
-double d_d3i (double a, double b, double c, int z)
+double ABI_ATTR d_d3i (double a, double b, double c, int z)
{
double r = a+b+c+z;
fprintf(out,"double f(3*double,int):(%g,%g,%g,%d)",a,b,c,z);
fflush(out);
return r;
}
-double d_d4i (double a, double b, double c, double d, int z)
+double ABI_ATTR d_d4i (double a, double b, double c, double d, int z)
{
double r = a+b+c+d+z;
fprintf(out,"double f(4*double,int):(%g,%g,%g,%g,%d)",a,b,c,d,z);
fflush(out);
return r;
}
-double d_d7i (double a, double b, double c, double d, double e, double f,
+double ABI_ATTR d_d7i (double a, double b, double c, double d, double e, double f,
double g, int z)
{
double r = a+b+c+d+e+f+g+z;
@@ -411,7 +426,7 @@ double d_d7i (double a, double b, double c, double d, double e, double f,
fflush(out);
return r;
}
-double d_d8i (double a, double b, double c, double d, double e, double f,
+double ABI_ATTR d_d8i (double a, double b, double c, double d, double e, double f,
double g, double h, int z)
{
double r = a+b+c+d+e+f+g+h+z;
@@ -419,7 +434,7 @@ double d_d8i (double a, double b, double c, double d, double e, double f,
fflush(out);
return r;
}
-double d_d12i (double a, double b, double c, double d, double e, double f,
+double ABI_ATTR d_d12i (double a, double b, double c, double d, double e, double f,
double g, double h, double i, double j, double k, double l,
int z)
{
@@ -428,7 +443,7 @@ double d_d12i (double a, double b, double c, double d, double e, double f,
fflush(out);
return r;
}
-double d_d13i (double a, double b, double c, double d, double e, double f,
+double ABI_ATTR d_d13i (double a, double b, double c, double d, double e, double f,
double g, double h, double i, double j, double k, double l,
double m, int z)
{
@@ -439,55 +454,55 @@ double d_d13i (double a, double b, double c, double d, double e, double f,
}
/* small structure return tests */
-Size1 S1_v (void)
+Size1 ABI_ATTR S1_v (void)
{
fprintf(out,"Size1 f(void):");
fflush(out);
return Size1_1;
}
-Size2 S2_v (void)
+Size2 ABI_ATTR S2_v (void)
{
fprintf(out,"Size2 f(void):");
fflush(out);
return Size2_1;
}
-Size3 S3_v (void)
+Size3 ABI_ATTR S3_v (void)
{
fprintf(out,"Size3 f(void):");
fflush(out);
return Size3_1;
}
-Size4 S4_v (void)
+Size4 ABI_ATTR S4_v (void)
{
fprintf(out,"Size4 f(void):");
fflush(out);
return Size4_1;
}
-Size7 S7_v (void)
+Size7 ABI_ATTR S7_v (void)
{
fprintf(out,"Size7 f(void):");
fflush(out);
return Size7_1;
}
-Size8 S8_v (void)
+Size8 ABI_ATTR S8_v (void)
{
fprintf(out,"Size8 f(void):");
fflush(out);
return Size8_1;
}
-Size12 S12_v (void)
+Size12 ABI_ATTR S12_v (void)
{
fprintf(out,"Size12 f(void):");
fflush(out);
return Size12_1;
}
-Size15 S15_v (void)
+Size15 ABI_ATTR S15_v (void)
{
fprintf(out,"Size15 f(void):");
fflush(out);
return Size15_1;
}
-Size16 S16_v (void)
+Size16 ABI_ATTR S16_v (void)
{
fprintf(out,"Size16 f(void):");
fflush(out);
@@ -495,7 +510,7 @@ Size16 S16_v (void)
}
/* structure tests */
-Int I_III (Int a, Int b, Int c)
+Int ABI_ATTR I_III (Int a, Int b, Int c)
{
Int r;
r.x = a.x + b.x + c.x;
@@ -503,7 +518,7 @@ Int I_III (Int a, Int b, Int c)
fflush(out);
return r;
}
-Char C_CdC (Char a, double b, Char c)
+Char ABI_ATTR C_CdC (Char a, double b, Char c)
{
Char r;
r.x = (a.x + c.x)/2;
@@ -511,7 +526,7 @@ Char C_CdC (Char a, double b, Char c)
fflush(out);
return r;
}
-Float F_Ffd (Float a, float b, double c)
+Float ABI_ATTR F_Ffd (Float a, float b, double c)
{
Float r;
r.x = (float) (a.x + b + c);
@@ -519,7 +534,7 @@ Float F_Ffd (Float a, float b, double c)
fflush(out);
return r;
}
-Double D_fDd (float a, Double b, double c)
+Double ABI_ATTR D_fDd (float a, Double b, double c)
{
Double r;
r.x = a + b.x + c;
@@ -527,7 +542,7 @@ Double D_fDd (float a, Double b, double c)
fflush(out);
return r;
}
-Double D_Dfd (Double a, float b, double c)
+Double ABI_ATTR D_Dfd (Double a, float b, double c)
{
Double r;
r.x = a.x + b + c;
@@ -535,7 +550,7 @@ Double D_Dfd (Double a, float b, double c)
fflush(out);
return r;
}
-J J_JiJ (J a, int b, J c)
+J ABI_ATTR J_JiJ (J a, int b, J c)
{
J r;
r.l1 = a.l1+c.l1; r.l2 = a.l2+b+c.l2;
@@ -543,7 +558,7 @@ J J_JiJ (J a, int b, J c)
fflush(out);
return r;
}
-T T_TcT (T a, char b, T c)
+T ABI_ATTR T_TcT (T a, char b, T c)
{
T r;
r.c[0]='b'; r.c[1]=c.c[1]; r.c[2]=c.c[2];
@@ -551,7 +566,7 @@ T T_TcT (T a, char b, T c)
fflush(out);
return r;
}
-X X_BcdB (B a, char b, double c, B d)
+X ABI_ATTR X_BcdB (B a, char b, double c, B d)
{
static X xr={"return val",'R'};
X r;
@@ -568,49 +583,49 @@ X X_BcdB (B a, char b, double c, B d)
and partially on the stack. Different ABIs pass between 4 and 8 arguments
(or none) in general-purpose argument registers. */
-long l_l0K (K b, long c)
+long ABI_ATTR l_l0K (K b, long c)
{
long r = b.l1 + b.l2 + b.l3 + b.l4 + c;
fprintf(out,"long f(K,long):(%ld,%ld,%ld,%ld,%ld)",b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
return r;
}
-long l_l1K (long a1, K b, long c)
+long ABI_ATTR l_l1K (long a1, K b, long c)
{
long r = a1 + b.l1 + b.l2 + b.l3 + b.l4 + c;
fprintf(out,"long f(long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld)",a1,b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
return r;
}
-long l_l2K (long a1, long a2, K b, long c)
+long ABI_ATTR l_l2K (long a1, long a2, K b, long c)
{
long r = a1 + a2 + b.l1 + b.l2 + b.l3 + b.l4 + c;
fprintf(out,"long f(2*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
return r;
}
-long l_l3K (long a1, long a2, long a3, K b, long c)
+long ABI_ATTR l_l3K (long a1, long a2, long a3, K b, long c)
{
long r = a1 + a2 + a3 + b.l1 + b.l2 + b.l3 + b.l4 + c;
fprintf(out,"long f(3*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
return r;
}
-long l_l4K (long a1, long a2, long a3, long a4, K b, long c)
+long ABI_ATTR l_l4K (long a1, long a2, long a3, long a4, K b, long c)
{
long r = a1 + a2 + a3 + a4 + b.l1 + b.l2 + b.l3 + b.l4 + c;
fprintf(out,"long f(4*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
return r;
}
-long l_l5K (long a1, long a2, long a3, long a4, long a5, K b, long c)
+long ABI_ATTR l_l5K (long a1, long a2, long a3, long a4, long a5, K b, long c)
{
long r = a1 + a2 + a3 + a4 + a5 + b.l1 + b.l2 + b.l3 + b.l4 + c;
fprintf(out,"long f(5*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,a5,b.l1,b.l2,b.l3,b.l4,c);
fflush(out);
return r;
}
-long l_l6K (long a1, long a2, long a3, long a4, long a5, long a6, K b, long c)
+long ABI_ATTR l_l6K (long a1, long a2, long a3, long a4, long a5, long a6, K b, long c)
{
long r = a1 + a2 + a3 + a4 + a5 + a6 + b.l1 + b.l2 + b.l3 + b.l4 + c;
fprintf(out,"long f(6*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,a5,a6,b.l1,b.l2,b.l3,b.l4,c);
@@ -620,7 +635,7 @@ long l_l6K (long a1, long a2, long a3, long a4, long a5, long a6, K b, long c)
/* These tests is crafted on the knowledge that for all known ABIs:
* 17 > number of floating-point argument registers,
* 3 < number of general-purpose argument registers < 3 + 6. */
-float f_f17l3L (float a, float b, float c, float d, float e, float f, float g,
+float ABI_ATTR f_f17l3L (float a, float b, float c, float d, float e, float f, float g,
float h, float i, float j, float k, float l, float m, float n,
float o, float p, float q,
long s, long t, long u, L z)
@@ -630,7 +645,7 @@ float f_f17l3L (float a, float b, float c, float d, float e, float f, float g,
fflush(out);
return r;
}
-double d_d17l3L (double a, double b, double c, double d, double e, double f,
+double ABI_ATTR d_d17l3L (double a, double b, double c, double d, double e, double f,
double g, double h, double i, double j, double k, double l,
double m, double n, double o, double p, double q,
long s, long t, long u, L z)
@@ -641,42 +656,42 @@ double d_d17l3L (double a, double b, double c, double d, double e, double f,
return r;
}
-long long ll_l2ll (long a1, long a2, long long b, long c)
+long long ABI_ATTR ll_l2ll (long a1, long a2, long long b, long c)
{
long long r = (long long) (a1 + a2) + b + c;
fprintf(out,"long long f(2*long,long long,long):(%ld,%ld,0x%lx%08lx,%ld)",a1,a2,(long)(b>>32),(long)(b&0xffffffff),c);
fflush(out);
return r;
}
-long long ll_l3ll (long a1, long a2, long a3, long long b, long c)
+long long ABI_ATTR ll_l3ll (long a1, long a2, long a3, long long b, long c)
{
long long r = (long long) (a1 + a2 + a3) + b + c;
fprintf(out,"long long f(3*long,long long,long):(%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,(long)(b>>32),(long)(b&0xffffffff),c);
fflush(out);
return r;
}
-long long ll_l4ll (long a1, long a2, long a3, long a4, long long b, long c)
+long long ABI_ATTR ll_l4ll (long a1, long a2, long a3, long a4, long long b, long c)
{
long long r = (long long) (a1 + a2 + a3 + a4) + b + c;
fprintf(out,"long long f(4*long,long long,long):(%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,(long)(b>>32),(long)(b&0xffffffff),c);
fflush(out);
return r;
}
-long long ll_l5ll (long a1, long a2, long a3, long a4, long a5, long long b, long c)
+long long ABI_ATTR ll_l5ll (long a1, long a2, long a3, long a4, long a5, long long b, long c)
{
long long r = (long long) (a1 + a2 + a3 + a4 + a5) + b + c;
fprintf(out,"long long f(5*long,long long,long):(%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,(long)(b>>32),(long)(b&0xffffffff),c);
fflush(out);
return r;
}
-long long ll_l6ll (long a1, long a2, long a3, long a4, long a5, long a6, long long b, long c)
+long long ABI_ATTR ll_l6ll (long a1, long a2, long a3, long a4, long a5, long a6, long long b, long c)
{
long long r = (long long) (a1 + a2 + a3 + a4 + a5 + a6) + b + c;
fprintf(out,"long long f(6*long,long long,long):(%ld,%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,a6,(long)(b>>32),(long)(b&0xffffffff),c);
fflush(out);
return r;
}
-long long ll_l7ll (long a1, long a2, long a3, long a4, long a5, long a6, long a7, long long b, long c)
+long long ABI_ATTR ll_l7ll (long a1, long a2, long a3, long a4, long a5, long a6, long a7, long long b, long c)
{
long long r = (long long) (a1 + a2 + a3 + a4 + a5 + a6 + a7) + b + c;
fprintf(out,"long long f(7*long,long long,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,a6,a7,(long)(b>>32),(long)(b&0xffffffff),c);
@@ -684,42 +699,42 @@ long long ll_l7ll (long a1, long a2, long a3, long a4, long a5, long a6, long a7
return r;
}
-double d_l2d (long a1, long a2, double b, long c)
+double ABI_ATTR d_l2d (long a1, long a2, double b, long c)
{
double r = (double) (a1 + a2) + b + c;
fprintf(out,"double f(2*long,double,long):(%ld,%ld,%g,%ld)",a1,a2,b,c);
fflush(out);
return r;
}
-double d_l3d (long a1, long a2, long a3, double b, long c)
+double ABI_ATTR d_l3d (long a1, long a2, long a3, double b, long c)
{
double r = (double) (a1 + a2 + a3) + b + c;
fprintf(out,"double f(3*long,double,long):(%ld,%ld,%ld,%g,%ld)",a1,a2,a3,b,c);
fflush(out);
return r;
}
-double d_l4d (long a1, long a2, long a3, long a4, double b, long c)
+double ABI_ATTR d_l4d (long a1, long a2, long a3, long a4, double b, long c)
{
double r = (double) (a1 + a2 + a3 + a4) + b + c;
fprintf(out,"double f(4*long,double,long):(%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,b,c);
fflush(out);
return r;
}
-double d_l5d (long a1, long a2, long a3, long a4, long a5, double b, long c)
+double ABI_ATTR d_l5d (long a1, long a2, long a3, long a4, long a5, double b, long c)
{
double r = (double) (a1 + a2 + a3 + a4 + a5) + b + c;
fprintf(out,"double f(5*long,double,long):(%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,b,c);
fflush(out);
return r;
}
-double d_l6d (long a1, long a2, long a3, long a4, long a5, long a6, double b, long c)
+double ABI_ATTR d_l6d (long a1, long a2, long a3, long a4, long a5, long a6, double b, long c)
{
double r = (double) (a1 + a2 + a3 + a4 + a5 + a6) + b + c;
fprintf(out,"double f(6*long,double,long):(%ld,%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,a6,b,c);
fflush(out);
return r;
}
-double d_l7d (long a1, long a2, long a3, long a4, long a5, long a6, long a7, double b, long c)
+double ABI_ATTR d_l7d (long a1, long a2, long a3, long a4, long a5, long a6, long a7, double b, long c)
{
double r = (double) (a1 + a2 + a3 + a4 + a5 + a6 + a7) + b + c;
fprintf(out,"double f(7*long,double,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,a6,a7,b,c);
diff --git a/testsuite/libffi.call/align_stdcall.c b/testsuite/libffi.call/align_stdcall.c
new file mode 100644
index 0000000..5e5cb86
--- /dev/null
+++ b/testsuite/libffi.call/align_stdcall.c
@@ -0,0 +1,46 @@
+/* Area: ffi_call
+ Purpose: Check for proper argument alignment.
+ Limitations: none.
+ PR: none.
+ Originator: <twalljava@java.net> (from many_win32.c) */
+
+/* { dg-do run } */
+
+#include "ffitest.h"
+
+static float ABI_ATTR align_arguments(int i1,
+ double f2,
+ int i3,
+ double f4)
+{
+ return i1+f2+i3+f4;
+}
+
+int main(void)
+{
+ ffi_cif cif;
+ ffi_type *args[4] = {
+ &ffi_type_sint,
+ &ffi_type_double,
+ &ffi_type_sint,
+ &ffi_type_double
+ };
+ double fa[2] = {1,2};
+ int ia[2] = {1,2};
+ void *values[4] = {&ia[0], &fa[0], &ia[1], &fa[1]};
+ float f, ff;
+
+ /* Initialize the cif */
+ CHECK(ffi_prep_cif(&cif, ABI_NUM, 4,
+ &ffi_type_float, args) == FFI_OK);
+
+ ff = align_arguments(ia[0], fa[0], ia[1], fa[1]);;
+
+ ffi_call(&cif, FFI_FN(align_arguments), &f, values);
+
+ if (f == ff)
+ printf("align arguments tests ok!\n");
+ else
+ CHECK(0);
+ exit(0);
+}
diff --git a/testsuite/libffi.call/ffitest.h b/testsuite/libffi.call/ffitest.h
index 203d948..cfce1ad 100644
--- a/testsuite/libffi.call/ffitest.h
+++ b/testsuite/libffi.call/ffitest.h
@@ -64,7 +64,7 @@
#endif
/* MinGW kludge. */
-#ifdef _WIN64
+#if defined(_WIN64) | defined(_WIN32)
#define PRIdLL "I64d"
#define PRIuLL "I64u"
#else