Mercurial > pub > dyncall > dyncall
annotate dyncall/dyncall_api.c @ 533:71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
* integration of aggregate-by-value (struct, union) support patch for x64 (win and sysv)
* windows/x64 asm additions to specify how stack unwinds (help for debuggers, exception handling, etc.)
* see Changelog for details
- new calling convention modes for thiscalls (platform agnostic, was specific before)
* new signature character for platform agnostic thiscalls ('*' / DC_SIGCHAR_CC_THISCALL)
- dcCallF(), dcVCallF(), dcArgF() and dcVArgF():
* added support for aggregates-by-value (wasn't part of patch)
* change that those functions don't implicitly call dcReset() anymore, which was unflexible (breaking change)
- added macros to feature test implementation for aggregate-by-value and syscall support
- changed libdyncall_s.lib and libdyncallback_s.lib order in callback test makefiles, as some toolchains are picky about order
- doc:
* man page updates to describe aggregate interface
* manual overview changes to highlight platforms with aggregate-by-value support
- test/plain: replaced tests w/ old/stale sctruct interface with new aggregate one
author | Tassilo Philipp |
---|---|
date | Thu, 21 Apr 2022 13:35:47 +0200 |
parents | ddfb9577a00e |
children |
rev | line source |
---|---|
0 | 1 /* |
2 | |
3 Package: dyncall | |
4 Library: dyncall | |
5 File: dyncall/dyncall_api.c | |
6 Description: C interface to call vm | |
7 License: | |
8 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
9 Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, |
0 | 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 #include "dyncall.h" | |
29 #include "dyncall_callvm.h" | |
30 | |
31 void dcReset(DCCallVM* vm) | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
32 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
33 vm->mVTpointer->reset(vm); |
0 | 34 } |
35 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
36 void dcFree(DCCallVM* vm) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
37 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
38 vm->mVTpointer->free(vm); |
0 | 39 } |
40 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
41 void dcMode(DCCallVM* vm,DCint mode) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
42 { |
0 | 43 vm->mVTpointer->mode(vm,mode); |
44 } | |
45 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
46 void dcArgBool(DCCallVM* vm,DCbool x) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
47 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
48 vm->mVTpointer->argBool(vm, x); |
0 | 49 } |
50 | |
51 void dcArgChar(DCCallVM* vm,DCchar x) | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
52 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
53 vm->mVTpointer->argChar(vm, x); |
0 | 54 } |
55 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
56 void dcArgShort(DCCallVM* vm,DCshort x) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
57 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
58 vm->mVTpointer->argShort(vm, x); |
0 | 59 } |
60 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
61 void dcArgInt(DCCallVM* vm,DCint x) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
62 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
63 vm->mVTpointer->argInt(vm, x); |
0 | 64 } |
65 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
66 void dcArgLong(DCCallVM* vm,DClong x) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
67 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
68 vm->mVTpointer->argLong(vm, x); |
0 | 69 } |
70 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
71 void dcArgLongLong(DCCallVM* vm, DClonglong x) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
72 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
73 vm->mVTpointer->argLongLong(vm, x); |
0 | 74 } |
75 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
76 void dcArgFloat(DCCallVM* vm, DCfloat x) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
77 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
78 vm->mVTpointer->argFloat(vm, x); |
0 | 79 } |
80 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
81 void dcArgDouble(DCCallVM* vm, DCdouble x) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
82 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
83 vm->mVTpointer->argDouble(vm, x); |
0 | 84 } |
85 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
86 void dcArgPointer(DCCallVM* vm, DCpointer x) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
87 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
88 vm->mVTpointer->argPointer(vm, x); |
0 | 89 } |
90 | |
533
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
91 void dcArgAggr(DCCallVM* vm, const DCaggr* ag, const void* x) |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
92 { |
533
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
93 vm->mVTpointer->argAggr(vm, ag, x); |
0 | 94 } |
95 | |
96 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
97 void dcCallVoid(DCCallVM* vm, DCpointer funcptr) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
98 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
99 vm->mVTpointer->callVoid(vm, funcptr); |
0 | 100 } |
101 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
102 DCchar dcCallChar(DCCallVM* vm, DCpointer funcptr) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
103 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
104 return vm->mVTpointer->callChar(vm, funcptr); |
0 | 105 } |
106 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
107 DCbool dcCallBool(DCCallVM* vm, DCpointer funcptr) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
108 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
109 return vm->mVTpointer->callBool(vm, funcptr); |
0 | 110 } |
111 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
112 DCshort dcCallShort(DCCallVM* vm, DCpointer funcptr) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
113 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
114 return vm->mVTpointer->callShort(vm, funcptr); |
0 | 115 } |
116 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
117 DCint dcCallInt(DCCallVM* vm, DCpointer funcptr) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
118 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
119 return vm->mVTpointer->callInt(vm, funcptr); |
0 | 120 } |
121 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
122 DClong dcCallLong(DCCallVM* vm, DCpointer funcptr) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
123 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
124 return vm->mVTpointer->callLong(vm, funcptr); |
0 | 125 } |
126 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
127 DClonglong dcCallLongLong(DCCallVM* vm, DCpointer funcptr) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
128 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
129 return vm->mVTpointer->callLongLong(vm, funcptr); |
0 | 130 } |
131 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
132 DCfloat dcCallFloat(DCCallVM* vm, DCpointer funcptr) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
133 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
134 return vm->mVTpointer->callFloat(vm, funcptr); |
0 | 135 } |
136 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
137 DCdouble dcCallDouble(DCCallVM* vm, DCpointer funcptr) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
138 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
139 return vm->mVTpointer->callDouble(vm, funcptr); |
0 | 140 } |
141 | |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
142 DCpointer dcCallPointer(DCCallVM* vm, DCpointer funcptr) |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
143 { |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
144 return vm->mVTpointer->callPointer(vm, funcptr); |
0 | 145 } |
146 | |
533
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
147 void dcBeginCallAggr(DCCallVM* vm, const DCaggr* ag) |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
148 { |
533
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
149 if (vm->mVTpointer->beginAggr) { |
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
150 vm->mVTpointer->beginAggr(vm, ag); |
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
151 } |
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
152 } |
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
153 |
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
154 DCpointer dcCallAggr(DCCallVM* vm, DCpointer funcptr, const DCaggr* ag, DCpointer ret) |
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
155 { |
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
156 vm->mVTpointer->callAggr(vm, funcptr, ag, ret); |
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
157 return ret; |
0 | 158 } |
159 | |
160 DCint dcGetError(DCCallVM *vm) | |
161 { | |
162 return vm->mError; | |
163 } | |
164 | |
362
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
165 DCint dcGetModeFromCCSigChar(DCsigchar sig_char) |
171
011b5e3a8548
- compatibility for older platforms - use ANSI comments
cslag
parents:
84
diff
changeset
|
166 { |
362
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
167 switch(sig_char) |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
168 { |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
169 case DC_SIGCHAR_CC_DEFAULT: return DC_CALL_C_DEFAULT; |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
367
diff
changeset
|
170 case DC_SIGCHAR_CC_THISCALL: return DC_CALL_C_DEFAULT_THIS; |
362
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
171 case DC_SIGCHAR_CC_ELLIPSIS: return DC_CALL_C_ELLIPSIS; |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
172 case DC_SIGCHAR_CC_ELLIPSIS_VARARGS: return DC_CALL_C_ELLIPSIS_VARARGS; |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
173 case DC_SIGCHAR_CC_CDECL: return DC_CALL_C_X86_CDECL; |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
174 case DC_SIGCHAR_CC_STDCALL: return DC_CALL_C_X86_WIN32_STD; |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
175 case DC_SIGCHAR_CC_FASTCALL_MS: return DC_CALL_C_X86_WIN32_FAST_MS; |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
176 case DC_SIGCHAR_CC_FASTCALL_GNU: return DC_CALL_C_X86_WIN32_FAST_GNU; |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
177 case DC_SIGCHAR_CC_THISCALL_MS: return DC_CALL_C_X86_WIN32_THIS_MS; |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
178 case DC_SIGCHAR_CC_THISCALL_GNU: return DC_CALL_C_X86_WIN32_THIS_GNU; |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
179 case DC_SIGCHAR_CC_ARM_ARM: return DC_CALL_C_ARM_ARM; |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
180 case DC_SIGCHAR_CC_ARM_THUMB: return DC_CALL_C_ARM_THUMB; |
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
181 case DC_SIGCHAR_CC_SYSCALL: return DC_CALL_SYS_DEFAULT; |
171
011b5e3a8548
- compatibility for older platforms - use ANSI comments
cslag
parents:
84
diff
changeset
|
182 } |
362
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
281
diff
changeset
|
183 return DC_ERROR_UNSUPPORTED_MODE; |
171
011b5e3a8548
- compatibility for older platforms - use ANSI comments
cslag
parents:
84
diff
changeset
|
184 } |
0 | 185 |