Mercurial > pub > dyncall > dyncall
diff dyncall/dyncall_callvm_ppc64.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 |
line wrap: on
line diff
--- a/dyncall/dyncall_callvm_ppc64.c Wed Feb 02 12:55:23 2022 +0100 +++ b/dyncall/dyncall_callvm_ppc64.c Wed Feb 02 18:30:44 2022 +0100 @@ -3,12 +3,12 @@ Package: dyncall Library: dyncall File: dyncall/dyncall_callvm_ppc64.c - Description: + Description: License: Copyright (c) 2014-2015 Masanori Mitsugi <mitsugi@linux.vnet.ibm.com> 2020 Tassilo Philipp <tphilipp@potion-studios.com> - + Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -45,7 +45,7 @@ #include "dyncall_types.h" -/* +/* ** PowerPC 64-bit calling convention call ** ** - hybrid return-type call (bool ... pointer) @@ -204,10 +204,10 @@ { DCCallVM_ppc64* self = (DCCallVM_ppc64*)in_self; - if (dcVecSize(&self->mVecHead) == 0) + if (dcVecSize(&self->mVecHead) == 0) dcVecSkip(&self->mVecHead,(sizeof(DClonglong))*(self->mIntRegs)); - if (self->mIntRegs < 8) + if (self->mIntRegs < 8) self->mRegData.mIntData[self->mIntRegs++] = L; /* push on stack */ @@ -259,7 +259,7 @@ if (size < 64) { dcVecSkip(&self->mVecHead, 64-size); } - + dcCall_ppc64( target, &self->mRegData, dcVecSize(&self->mVecHead) , dcVecData(&self->mVecHead)); } @@ -364,7 +364,8 @@ switch(mode) { case DC_CALL_C_DEFAULT: - case DC_CALL_C_PPC64: + case DC_CALL_C_DEFAULT_THIS: + case DC_CALL_C_PPC64: case DC_CALL_C_ELLIPSIS: #if DC__ABI_PPC64_ELF_V == 2 vt = &gVT_ppc64; @@ -383,11 +384,11 @@ vt = &gVT_ppc64_syscall; break; - default: - self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE; + default: + self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE; return; } - + dc_callvm_base_init(&self->mInterface, vt); }