Skip to content

Commit cf39870

Browse files
committed
arm/32bit : use assember for (armhf), use normal ifunc call for (armel)
1 parent 643ec7e commit cf39870

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lisp/c/eval.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ pointer args[];
981981
}
982982
}
983983

984-
#elif defined(ARM) /* not (defined(x86_64) || defined(aarch64)) */
984+
#elif defined(ARM) && defined(__ARM_ARCH_7A__) /* not (defined(x86_64) || defined(aarch64)) */
985985

986986
extern int exec_function_i(void (*)(), int *, int *, int, int *);
987987
extern int exec_function_f(void (*)(), int *, int *, int, int *);
@@ -1242,8 +1242,7 @@ eusinteger_t (*ifunc)(); /* ???? */
12421242
pointer code;
12431243
int n;
12441244
pointer args[];
1245-
{ double (*ffunc)();
1246-
pointer paramtypes=code->c.fcode.paramtypes;
1245+
{ pointer paramtypes=code->c.fcode.paramtypes;
12471246
pointer resulttype=code->c.fcode.resulttype;
12481247
pointer p,lisparg;
12491248
eusinteger_t cargv[100];
@@ -1265,7 +1264,6 @@ pointer args[];
12651264
ifunc = (eusinteger_t (*)())((((int)ifunc)&0xffff0000) | (intval(code->c.fcode.entry2)&0x0000ffff)); /* kanehiro's patch 2000.12.13 */
12661265
#endif
12671266
}
1268-
ffunc=(double (*)())ifunc;
12691267
while (iscons(paramtypes)) {
12701268
p=ccar(paramtypes); paramtypes=ccdr(paramtypes);
12711269
lisparg=args[j++];
@@ -1306,11 +1304,15 @@ pointer args[];
13061304
else cargv[i++]=(eusinteger_t)(lisparg->c.obj.iv);}
13071305
/**/
13081306
if (resulttype==K_FLOAT || resulttype==K_FLOAT32) {
1307+
union {
1308+
eusfloat_t f;
1309+
eusinteger_t i;
1310+
} n;
13091311
if (i<=8)
1310-
f=(*ffunc)(cargv[0],cargv[1],cargv[2],cargv[3],
1312+
n.i=(*ifunc)(cargv[0],cargv[1],cargv[2],cargv[3],
13111313
cargv[4],cargv[5],cargv[6],cargv[7]);
13121314
else if (i<=32)
1313-
f=(*ffunc)(cargv[0],cargv[1],cargv[2],cargv[3],
1315+
n.i=(*ifunc)(cargv[0],cargv[1],cargv[2],cargv[3],
13141316
cargv[4],cargv[5],cargv[6],cargv[7],
13151317
cargv[8],cargv[9],cargv[10],cargv[11],
13161318
cargv[12],cargv[13],cargv[14],cargv[15],
@@ -1320,7 +1322,7 @@ pointer args[];
13201322
cargv[28],cargv[29],cargv[30],cargv[31]);
13211323
#if (sun3 || sun4 || mips || alpha)
13221324
else if (i>32)
1323-
f=(*ffunc)(cargv[0],cargv[1],cargv[2],cargv[3],
1325+
n.i=(*ifunc)(cargv[0],cargv[1],cargv[2],cargv[3],
13241326
cargv[4],cargv[5],cargv[6],cargv[7],
13251327
cargv[8],cargv[9],cargv[10],cargv[11],
13261328
cargv[12],cargv[13],cargv[14],cargv[15],
@@ -1341,7 +1343,7 @@ pointer args[];
13411343
cargv[72],cargv[73],cargv[74],cargv[75],
13421344
cargv[76],cargv[77],cargv[78],cargv[79]);
13431345
#endif
1344-
return(makeflt(f));}
1346+
return(makeflt(n.f));}
13451347
else {
13461348
if (i<8)
13471349
i=(*ifunc)(cargv[0],cargv[1],cargv[2],cargv[3],

0 commit comments

Comments
 (0)