annotate dyncall/dyncall_signature.h @ 358:30aae7371373

- extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall - made formatted call (dcV?{Call,Arg}F) interface use those calling convention mode signature specifications to begin with - extended callf testcode with one standard and one vararg call to test those cc mode switches
author Tassilo Philipp
date Mon, 13 Apr 2020 15:12:01 +0200
parents f5577f6bf97a
children 78dfa2f9783a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 /*
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 Package: dyncall
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4 Library: dyncall
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5 File: dyncall/dyncall_signature.h
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6 Description: Type and calling-convention signature character defines
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 License:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8
281
f5577f6bf97a - file header cleanups for release
Tassilo Philipp
parents: 0
diff changeset
9 Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>,
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10 Tassilo Philipp <tphilipp@potion-studios.com>
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 Permission to use, copy, modify, and distribute this software for any
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13 purpose with or without fee is hereby granted, provided that the above
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14 copyright notice and this permission notice appear in all copies.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24 */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 /*
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 dyncall signature characters
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32 REVISION
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33 2007/12/11 initial
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35 */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
38 #ifndef DYNCALL_SIGNATURE_H
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
39 #define DYNCALL_SIGNATURE_H
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
40
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
41 typedef char DCsigchar;
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
43 #define DC_SIGCHAR_VOID 'v'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
44 #define DC_SIGCHAR_BOOL 'B'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45 #define DC_SIGCHAR_CHAR 'c'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46 #define DC_SIGCHAR_UCHAR 'C'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
47 #define DC_SIGCHAR_SHORT 's'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48 #define DC_SIGCHAR_USHORT 'S'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
49 #define DC_SIGCHAR_INT 'i'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
50 #define DC_SIGCHAR_UINT 'I'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
51 #define DC_SIGCHAR_LONG 'j'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
52 #define DC_SIGCHAR_ULONG 'J'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
53 #define DC_SIGCHAR_LONGLONG 'l'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
54 #define DC_SIGCHAR_ULONGLONG 'L'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
55 #define DC_SIGCHAR_FLOAT 'f'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
56 #define DC_SIGCHAR_DOUBLE 'd'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
57 #define DC_SIGCHAR_POINTER 'p'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
58 #define DC_SIGCHAR_STRING 'Z'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
59 #define DC_SIGCHAR_STRUCT 'T'
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
60 #define DC_SIGCHAR_ENDARG ')' /* also works for end struct */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
61
358
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
62 /* calling convention / mode signatures */
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
63
358
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
64 #define DC_SIGCHAR_CC_PREFIX '_'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
65 #define DC_SIGCHAR_CC_DEFAULT ':'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
66 #define DC_SIGCHAR_CC_ELLIPSIS 'e'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
67 #define DC_SIGCHAR_CC_ELLIPSIS_VARARGS '.'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
68 #define DC_SIGCHAR_CC_CDECL 'c'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
69 #define DC_SIGCHAR_CC_STDCALL 's'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
70 #define DC_SIGCHAR_CC_FASTCALL_MS 'F'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
71 #define DC_SIGCHAR_CC_FASTCALL_GNU 'f'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
72 #define DC_SIGCHAR_CC_THISCALL_MS '+'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
73 #define DC_SIGCHAR_CC_THISCALL_GNU '#'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
74 #define DC_SIGCHAR_CC_ARM_ARM 'A'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
75 #define DC_SIGCHAR_CC_ARM_THUMB 'a'
30aae7371373 - extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents: 281
diff changeset
76 #define DC_SIGCHAR_CC_SYSCALL '$'
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
77
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
78 #endif /* DYNCALL_SIGNATURE_H */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
79