Mercurial > pub > dyncall > dyncall
annotate dyncallback/dyncall_callback_x86_masm.asm @ 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 | ab2d78e48ca2 |
children |
rev | line source |
---|---|
0 | 1 ; auto-generated by gen-masm.sh |
2 .386 | |
3 .MODEL FLAT | |
4 .CODE | |
5 DCThunk_size = 16 | |
6 DCArgs_size = 20 | |
7 DCValue_size = 8 | |
8 CTX_thunk = 0 | |
9 CTX_phandler = 16 | |
10 CTX_pargsvt = 20 | |
11 CTX_stack_cleanup = 24 | |
12 CTX_userdata = 28 | |
13 frame_arg0 = 8 | |
14 frame_ret = 4 | |
15 frame_parent = 0 | |
16 frame_CTX = -4 | |
17 frame_DCArgs = -24 | |
18 frame_DCValue = -32 | |
19 _dcCallbackThunkEntry PROC | |
20 OPTION PROLOGUE:NONE, EPILOGUE:NONE | |
21 push EBP | |
22 mov EBP,ESP | |
23 push EAX | |
24 push 0 | |
25 push EDX | |
26 push ECX | |
27 lea ECX,dword ptr [EBP+frame_arg0] | |
28 push ECX | |
29 push dword ptr [EAX+CTX_pargsvt] | |
30 mov ECX,ESP | |
31 push 0 | |
32 push 0 | |
33 mov EDX,ESP | |
34 and ESP,-16 | |
35 push dword ptr [EAX+CTX_userdata] | |
36 push EDX | |
37 push ECX | |
38 push EAX | |
39 call dword ptr [EAX+CTX_phandler] | |
40 mov ESP,EBP | |
41 pop ECX | |
42 pop ECX | |
43 mov EDX,dword ptr [EBP+frame_CTX] | |
44 add ESP,dword ptr [EDX+CTX_stack_cleanup] | |
45 push ECX | |
46 lea EDX,dword ptr [EBP+frame_DCValue] | |
47 mov EBP,dword ptr [EBP+0] | |
48 cmp AL,102 | |
49 je return_f32 | |
50 cmp AL,100 | |
51 je return_f64 | |
52 return_i64: | |
53 mov EAX,dword ptr [EDX+0] | |
54 mov EDX,dword ptr [EDX+4] | |
55 ret | |
56 return_f32: | |
57 fld dword ptr [EDX+0] | |
58 ret | |
59 return_f64: | |
60 fld qword ptr [EDX+0] | |
61 return_void: | |
62 ret | |
63 _dcCallbackThunkEntry ENDP | |
64 END |