Mercurial > pub > dyncall > dyncall
view 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 |
line wrap: on
line source
; auto-generated by gen-masm.sh .386 .MODEL FLAT .CODE DCThunk_size = 16 DCArgs_size = 20 DCValue_size = 8 CTX_thunk = 0 CTX_phandler = 16 CTX_pargsvt = 20 CTX_stack_cleanup = 24 CTX_userdata = 28 frame_arg0 = 8 frame_ret = 4 frame_parent = 0 frame_CTX = -4 frame_DCArgs = -24 frame_DCValue = -32 _dcCallbackThunkEntry PROC OPTION PROLOGUE:NONE, EPILOGUE:NONE push EBP mov EBP,ESP push EAX push 0 push EDX push ECX lea ECX,dword ptr [EBP+frame_arg0] push ECX push dword ptr [EAX+CTX_pargsvt] mov ECX,ESP push 0 push 0 mov EDX,ESP and ESP,-16 push dword ptr [EAX+CTX_userdata] push EDX push ECX push EAX call dword ptr [EAX+CTX_phandler] mov ESP,EBP pop ECX pop ECX mov EDX,dword ptr [EBP+frame_CTX] add ESP,dword ptr [EDX+CTX_stack_cleanup] push ECX lea EDX,dword ptr [EBP+frame_DCValue] mov EBP,dword ptr [EBP+0] cmp AL,102 je return_f32 cmp AL,100 je return_f64 return_i64: mov EAX,dword ptr [EDX+0] mov EDX,dword ptr [EDX+4] ret return_f32: fld dword ptr [EDX+0] ret return_f64: fld qword ptr [EDX+0] return_void: ret _dcCallbackThunkEntry ENDP END