# HG changeset patch # User cslag # Date 1473368445 -7200 # Node ID 0ab08c1541f061dfc9e0c7ae1480941c176473a6 # Parent 63892f03e493802fb894d72fe3ac78e3e931b811 - fixed armhf ellipsis calls, were ignoring spill area - minor cleanups for consistency - todo update diff -r 63892f03e493 -r 0ab08c1541f0 ToDo --- a/ToDo Sat Aug 20 22:27:47 2016 +0200 +++ b/ToDo Thu Sep 08 23:00:45 2016 +0200 @@ -25,7 +25,6 @@ - ellipsis (might be test itself, not respecting fixed part of args) - callback_plain retval, see above under ARM - callf -- armhf ellipsis: fix weirdness with long long as first ... arg - support Solaris11 CFLAGS with -D_FILE_OFFSET_BITS=64 - make sure selinux works (esp. regarding NX bits, asm might need (or similar): .section .note.GNU-stack,"",@progbits) Daniel has a patch for it, if needed, implementing allocwx with two memory blocks, one for w^x, mmaped to one for r|x @@ -36,6 +35,7 @@ - quadmath support (long double) - add tests using alloca(), as this might depend on the frame pointer being correctly set; we don't check for this, currently, at all +- test on OpenBSD 6.0 which comes with W^X by default portasm: -------- @@ -43,6 +43,9 @@ dyncall: -------- +- find big endian arm box (also hardfloat), e.g. cubietruck: http://blog.netbsd.org/tnf/entry/working_arm_multiprocessor_support +- test if armhf/thumb is actually working... pulls in arm mode code in dyncall_callvm.c +- dyncall_call_mips_n32.h and dyncall_call_mips_n64.h are pretty much the same, share code - support for return values: aggregate return values - support for argument values: structures, half-precision, vector types, long double - consider automatic type-promotion for arguments passed through DC_CALL_C_ELLIPSIS_VARARGS; @@ -58,6 +61,10 @@ EdgeRouter lite uses this: https://blog.netbsd.org/tnf/entry/hands_on_experience_with_edgerouter) - implement MIPS64 EABI (gcc -mabi=eabi); both, little and big-endian - support for Minix/arm +- improve ellipsis test: + * test not just with one fixed arg, to also simulate alignment problems + * test return values + * convert from c++ to c, to have it also on plan9, and more portability dynload: -------- @@ -100,6 +107,7 @@ manual: ------- +- introduce doc overview tables and common vocab for calling convention specifics, following example of table on page 13 of https://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf - callconv diagrams: * good idea to review it all, anyways, if the calling conventions are actually represented correctly (and if they are in sync with the .pdf, we used to have diff -r 63892f03e493 -r 0ab08c1541f0 dyncall/dyncall_call_arm32_arm_armhf.S --- a/dyncall/dyncall_call_arm32_arm_armhf.S Sat Aug 20 22:27:47 2016 +0200 +++ b/dyncall/dyncall_call_arm32_arm_armhf.S Thu Sep 08 23:00:45 2016 +0200 @@ -6,7 +6,7 @@ Description: Call Kernel for ARM 32-bit ARM Architecture - Hard Float License: - Copyright (c) 2007-2015 Daniel Adler , + Copyright (c) 2007-2016 Daniel Adler , Tassilo Philipp Permission to use, copy, modify, and distribute this software for any @@ -61,7 +61,7 @@ /* Load 16 single-precision registers (= 8 double-precision registers). */ fldmiad r3, {d0-d7} - sub r2 , r2 , #16 /* skip spill area */ + /* nope, or varargs will not work: sub r2 , r2 , #16 /* skip spill area */ cmp r2, #0 ble armhf_call diff -r 63892f03e493 -r 0ab08c1541f0 dyncall/dyncall_callvm_arm32_arm_armhf.c --- a/dyncall/dyncall_callvm_arm32_arm_armhf.c Sat Aug 20 22:27:47 2016 +0200 +++ b/dyncall/dyncall_callvm_arm32_arm_armhf.c Thu Sep 08 23:00:45 2016 +0200 @@ -100,7 +100,7 @@ DCCallVM_arm32_armhf* p = (DCCallVM_arm32_armhf*)in_p; if (p->d < 16) { - * (double*) &p->S[p->d] = x; + * (DCdouble*) &p->S[p->d] = x; p->d += 2; if (!(p->s & 1)) { /* if s is even it always equals d. otherwise, s points to an odd float register. */ diff -r 63892f03e493 -r 0ab08c1541f0 test/plain/test_main.c --- a/test/plain/test_main.c Sat Aug 20 22:27:47 2016 +0200 +++ b/test/plain/test_main.c Thu Sep 08 23:00:45 2016 +0200 @@ -70,7 +70,7 @@ r = dcCallBool(pc, (DCpointer) &fun_c_b); DC_TEST(r == val); - val=DC_FALSE; + val=DC_FALSE; dcReset(pc); dcArgBool(pc, val); r = dcCallBool(pc, (DCpointer) &fun_c_b); @@ -149,7 +149,7 @@ r = dcCallBool(pc, (DCpointer) &fun_std_b); DC_TEST(r == val); - val=DC_FALSE; + val=DC_FALSE; dcReset(pc); dcArgBool(pc, val); r = dcCallBool(pc, (DCpointer) &fun_std_b); @@ -234,7 +234,7 @@ r = dcCallBool(pc, (DCpointer) &fun_fast_b); DC_TEST(r == val); - val=DC_FALSE; + val=DC_FALSE; dcReset(pc); dcArgBool(pc, val); r = dcCallBool(pc, (DCpointer) &fun_fast_b);