Mercurial > pub > dyncall > dyncall
comparison dyncall/dyncall_callvm_x64.c @ 466:ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
for upcoming aggregate support (until now only x86 platforms allowed for
specifically selecting thiscall mode, given the different conventions on
the same platform); also added respective DC_SIGCHAR_CC_THISCALL ('*')
author | Tassilo Philipp |
---|---|
date | Wed, 02 Feb 2022 18:30:44 +0100 |
parents | ad5f9803f52f |
children | 71c884e610f0 |
comparison
equal
deleted
inserted
replaced
465:e2899b4ff713 | 466:ddfb9577a00e |
---|---|
253 DCCallVM_x64* self = (DCCallVM_x64*)in_self; | 253 DCCallVM_x64* self = (DCCallVM_x64*)in_self; |
254 DCCallVM_vt* vt; | 254 DCCallVM_vt* vt; |
255 | 255 |
256 switch(mode) { | 256 switch(mode) { |
257 case DC_CALL_C_DEFAULT: | 257 case DC_CALL_C_DEFAULT: |
258 case DC_CALL_C_DEFAULT_THIS: | |
258 #if defined(DC_UNIX) | 259 #if defined(DC_UNIX) |
259 case DC_CALL_C_X64_SYSV: | 260 case DC_CALL_C_X64_SYSV: |
260 #else | 261 #else |
261 case DC_CALL_C_X64_WIN64: | 262 case DC_CALL_C_X64_WIN64: |
262 #endif | 263 #endif |
263 case DC_CALL_C_ELLIPSIS: | 264 case DC_CALL_C_ELLIPSIS: |
264 case DC_CALL_C_ELLIPSIS_VARARGS: | 265 case DC_CALL_C_ELLIPSIS_VARARGS: |
265 vt = &gVT_x64; | 266 vt = &gVT_x64; |
266 break; | 267 break; |
267 case DC_CALL_SYS_DEFAULT: | 268 case DC_CALL_SYS_DEFAULT: |
268 # if defined DC_UNIX | 269 #if defined(DC_UNIX) |
269 case DC_CALL_SYS_X64_SYSCALL_SYSV: | 270 case DC_CALL_SYS_X64_SYSCALL_SYSV: |
270 vt = &gVT_x64_syscall_sysv; break; | 271 vt = &gVT_x64_syscall_sysv; break; |
271 # else | 272 #else |
272 self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE; return; | 273 self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE; return; |
273 # endif | 274 #endif |
274 default: | 275 default: |
275 self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE; | 276 self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE; |
276 return; | 277 return; |
277 } | 278 } |
278 dc_callvm_base_init(&self->mInterface, vt); | 279 dc_callvm_base_init(&self->mInterface, vt); |