This commit is contained in:
Justin Ethier 2020-06-29 19:05:46 -04:00
parent 900b2a99d0
commit 6549bc0213
2 changed files with 10 additions and 2 deletions

View file

@ -180,6 +180,12 @@ hashset.o : hashset.c $(HEADERS)
dispatch.o : dispatch.c $(HEADERS) dispatch.o : dispatch.c $(HEADERS)
$(CCOMP) -c $< -o $@ $(CCOMP) -c $< -o $@
dispatch-hack.o : dispatch-hack.c $(HEADERS)
$(CCOMP) -c $< -o $@
apply-hack.x86-64.o: apply-hack.x86-64.S
$(CCOMP) -c $< -o $@
gc.o : gc.c $(HEADERS) gc.o : gc.c $(HEADERS)
$(CCOMP) -std=gnu99 -c $< -o $@ $(CCOMP) -std=gnu99 -c $< -o $@
@ -203,7 +209,7 @@ runtime.o : runtime.c $(HEADERS)
-DCYC_PLATFORM=\"$(PLATFORM)\" \ -DCYC_PLATFORM=\"$(PLATFORM)\" \
$< -o $@ $< -o $@
libcyclone.a : runtime.o gc.o dispatch.o mstreams.o hashset.o libcyclone.a : runtime.o gc.o dispatch-hack.o apply-hack.x86-64.o mstreams.o hashset.o
$(CREATE_LIBRARY_COMMAND) $(CREATE_LIBRARY_FLAGS) $@ $& $(CREATE_LIBRARY_COMMAND) $(CREATE_LIBRARY_FLAGS) $@ $&
$(RANLIB_COMMAND) $(RANLIB_COMMAND)
# Instructions from: http://www.adp-gmbh.ch/cpp/gcc/create_lib.html # Instructions from: http://www.adp-gmbh.ch/cpp/gcc/create_lib.html

View file

@ -58,8 +58,10 @@ extern void _C_do_apply_hack(void *proc, object args, int count);
void do_dispatch(void *data, int argc, function_type func, object clo, object *b) { void do_dispatch(void *data, int argc, function_type func, object clo, object *b) {
int *buf[argc + 3]; int *buf;
void *proc; void *proc;
buf = alloca((argc + 6) * sizeof(object));
buf = (void *)((((unsigned int)buf) + 15) & ~15); // JAE - ????
buf[0] = data; buf[0] = data;
buf[1] = argc + 3; buf[1] = argc + 3;
buf[2] = clo; buf[2] = clo;