30 #if vax || sun4 || news || mips || alpha || Linux 54 #define pisforeignpod(p) (foreignpodcp.cix<=((p)->cix) && \ 55 ((p)->cix)<=foreignpodcp.sub) 56 #define isforeignpod(p) (ispointer(p) && pisforeignpod(p)) 58 #if (defined x86_64) || (defined aarch64) 90 int icount = 0, fcount = 0, vcount = 0;
95 printf(
"calleus : fsym.cix = %lX (%lX,%lX)\n", fsym->
cix, fsym, &(fsym->
cix));
101 printf(
"calleus : fsym.paramtypes = %lX (%lX,%lX)\n",
102 fs->
paramtypes, (
long *)fs, &(fs->paramtypes));
103 printf(
"calleus : fsym.resulttype = %lX (%lX,%lX)\n",
104 fs->resulttype, (
long *)fs, &(fs->resulttype));
107 param=fs->paramtypes;
108 resulttype=fs->resulttype;
109 while (islist(param)) {
110 p=ccar(param); param=ccdr(param);
112 if(icount < 6) c = iargv[icount++];
else c = vargv[vcount++];
115 }
else if (p==K_INT32) {
116 if(icount < 6) c = iargv[icount++];
else c = vargv[vcount++];
117 vpush(
makeint(c & 0x00000000FFFFFFFF));
120 if(fcount < 8) c = fargv[fcount++];
else c = vargv[vcount++];
124 if(fcount < 8) c = fargv[fcount++];
else c = vargv[vcount++];
125 nu.
ival = c & 0x00000000FFFFFFFF;
128 }
else if (islist(p)) {
132 if(icount < 6) c = iargv[icount++];
else c = vargv[vcount++];
133 vpush(
makestring((
char *)c,strlen((
char *)c)));
136 if(icount < 6) c = iargv[icount++];
else c = vargv[vcount++];
140 if(icount < 6) c = iargv[icount++];
else c = vargv[vcount++];
148 printf(
"argc = %d\n", argc);
149 for(
int i=0;i<
argc;i++) {
150 printf(
"argv[%d] = %lX\n", argv[i]);
156 else if (resulttype==
K_FLOAT) {
159 printf(
"calleus float-result=%f\n",f);
166 }
else return(
intval(result));
173 register int a2, a3, a4, a5, a6, a7, a8;
190 while (islist(param)) {
191 p=ccar(param); param=ccdr(param);
194 dp=(
double *)&cargv[i]; f= *dp;
196 else if (islist(p)) {
200 vpush(
makestring((
char *)cargv[i],strlen((
char *)cargv[i]))); i++;}
206 #if sun3 || (!alpha && system5) || apollo || sanyo 209 c=cargv[i++]-2*
sizeof(
pointer);
217 else if (resulttype==
K_FLOAT) {
220 printf(
"calleus float-result=%f\n",f);
222 else return(
intval(result)); }
235 3,
"PODCODE",
"PARAMTYPES",
"RESULTTYPE");
236 C_FOREIGN=Spevalof(FOREIGN);
239 pointer_update(Spevalof(
PACKAGE), pkgsave);
context * euscontexts[MAXTHREAD]
pointer ufuncall(context *, pointer, pointer, pointer, struct bindframe *, int)
eusinteger_t calleus(pointer fsym, cargv)
void foreign(context *ctx, pointer mod)
pointer defvar(context *, char *, pointer, pointer)
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
pointer makestring(char *, int)
pointer basicclass(char *name,...) pointer basicclass(va_alist) va_dcl