Mercurial > pub > dyncall > dyncall
view 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 |
line wrap: on
line source
; auto-generated by gen-masm.sh .CODE dcCall_x64_sysv PROC OPTION PROLOGUE:NONE, EPILOGUE:NONE push RBP push RBX mov RBP,RSP mov RBX,R8 movsd XMM0,qword ptr [RCX+0] movsd XMM1,qword ptr [RCX+8] movsd XMM2,qword ptr [RCX+16] movsd XMM3,qword ptr [RCX+24] movsd XMM4,qword ptr [RCX+32] movsd XMM5,qword ptr [RCX+40] movsd XMM6,qword ptr [RCX+48] movsd XMM7,qword ptr [RCX+56] add RDI,31 and RDI,-32 add RDI,8 sub RSP,RDI mov RCX,RDI mov RDI,RSP rep movsb mov RDI,qword ptr [RDX+0] mov RSI,qword ptr [RDX+8] mov RCX,qword ptr [RDX+24] mov R8,qword ptr [RDX+32] mov R9,qword ptr [RDX+40] mov RDX,qword ptr [RDX+16] mov AL,8 call RBX mov RSP,RBP pop RBX pop RBP ret dcCall_x64_sysv ENDP dcCall_x64_sysv_aggr PROC OPTION PROLOGUE:NONE, EPILOGUE:NONE push R9 call dcCall_x64_sysv pop R9 mov qword ptr [R9+0],RAX mov qword ptr [R9+8],RDX movsd qword ptr [R9+16],XMM0 movsd qword ptr [R9+24],XMM1 ret dcCall_x64_sysv_aggr ENDP dcCall_x64_win64 PROC FRAME OPTION EPILOGUE:NONE push RBP .pushreg RBP push RSI .pushreg RSI push RDI .pushreg RDI mov RBP,RSP .setframe RBP, 0 .endprolog add RCX,15 and RCX,-16 sub RSP,RCX mov RSI,RDX mov RDI,RSP mov RAX,R9 rep movsb mov RCX,qword ptr [R8+0] mov RDX,qword ptr [R8+8] mov R9,qword ptr [R8+24] mov R8,qword ptr [R8+16] movd XMM0,RCX movd XMM1,RDX movd XMM2,R8 movd XMM3,R9 push R9 push R8 push RDX push RCX call RAX mov RSP,RBP pop RDI pop RSI pop RBP ret dcCall_x64_win64 ENDP dcCall_x64_win64_aggr PROC OPTION PROLOGUE:NONE, EPILOGUE:NONE sub RSP,8 call dcCall_x64_win64 add RSP,8 mov R8,qword ptr [RSP+40] mov qword ptr [R8+0],RAX ret dcCall_x64_win64_aggr ENDP dcCall_x64_syscall_sysv PROC OPTION PROLOGUE:NONE, EPILOGUE:NONE mov RAX,RSI mov R9,qword ptr [RDI+40] mov R8,qword ptr [RDI+32] mov R10,qword ptr [RDI+24] mov RDX,qword ptr [RDI+16] mov RSI,qword ptr [RDI+8] mov RDI,qword ptr [RDI+0] SYSCALL ret dcCall_x64_syscall_sysv ENDP END