From: Jonghyun Park Date: Wed, 8 Mar 2017 11:40:26 +0000 (+0900) Subject: [x86/Linux] Calling convention mismatch inside Vector3Interop tests (dotnet/coreclr... X-Git-Tag: submit/tizen/20210909.063632~11030^2~7805 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4bbecbbffaf379c069eb8da938612bf80343d3f2;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [x86/Linux] Calling convention mismatch inside Vector3Interop tests (dotnet/coreclr#10028) * [x86/Linux] Fix Calling Convention on JIT.SIMD.Vector3Interop tests Commit migrated from https://github.com/dotnet/coreclr/commit/f581375d423d8fb6f2e1b7148aa949c8f14c952b --- diff --git a/src/coreclr/tests/src/JIT/SIMD/Vector3TestNative.cpp b/src/coreclr/tests/src/JIT/SIMD/Vector3TestNative.cpp index 12e31a5..66dbe84 100755 --- a/src/coreclr/tests/src/JIT/SIMD/Vector3TestNative.cpp +++ b/src/coreclr/tests/src/JIT/SIMD/Vector3TestNative.cpp @@ -25,6 +25,12 @@ #define _countof(_array) (sizeof(_array)/sizeof(_array[0])) #endif +#ifdef _MSC_VER +#define CALLBACK __stdcall +#else // _MSC_VER +#define CALLBACK +#endif // !_MSC_VER + typedef struct _Vector3 { float x; @@ -266,7 +272,7 @@ EXPORT(void) __stdcall nativeCall_PInvoke_Vector3InComplexStruct(ComplexDT* arg) // // RPInvoke native call for Vector3 argument // -typedef void (__stdcall *CallBack_RPInvoke_Vector3Arg)(int i, Vector3 v1, char* s, Vector3 v2); +typedef void (CALLBACK *CallBack_RPInvoke_Vector3Arg)(int i, Vector3 v1, char* s, Vector3 v2); EXPORT(void) __stdcall nativeCall_RPInvoke_Vector3Arg( @@ -285,7 +291,7 @@ EXPORT(void) __stdcall nativeCall_RPInvoke_Vector3Arg( // // RPInvoke native call for Vector3 argument // -typedef void (__stdcall *CallBack_RPInvoke_Vector3Arg_Unix)( +typedef void (CALLBACK *CallBack_RPInvoke_Vector3Arg_Unix)( Vector3 v3f32_xmm0, float f32_xmm2, float f32_xmm3, @@ -319,7 +325,7 @@ EXPORT(void) __stdcall nativeCall_RPInvoke_Vector3Arg_Unix( // // RPInvoke native call for Vector3 argument // -typedef void (__stdcall *CallBack_RPInvoke_Vector3Arg_Unix2)( +typedef void (CALLBACK *CallBack_RPInvoke_Vector3Arg_Unix2)( Vector3 v3f32_xmm0, float f32_xmm2, float f32_xmm3, @@ -358,7 +364,7 @@ EXPORT(void) __stdcall nativeCall_RPInvoke_Vector3Arg_Unix2( // RPInvoke native call for Vector3 array // -typedef Vector3 (__stdcall *CallBack_RPInvoke_Vector3Ret)(); +typedef Vector3 (CALLBACK *CallBack_RPInvoke_Vector3Ret)(); EXPORT(bool) __stdcall nativeCall_RPInvoke_Vector3Ret( CallBack_RPInvoke_Vector3Ret notify) @@ -377,7 +383,7 @@ EXPORT(bool) __stdcall nativeCall_RPInvoke_Vector3Ret( // RPInvoke native call for Vector3 array // -typedef void (__stdcall *CallBack_RPInvoke_Vector3Array)(Vector3* v, int size); +typedef void (CALLBACK *CallBack_RPInvoke_Vector3Array)(Vector3* v, int size); static Vector3 arr[2]; @@ -398,7 +404,7 @@ EXPORT(void) __stdcall nativeCall_RPInvoke_Vector3Array( // RPInvoke native call for Vector3-in-struct test // -typedef void (__stdcall *CallBack_RPInvoke_Vector3InStruct)(DT v); +typedef void (CALLBACK *CallBack_RPInvoke_Vector3InStruct)(DT v); static DT v; @@ -419,7 +425,7 @@ EXPORT(void) __stdcall nativeCall_RPInvoke_Vector3InStruct( // RPInvoke native call for complex Vector3-in-struct test // -typedef bool (__stdcall *CallBack_RPInvoke_Vector3InComplexStruct)(ComplexDT* v); +typedef bool (CALLBACK *CallBack_RPInvoke_Vector3InComplexStruct)(ComplexDT* v); EXPORT(bool) __stdcall nativeCall_RPInvoke_Vector3InComplexStruct( CallBack_RPInvoke_Vector3InComplexStruct notify)