diff options
author | Hanjoung Lee <waterets@gmail.com> | 2017-03-16 12:29:34 +0900 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-03-15 20:29:34 -0700 |
commit | 9422f47c5de802d877c08f9f5118471b375239b1 (patch) | |
tree | 00aca1a8fa7d7969eaf641ca9b5baa36f770c8fc /src/vm/ilmarshalers.h | |
parent | 60a73101ad8becbec2ad7d00b6451d135becc074 (diff) | |
download | coreclr-9422f47c5de802d877c08f9f5118471b375239b1.tar.gz coreclr-9422f47c5de802d877c08f9f5118471b375239b1.tar.bz2 coreclr-9422f47c5de802d877c08f9f5118471b375239b1.zip |
[x86/Linux] Fix IL_STUB_PInvoke with RetBuf (#10144)
* [x86/Linux] Fix IL_STUB_PInvoke with RetBuf
Fix calling convention and IL_STUB_PInvoke for native functions
which was problematic for native functions that has
a RetBuf argument(struct size <= 8) on x86/Linux.
Fix #10027
Diffstat (limited to 'src/vm/ilmarshalers.h')
-rw-r--r-- | src/vm/ilmarshalers.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vm/ilmarshalers.h b/src/vm/ilmarshalers.h index 7c7f9a6553..5ac5e41242 100644 --- a/src/vm/ilmarshalers.h +++ b/src/vm/ilmarshalers.h @@ -607,12 +607,15 @@ public: // for X86 and AMD64-Windows we bash the return type from struct to U1, U2, U4 or U8 // and use byrefNativeReturn for all other structs. + // for UNIX_X86_ABI, we always need a return buffer argument for any size of structs. switch (nativeSize) { +#ifndef UNIX_X86_ABI case 1: typ = ELEMENT_TYPE_U1; break; case 2: typ = ELEMENT_TYPE_U2; break; case 4: typ = ELEMENT_TYPE_U4; break; case 8: typ = ELEMENT_TYPE_U8; break; +#endif default: byrefNativeReturn = true; break; } #endif |