comparison dyncall/dyncall_call_arm32_arm.h @ 27:523c45dfa8fb

- refactored arm calling conventions' callvm code, so that the code that keeps the caller from overwriting the return value on some platforms also works on OpenBSD (before we casted the function pointer to have long long as return type, to hint the caller that there is one, but that triggers an intentional SIGABRT on OpenBSD for security reasons; now the decl reflects this, directly)
author cslag
date Tue, 15 Sep 2015 12:48:52 +0200
parents 3e629dc19168
children f5577f6bf97a
comparison
equal deleted inserted replaced
26:32e397e1674c 27:523c45dfa8fb
48 /* 48 /*
49 ** arm32 arm mode calling convention calls 49 ** arm32 arm mode calling convention calls
50 ** 50 **
51 ** - hybrid return-type call (bool ... pointer) 51 ** - hybrid return-type call (bool ... pointer)
52 ** 52 **
53 ** Note the return type of this declaration is intentially of double-word size.
54 ** On some platforms (FreeBSD/arm, Nintendo DS, ...) the compiler generates cleanup code
55 ** in the caller (dc_callvm_call_arm32_arm) that reuses, thus overwrites r0 and r1.
56 ** With this "hint", we preserve those registers by letting the compiler assume both
57 ** registers are used for the return type.
53 */ 58 */
54 59
55 void dcCall_arm32_arm(DCpointer target, DCpointer stackdata, DCsize size); 60 DClonglong dcCall_arm32_arm(DCpointer target, DCpointer stackdata, DCsize size);
56 61
57 #ifdef __cplusplus 62 #ifdef __cplusplus
58 } 63 }
59 #endif 64 #endif
60 65