nativeSize = wNativeSize;
}
-#if defined(_TARGET_X86_) || (defined(_TARGET_AMD64_) && defined(_WIN64) && !defined(FEATURE_CORECLR))
+#if defined(_TARGET_X86_)
// JIT32 and JIT64 (which is only used on the Windows Desktop CLR) has a problem generating
// code for the pinvoke ILStubs which do a return using a struct type. Therefore, we
// change the signature of calli to return void and make the return buffer as first argument.
// 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
virtual void EmitConvertContentsNativeToCLR(ILCodeStream* pslILEmit);
};
-#ifdef FEATURE_COMINTEROP
class ILBSTRMarshaler : public ILOptimizedAllocMarshaler
{
public:
virtual void EmitConvertContentsNativeToCLR(ILCodeStream* pslILEmit);
};
-
class ILAnsiBSTRMarshaler : public ILMarshaler
{
public:
virtual bool NeedsClearNative();
virtual void EmitClearNative(ILCodeStream* pslILEmit);
};
-#endif // FEATURE_COMINTEROP
class ILLayoutClassPtrMarshalerBase : public ILMarshaler
{
};
-#ifndef FEATURE_CORECLR
-class ILBlittableValueClassWithCopyCtorMarshaler : public ILMarshaler
-{
-public:
- enum
- {
- c_fInOnly = TRUE,
- c_nativeSize = VARIABLESIZE,
- c_CLRSize = sizeof(OBJECTREF),
- };
-
- LocalDesc GetManagedType()
- {
- LIMITED_METHOD_CONTRACT;
- return LocalDesc();
- }
-
- LocalDesc GetNativeType()
- {
- LIMITED_METHOD_CONTRACT;
- return LocalDesc();
- }
-
- static MarshalerOverrideStatus ArgumentOverride(NDirectStubLinker* psl,
- BOOL byref,
- BOOL fin,
- BOOL fout,
- BOOL fManagedToNative,
- OverrideProcArgs* pargs,
- UINT* pResID,
- UINT argidx,
- UINT nativeStackOffset);
-
-
-};
-#endif // !FEATURE_CORECLR
class ILArgIteratorMarshaler : public ILMarshaler