Skip to content

Commit 6b2000b

Browse files
committed
add &0x03 before makeint(entry2), to avoid creating bignum
1 parent 1b1f07b commit 6b2000b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

lisp/c/loadelf.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ register context *ctx;
113113
addr= addr>>2;
114114
mod->c.ldmod.entry=makeint(addr);
115115
#if ARM
116-
mod->c.ldmod.entry2=makeint((eusinteger_t)initfunc);
116+
mod->c.ldmod.entry2=makeint(((eusinteger_t)initfunc)&0x3);
117117
#endif
118118
mod->c.ldmod.subrtype=SUBR_ENTRY;
119119
(*initfunc)(ctx,1, &mod); }
@@ -180,7 +180,7 @@ pointer initnames;
180180
mod->c.ldmod.codevec=makeint(0);
181181
mod->c.ldmod.entry=makeint(addr);
182182
#if ARM
183-
mod->c.ldmod.entry2=makeint((eusinteger_t)initfunc);
183+
mod->c.ldmod.entry2=makeint(((eusinteger_t)initfunc)&0x3);
184184
#endif
185185
mod->c.ldmod.subrtype=SUBR_FUNCTION;
186186
p=cons(ctx,mod, NIL);
@@ -231,7 +231,7 @@ pointer *argv;
231231
mod->c.ldmod.codevec=makeint(0);
232232
mod->c.ldmod.entry=makeint(addr);
233233
#if ARM
234-
mod->c.ldmod.entry2=makeint((eusinteger_t)initfunc);
234+
mod->c.ldmod.entry2=makeint(((eusinteger_t)initfunc)&0x3);
235235
#endif
236236
mod->c.ldmod.subrtype=SUBR_FUNCTION;
237237
p=cons(ctx,mod, NIL);
@@ -409,7 +409,7 @@ pointer *argv;
409409
mod->c.ldmod.codevec=makeint(0);
410410
mod->c.ldmod.entry=makeint(addr);
411411
#if ARM
412-
mod->c.ldmod.entry2=makeint((eusinteger_t)initfunc);
412+
mod->c.ldmod.entry2=makeint(((eusinteger_t)initfunc)&0x3);
413413
#endif
414414
mod->c.ldmod.subrtype=SUBR_FUNCTION;
415415
(*initfunc)(ctx, 1, &mod); }

lisp/c/makes.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ pointer (*f)();
292292
fentaddr= (eusinteger_t)f>>2;
293293
cd->c.code.entry=makeint(fentaddr);
294294
#if ARM
295-
cd->c.code.entry2=makeint((eusinteger_t)f);
295+
cd->c.code.entry2=makeint(((eusinteger_t)f)&0x3);
296296
#endif
297297
return(cd);}
298298

@@ -513,7 +513,7 @@ pointer (*f)();
513513
clo->c.clo.subrtype=SUBR_FUNCTION;
514514
clo->c.clo.entry=makeint((eusinteger_t)f>>2);
515515
#if ARM
516-
clo->c.clo.entry2=makeint((eusinteger_t)f);
516+
clo->c.clo.entry2=makeint(((eusinteger_t)f)&0x3);
517517
#endif
518518
clo->c.clo.env0=e0;
519519
clo->c.clo.env1=e1; /*makeint((int)e1>>2);*/

lisp/xwindow/xforeign.c.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ char *xentry;
443443
fc->c.fcode.paramtypes=NIL;
444444
fc->c.fcode.resulttype=K_INTEGER;
445445
fc->c.fcode.entry=makeint(entry>>2);
446-
fc->c.fcode.entry2=makeint(entry); /* kanehiro's patch 2000.12.13 */
446+
fc->c.fcode.entry2=makeint(entry) /* kanehiro's patch 2000.12.13 */
447447
/*
448448
printf("x: %s at %x, %x\n", xsym->c.sym.pname->c.str.chars,
449449
entry, fc->c.fcode.entry);

0 commit comments

Comments
 (0)