diff options
author | Konstantin Baladurin <k.baladurin@partner.samsung.com> | 2018-04-16 21:11:41 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2018-04-16 11:11:41 -0700 |
commit | af74af2f4a01341fce78bcaac370d497f4f511b1 (patch) | |
tree | c87ede1b55e2ca5e3f08bfe04a2ab01a81fa9935 /src/vm/fieldmarshaler.h | |
parent | ae51c7aab9ce5f6b30642848d444893a521441f1 (diff) | |
download | coreclr-af74af2f4a01341fce78bcaac370d497f4f511b1.tar.gz coreclr-af74af2f4a01341fce78bcaac370d497f4f511b1.tar.bz2 coreclr-af74af2f4a01341fce78bcaac370d497f4f511b1.zip |
[x86/Linux] Fix marshalling struct with 64-bit types (#17455)
* [x86/Linux] Fix marshalling struct with 64-bit types
The System V ABI for i386 defines 4-byte alignment for 64-bit types.
* [Linux/x86] Fix marshalling tests in the case of System V i386 ABI
Diffstat (limited to 'src/vm/fieldmarshaler.h')
-rw-r--r-- | src/vm/fieldmarshaler.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vm/fieldmarshaler.h b/src/vm/fieldmarshaler.h index 8c1f8fe1ac..934f058f99 100644 --- a/src/vm/fieldmarshaler.h +++ b/src/vm/fieldmarshaler.h @@ -1626,7 +1626,13 @@ public: UNUSED_METHOD_IMPL(VOID UpdateNativeImpl(OBJECTREF* pCLRValue, LPVOID pNativeValue, OBJECTREF *ppCleanupWorkListOnStack) const) UNUSED_METHOD_IMPL(VOID UpdateCLRImpl(const VOID *pNativeValue, OBJECTREF *ppProtectedCLRValue, OBJECTREF *ppProtectedOldCLRValue) const) +#if defined(_TARGET_X86_) && defined(UNIX_X86_ABI) + // The System V ABI for i386 defines 4-byte alignment for 64-bit types. + SCALAR_MARSHALER_IMPL(8, 4) +#else SCALAR_MARSHALER_IMPL(8, 8) +#endif // _TARGET_X86_ + COPY_TO_IMPL_BASE_STRUCT_ONLY() VOID ScalarUpdateNativeImpl(LPVOID pCLR, LPVOID pNative) const |