ecl/src/cmp
Marius Gerbershagen 18cb1b3552 fix for calling conventions treating fixed and variadic arguments differently
Previously, we assumed that the fixed and variadic arguments of a
variadic function were passed to the function in the same way. The
arm64 calling convention used by iOS breaks this assumption by passing
fixed arguments in registers or on the stack, depending on the
position, while variadic arguments are always passed on the stack.

Solving this problem while still allowing function redefinition at
runtime requires introducing additional dispatch functions. These
dispatch functions take no fixed arguments and pass all their
arguments to the actual function. This dispatch is enabled by passing
-DECL_C_COMPATIBLE_VARIADIC_DISPATCH to the C compiler.

This problem was originally identified and a solution provided by
thewhimer@gmail.com. This commit based on his work with minor
improvements.
2019-12-08 10:26:52 +01:00
..
cmparray.lsp cmp: some cleanup changes 2018-02-10 17:51:53 +01:00
cmpbind.lsp cmp: all baboon have now error message 2018-02-05 18:11:35 +01:00
cmpblock.lsp cmp: add blocks around ecl_frs_push in generated C code 2018-03-27 18:49:23 +02:00
cmpc-inliner.lsp long-float: remove conditionalization 2019-05-24 21:04:59 +00:00
cmpc-machine.lsp cmp: prevent inline information from getting lost while compiling ECL itself 2019-11-17 19:58:53 +01:00
cmpc-wt.lsp newcmp: remove obsolete newcmp package 2016-03-11 16:06:45 +01:00
cmpcall.lsp fix for calling conventions treating fixed and variadic arguments differently 2019-12-08 10:26:52 +01:00
cmpcatch.lsp Revert "cmp: execute cleanup forms of unwind-protect with interrupts disabled" 2018-09-04 17:53:30 +02:00
cmpcbk.lsp complex float: add compiler optimizations and ffi definitions 2019-05-15 16:35:16 +02:00
cmpclos.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
cmpct.lsp cmp: prevent inline information from getting lost while compiling ECL itself 2019-11-17 19:58:53 +01:00
cmpdefs.lsp Makefile.in: be explicit with directories 2016-10-21 10:06:49 +02:00
cmpenv-api.lsp cmp: fix compile call for closures 2018-06-23 21:37:26 +02:00
cmpenv-declaim.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
cmpenv-declare.lsp cmp: c1body: do not error when unknown declaration is encountered 2019-05-25 09:56:08 +02:00
cmpenv-fun.lsp cmp: make behaviour of declaim inline more sensible 2018-10-28 16:32:55 +01:00
cmpenv-proclaim.lsp cmp: make behaviour of declaim inline more sensible 2018-10-28 16:32:55 +01:00
cmpeval.lsp constant folding: fix regression for single and multiple values 2019-05-05 10:38:02 +02:00
cmpexit.lsp complex float: add compiler optimizations and ffi definitions 2019-05-15 16:35:16 +02:00
cmpffi.lsp cmpffi: produce-inline-loc: do not return uninitialized variable 2019-05-15 16:35:16 +02:00
cmpflet.lsp cosmetic: indentation fixes and some comments 2018-06-23 21:37:26 +02:00
cmpform.lsp cmp: all baboon have now error message 2018-02-05 18:11:35 +01:00
cmpfun.lsp boole: move compiler macro to cmpnum 2017-04-28 11:13:05 +02:00
cmpglobals.lsp cmp: prevent inline information from getting lost while compiling ECL itself 2019-11-17 19:58:53 +01:00
cmpif.lsp cmp: add a few c-local declarations 2017-04-28 11:15:21 +02:00
cmpinline.lsp fix #409: order of evaluation of values forms 2017-12-29 16:58:27 +01:00
cmplam.lsp fix for calling conventions treating fixed and variadic arguments differently 2019-12-08 10:26:52 +01:00
cmplet.lsp cmp: refactor: be explicit on declaring specials. 2017-04-28 11:43:09 +02:00
cmploc.lsp long-float: remove conditionalization 2019-05-24 21:04:59 +00:00
cmpmac.lsp cmp: add a few c-local declarations 2017-04-28 11:15:21 +02:00
cmpmain.lsp cmp: fix linker-cc for msvc 2019-08-20 19:52:25 +02:00
cmpmap.lsp mapcar-expand: fix-typo 2017-08-10 20:32:02 +02:00
cmpmulti.lsp cmp: remove unused interface *linking-calls* 2019-07-19 14:30:53 +02:00
cmpname.lsp cleanup: cmp: compute-init-name: get rid of wrapping code 2017-07-21 18:15:28 +02:00
cmpnum.lsp cmp: fix type propagation for / with one argument 2019-08-06 19:38:47 +02:00
cmpopt-bits.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
cmpopt-clos.lsp cmp: refactor: cosmetic cmpopt-clos fixes 2017-04-28 11:24:47 +02:00
cmpopt-cons.lsp cmp: refactor: qualify package of *-prop interface 2017-04-28 11:48:15 +02:00
cmpopt-constant.lsp cmp: refactor: qualify package of *-prop interface 2017-04-28 11:48:15 +02:00
cmpopt-printer.lsp cmp: add a few c-local declarations 2017-04-28 11:15:21 +02:00
cmpopt-sequence.lsp compiler: fix compiler-macro for `FIND' 2015-12-18 10:35:11 +01:00
cmpopt-type.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
cmpopt.lsp long-float: remove conditionalization 2019-05-24 21:04:59 +00:00
cmpos-features.lsp cmp: prevent deadlock if the C compiler output is too large 2019-07-15 21:32:36 +02:00
cmpos-run.lsp cmp: prevent deadlock if the C compiler output is too large 2019-07-15 21:32:36 +02:00
cmppackage.lsp Unify compilation environment markers 2018-02-15 12:44:49 +01:00
cmppolicy.lsp newcmp: remove obsolete newcmp package 2016-03-11 16:06:45 +01:00
cmpprop.lsp cmp: simplify return-from c1form 2018-02-10 18:14:17 +01:00
cmpspecial.lsp fix for calling conventions treating fixed and variadic arguments differently 2019-12-08 10:26:52 +01:00
cmpstack.lsp cmp: cleanup: remove bogus constant 2017-04-28 11:51:29 +02:00
cmpstructures.lsp cmp: refactor: qualify package of *-prop interface 2017-04-28 11:48:15 +02:00
cmptables.lsp complex float: add compiler optimizations and ffi definitions 2019-05-15 16:35:16 +02:00
cmptag.lsp cmp: add blocks around ecl_frs_push in generated C code 2018-03-27 18:49:23 +02:00
cmptop.lsp fix for calling conventions treating fixed and variadic arguments differently 2019-12-08 10:26:52 +01:00
cmptype-arith.lsp newcmp: remove obsolete newcmp package 2016-03-11 16:06:45 +01:00
cmptype-assert.lsp Signal error on invalid constant type checking. 2017-06-28 15:58:20 +02:00
cmptype-prop.lsp newcmp: remove obsolete newcmp package 2016-03-11 16:06:45 +01:00
cmptype.lsp long-float: remove conditionalization 2019-05-24 21:04:59 +00:00
cmptypes.lsp Major cleanup for environment mark interpretation 2018-02-10 20:21:11 +01:00
cmputil.lsp normalize-build-target-name: normalize :fasb 2017-07-21 17:21:39 +02:00
cmpvar.lsp cmp: don't mark all lexical variables as crossing function boundaries 2018-10-29 19:15:49 +01:00
cmpwt.lsp long-float: remove conditionalization 2019-05-24 21:04:59 +00:00
defsys.lsp.in The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
load.lsp.in cmp: collect-lines: move function to cmputil 2017-07-21 10:45:13 +02:00
proclamations.lsp fix for calling conventions treating fixed and variadic arguments differently 2019-12-08 10:26:52 +01:00
sysfun.lsp cmp: prevent inline information from getting lost while compiling ECL itself 2019-11-17 19:58:53 +01:00