Mercurial > pub > dyncall > dyncall
annotate dyncall/dyncall_call_arm32_arm.h @ 251:3f7c69fadfc3
- regression fix for changing writable to executable memory for platforms where
mmap has no MAP_ANON (usually older platforms, e.g. solaris 7)
author | Tassilo Philipp |
---|---|
date | Sun, 14 May 2017 02:26:21 +0200 |
parents | 523c45dfa8fb |
children | f5577f6bf97a |
rev | line source |
---|---|
0 | 1 /* |
2 | |
3 Package: dyncall | |
4 Library: dyncall | |
5 File: dyncall/dyncall_call_arm32_arm.h | |
6 Description: | |
7 License: | |
8 | |
9 Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, | |
10 Tassilo Philipp <tphilipp@potion-studios.com> | |
11 | |
12 Permission to use, copy, modify, and distribute this software for any | |
13 purpose with or without fee is hereby granted, provided that the above | |
14 copyright notice and this permission notice appear in all copies. | |
15 | |
16 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
17 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
18 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
19 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
23 | |
24 */ | |
25 | |
26 | |
27 | |
28 /* | |
29 | |
30 dyncall 32bit ARM32 family interface (ARM mode) | |
31 | |
32 REVISION | |
33 2007/12/11 initial | |
34 | |
35 */ | |
36 | |
37 | |
38 #ifndef DYNCALL_CALL_ARM32_ARM_H | |
39 #define DYNCALL_CALL_ARM32_ARM_H | |
40 | |
41 | |
42 #include "dyncall_types.h" | |
43 | |
44 #ifdef __cplusplus | |
45 extern "C" { | |
46 #endif | |
47 | |
48 /* | |
49 ** arm32 arm mode calling convention calls | |
50 ** | |
51 ** - hybrid return-type call (bool ... pointer) | |
52 ** | |
27
523c45dfa8fb
- refactored arm calling conventions' callvm code, so that the code that keeps
cslag
parents:
0
diff
changeset
|
53 ** Note the return type of this declaration is intentially of double-word size. |
523c45dfa8fb
- refactored arm calling conventions' callvm code, so that the code that keeps
cslag
parents:
0
diff
changeset
|
54 ** On some platforms (FreeBSD/arm, Nintendo DS, ...) the compiler generates cleanup code |
523c45dfa8fb
- refactored arm calling conventions' callvm code, so that the code that keeps
cslag
parents:
0
diff
changeset
|
55 ** in the caller (dc_callvm_call_arm32_arm) that reuses, thus overwrites r0 and r1. |
523c45dfa8fb
- refactored arm calling conventions' callvm code, so that the code that keeps
cslag
parents:
0
diff
changeset
|
56 ** With this "hint", we preserve those registers by letting the compiler assume both |
523c45dfa8fb
- refactored arm calling conventions' callvm code, so that the code that keeps
cslag
parents:
0
diff
changeset
|
57 ** registers are used for the return type. |
0 | 58 */ |
59 | |
27
523c45dfa8fb
- refactored arm calling conventions' callvm code, so that the code that keeps
cslag
parents:
0
diff
changeset
|
60 DClonglong dcCall_arm32_arm(DCpointer target, DCpointer stackdata, DCsize size); |
0 | 61 |
62 #ifdef __cplusplus | |
63 } | |
64 #endif | |
65 | |
66 | |
67 #endif /* DYNCALL_CALL_ARM32_ARM_H */ |