Mercurial > pub > dyncall > dyncall
comparison dyncall/dyncall_call_x64_generic_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 |
comparison
equal
deleted
inserted
replaced
532:d4bf63ab9164 | 533:71c884e610f0 |
---|---|
32 mov RSP,RBP | 32 mov RSP,RBP |
33 pop RBX | 33 pop RBX |
34 pop RBP | 34 pop RBP |
35 ret | 35 ret |
36 dcCall_x64_sysv ENDP | 36 dcCall_x64_sysv ENDP |
37 dcCall_x64_win64 PROC | 37 dcCall_x64_sysv_aggr PROC |
38 OPTION PROLOGUE:NONE, EPILOGUE:NONE | 38 OPTION PROLOGUE:NONE, EPILOGUE:NONE |
39 push R9 | |
40 call dcCall_x64_sysv | |
41 pop R9 | |
42 mov qword ptr [R9+0],RAX | |
43 mov qword ptr [R9+8],RDX | |
44 movsd qword ptr [R9+16],XMM0 | |
45 movsd qword ptr [R9+24],XMM1 | |
46 ret | |
47 dcCall_x64_sysv_aggr ENDP | |
48 dcCall_x64_win64 PROC FRAME | |
49 OPTION EPILOGUE:NONE | |
39 push RBP | 50 push RBP |
51 .pushreg RBP | |
40 push RSI | 52 push RSI |
53 .pushreg RSI | |
41 push RDI | 54 push RDI |
55 .pushreg RDI | |
42 mov RBP,RSP | 56 mov RBP,RSP |
57 .setframe RBP, 0 | |
58 .endprolog | |
43 add RCX,15 | 59 add RCX,15 |
44 and RCX,-16 | 60 and RCX,-16 |
45 sub RSP,RCX | 61 sub RSP,RCX |
46 mov RSI,RDX | 62 mov RSI,RDX |
47 mov RDI,RSP | 63 mov RDI,RSP |
64 pop RDI | 80 pop RDI |
65 pop RSI | 81 pop RSI |
66 pop RBP | 82 pop RBP |
67 ret | 83 ret |
68 dcCall_x64_win64 ENDP | 84 dcCall_x64_win64 ENDP |
85 dcCall_x64_win64_aggr PROC | |
86 OPTION PROLOGUE:NONE, EPILOGUE:NONE | |
87 sub RSP,8 | |
88 call dcCall_x64_win64 | |
89 add RSP,8 | |
90 mov R8,qword ptr [RSP+40] | |
91 mov qword ptr [R8+0],RAX | |
92 ret | |
93 dcCall_x64_win64_aggr ENDP | |
69 dcCall_x64_syscall_sysv PROC | 94 dcCall_x64_syscall_sysv PROC |
70 OPTION PROLOGUE:NONE, EPILOGUE:NONE | 95 OPTION PROLOGUE:NONE, EPILOGUE:NONE |
71 mov RAX,RSI | 96 mov RAX,RSI |
72 mov R9,qword ptr [RDI+40] | 97 mov R9,qword ptr [RDI+40] |
73 mov R8,qword ptr [RDI+32] | 98 mov R8,qword ptr [RDI+32] |